JSON-RPC 2.0 / MCP 2024-11-05.
One endpoint at https://api.chieflab.io/api/mcp. Bearer auth. 45 tools, with outcome-named launch tools front-loaded for agent selection — sort tools/list by _meta.category=primary first and primary tools surface above the advanced/legacy/recovery ones. Server-level instructions field on initialize that AI agents read at session start. BM25-discoverable outcome-named tool names. Cold agents should call chieflab_help first to get the operator menu + workspace state.
Endpoint
POST https://api.chieflab.io/api/mcp
Authorization: Bearer clp_live_<your-key>
Content-Type: application/json Discovery (no auth): GET https://api.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 business execution layer for agent-built companies, starting with GTM.\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": "chieflab_launch_product", "description": "Plans and executes a product launch end-to-end. USE WHEN ...", "inputSchema": { ... } },
...
45 tools total
]}} Tool name is BM25-matched against the user's literal phrasing inside Tool Search. Every primary tool starts with "chieflab_" + outcome verb (launch_product, publish_approved_post, send_approved_email, post_launch_review, create_social_graphics). Legacy "chiefmo_*" names still resolve to the same handlers for backward compatibility.
tools/call
POST /api/mcp
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "chieflab_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 create 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 |
|---|---|
chieflab_launch_product | User wants to launch a new product. Default first call. |
chieflab_publish_approved_post | User approved a publish action. Fires via Zernio (LinkedIn / X / Threads / Insta / FB / Bluesky / TikTok). |
chieflab_send_approved_email | User approved an email action. Fires via Resend. |
chieflab_post_launch_review | ≥24h after publish. Pulls Zernio + GA4 + Search Console + recommends next iteration. |
chieflab_create_social_graphics | Ad-hoc graphics outside a launch run. |
chieflab_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. |
Sub-skills + admin tools (workspaces, tenants, voice samples, runs, assets, actions, connectors) round out the rest. 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 hi@chieflab.io. |
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. Use direct parse for raw MCP clients, or install @chieflab/sdk for typed wrappers around the same hosted MCP.
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 business execution layer for agent-built companies, starting with GTM.
The launch operator is the first loop: when a product-building agent ships something,
ChiefLab turns repo context into a launch plan, approval room, publish/send
actions, measurement, memory, and the next move.
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:
chieflab_launch_product({ productUrl, goal, repoContext })
Returns a launch pack (positioning + per-channel briefs + on-brand graphics)
+ publishActions (approval-gated) + signed reviewUrl + agentGuide.ideCard.
IDE-NATIVE APPROVAL (primary path):
1. Render agentGuide.ideCard.drafts[] inline in chat — each draft has
its own command: "approve linkedin", "revise x: <change>",
"manual publish email done: <url>".
2. Wait for the user to type one of those literal commands.
3. Per approval, call chieflab_approve_action with the matching actionId.
4. After approval, call the executor named in the action.
REVIEW URL (fallback only):
- Surface reviewUrl as "open on phone or hand off to a teammate."
- Do NOT make it the headline instruction — use the IDE-native commands first.
- The reviewUrl is for: mobile / multi-person / image-heavy / audit cases.
CLOSED LOOP:
1. chieflab_launch_product → repo-grounded GTM plan + ideCard
2. user approves in chat (or on reviewUrl as fallback)
3. chieflab_publish_approved_post / chieflab_send_approved_email → fire
4. chieflab_post_launch_review → 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 render ideCard.drafts[] inline OR surface reviewUrl — both work.
DO NOT USE for generic brainstorming, ad spend without approval, or any send
without an approved actionId. Same content lives at /llms.txt (for agents that fetch the docs site) and /for-agents (visual version).
Webhooks
Pass webhookUrl on chieflab_launch_product, chieflab_diagnose_marketing, or other long-running calls. 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