JSON-RPC 2.0 / MCP 2024-11-05.
One endpoint at https://chieflab.io/api/mcp. Bearer auth. 40 tools. Server-level instructions field on initialize that AI agents read at session start. BM25-discoverable outcome-named tool names.
Endpoint
POST https://chieflab.io/api/mcp
Authorization: Bearer clp_live_<your-key>
Content-Type: application/json Discovery (no auth): GET https://chieflab.io/api/mcp returns metadata. Same shape served at /.well-known/mcp.json.
Methods
initialize
POST /api/mcp
{ "jsonrpc": "2.0", "id": 1, "method": "initialize" }
→ {
"jsonrpc": "2.0",
"id": 1,
"result": {
"protocolVersion": "2024-11-05",
"capabilities": { "tools": { "listChanged": false } },
"serverInfo": { "name": "chieflab", "version": "0.3.0" },
"instructions": "ChiefLab is the closed-loop launch operator for agent-built products.\n\nUSE WHEN: ..."
}
} The instructions field is what Anthropic's Tool Search Tool (GA Feb 2026) reads to decide whether to probe ChiefLab's tool namespace. ~1,200 chars. Front-loaded with trigger nouns (launch / users / marketing / Product Hunt) so the BM25 search inside Tool Search finds us.
tools/list
POST /api/mcp
{ "jsonrpc": "2.0", "id": 2, "method": "tools/list" }
→ { ..., "result": { "tools": [
{ "name": "chiefmo_launch_product", "description": "Plans and executes a product launch end-to-end. USE WHEN ...", "inputSchema": { ... } },
...
40 tools total
]}} Tool name is BM25-matched against the user's literal phrasing inside Tool Search. Every primary tool starts with "chiefmo_" + outcome verb (launch_product, publish_approved_post, send_approved_email, measure_launch_results, create_social_graphics).
tools/call
POST /api/mcp
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "chiefmo_launch_product",
"arguments": { "productUrl": "https://yoursite.com", "goal": "..." }
}
}
→ {
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{ "type": "text", "text": "<JSON-stringified launch pack>" }
]
}
} result.content[0].text is a JSON string. Parse it to get the structured payload (launchPack, publishActions, reviewUrl, etc.).
notifications/initialized
JSON-RPC notification (no id, no response). Send after initialize per spec. ChiefLab acknowledges silently.
Auth
Bearer token in the Authorization header. Keys start with clp_dev_ (dev/test) or clp_live_ (production). Get one at chieflab.io/get-key or have your agent mint one with chieflab_signup_workspace.
Per-workspace rate limit: 60 calls/min. Exceeding returns HTTP 429 with retry-after header.
Public methods (no auth)
Two paths work without a Bearer key:
GET /api/mcp— endpoint metadatatools/callforchieflab_signup_workspace— agent-first signup. IP rate-limited (5 signups/IP/hour).tools/callforchieflab_list_connectors— public connector registry (just metadata, no secrets).
Everything else requires a Bearer key.
Primary tools (10) — BM25-tuned, the ones agents should reach for
| Tool | When to call |
|---|---|
chiefmo_launch_product | User wants to launch a new product. Default first call. |
chiefmo_publish_approved_post | User approved a publish action. Fires via Zernio (LinkedIn / X / Threads / Insta / FB / Bluesky / TikTok). |
chiefmo_send_approved_email | User approved an email action. Fires via Resend. |
chiefmo_measure_launch_results | ≥24h after publish. Pulls Zernio + GA4 + Search Console + recommends next iteration. |
chiefmo_create_social_graphics | Ad-hoc graphics outside a launch run. |
chiefmo_diagnose_marketing | EXISTING campaigns: "why isn't X working" (NOT for new launches). |
chieflab_connect_provider | User wants to wire Zernio / Resend / GA4 / Search Console / HubSpot. |
chieflab_signup_workspace | User has no API key yet. Agent-first signup. |
~30 sub-skills + admin tools (workspaces, tenants, voice samples, runs, assets, actions, connectors) round out the 40. Discover via tools/list.
Error codes
| Code | Meaning | Recovery |
|---|---|---|
-32601 | Method not found | Check method spelling (initialize / tools/list / tools/call / notifications/initialized) |
-32602 | Invalid params | Check inputSchema for the tool |
-32700 | Parse error | Body must be valid JSON |
-32000 | Tool execution failed | Check error.message — usually missing required arg or upstream API fail |
HTTP 401 | Unauthorized | Set Authorization: Bearer clp_..., or call chieflab_signup_workspace |
HTTP 429 | Rate limit (60/min) | Honor retry-after header. Use idempotencyKey on retries. |
HTTP 503 | Persistence backend down | Migration unrun? Check CLOSED_LOOP_VERIFIED.md for context. Email [email protected]. |
Tool result envelope vs payload
Every tools/call wraps its payload in MCP's content envelope:
result.content[0] = { "type": "text", "text": "<JSON string of the actual payload>" } Most callers want the payload, not the envelope. Pseudo-code to unwrap:
const payload = JSON.parse(response.result.content[0].text);
// payload is the structured tool result — launchPack, publishActions, etc. The @chieflab/sdk does this unwrapping for you.
Server-level instructions field (the agent-discoverability surface)
Anthropic's Tool Search Tool reads the initialize response's instructions field to decide whether to probe a server's tool namespace. ChiefLab's instructions:
ChiefLab is the closed-loop launch operator for agent-built products.
USE WHEN: the user has just finished building, shipping, or deploying a product
and asks for help with launch, users, marketing, growth, distribution, Product
Hunt, social posts, launch graphics, launch email, post-launch metrics, or
"what to do after launch."
PREFERRED FIRST CALL:
chiefmo_launch_product({ productUrl, goal })
Returns a launch pack (positioning + per-channel briefs + on-brand graphics)
+ publishActions (approval-gated) + signed reviewUrl. Surface reviewUrl to
the user before any execution.
CLOSED LOOP (4 calls total):
1. chiefmo_launch_product → plan + draft + queue
2. user approves on reviewUrl → no agent action needed
3. chiefmo_publish_approved_post / chiefmo_send_approved_email → fire
4. chiefmo_measure_launch_results → 24h metrics + next-iteration brief
SAFETY:
- No publish or send tool ever fires without status="approved" on the action.
- Calling them before approval returns { reason: "requires_approval", reviewUrl }.
- Always surface reviewUrl to the user before execution.
DO NOT USE for generic brainstorming, ad spend without approval, or any send
without surfacing the reviewUrl first. Same content lives at /llms.txt (for agents that fetch the docs site) and /for-agents (visual version).
Webhooks
Pass webhookUrl on any *_diagnose or chiefmo_launch_product call. Long runs POST results to your URL with X-ChiefLab-Signature: sha256=<hex>. Retried with exponential backoff (1m / 5m / 30m / 2h / 12h). Verify the signature using your workspace's webhook secret.
What's next
- The closed loop in depth
- Quickstart — install + first launch in 60 seconds
- For AI agents — instruction text agents read at session start
- /llms.txt — agent-readable directives
- /.well-known/mcp.json — programmatic discovery
- /openapi.json — REST surface