MCP server
3x ships a remote MCP server at https://<api-host>/mcp (sign-in required) and a public
docs endpoint at https://<api-host>/mcp/public (no sign-in, no data). With the server, Claude (Claude Code,
claude.ai, Claude Desktop, any MCP client) can
- analyse traffic, campaigns, relevance, videos, quizzes, funnels and ad costs with the same filter as the dashboard, and run read-only SQL;
- act: mark conversions (for example a confirmed WhatsApp lead), retry uploads, define goals, funnels and relevance rules, sync ad accounts;
- install 3x on a website: detect the stack, read the setup recipe, create the project and keys, write the snippet into the code, verify the installation and watch the first live event.
| Client | Authentication | Guide |
|---|---|---|
| Claude Code | OAuth in the browser (no key needed) or a secret key header | Claude Code |
| claude.ai / Claude Desktop | OAuth 2.1 custom connector | claude.ai connector |
| CI, scripts, other agents | Secret key header | Claude Code |
| Any client, before you have an account | none – public docs endpoint /mcp/public | Public docs endpoint |
Transport
- Streamable HTTP, stateless, JSON responses (no SSE), protocol version 2025-11-25. Only
POST;GETandDELETEanswer 405. - Request body ≤ 64 KB, JSON-RPC batches of 1–10 messages.
- Browsers are blocked: a request with an
Originheader gets 403 unless the deployment lists the origin inX3_MCP_ALLOWED_ORIGINS. - Limits: 120 requests and 60 tool calls per minute per principal (429 with
Retry-After). /mcpnever redirects – use the exact host, otherwise clients drop theAuthorizationheader.
Sign-in
/mcp needs a credential for every request – initialize and tools/list included. Without one
it answers 401 with
WWW-Authenticate: Bearer realm="3x", resource_metadata="https://<api-host>/.well-known/oauth-protected-resource/mcp", scope="…"so Claude, ChatGPT, Cursor and VS Code detect OAuth as soon as you add the server (in Claude's
Add custom connector dialog: Sign in now) and start the sign-in before the first chat. A secret
key (Authorization: Bearer sk_3x_…) works instead of OAuth. With a credential, tools/list only
shows the tools your scopes allow; a tool beyond an OAuth grant answers 403 insufficient_scope
so the client can ask for more.
Public docs endpoint
https://<api-host>/mcp/public is a second MCP endpoint (server name x3-docs) for help before you
have an account – for example in Claude Code or Cursor while you evaluate X3. It needs no sign-in,
never asks for one and has no access to any organization, project or analytics data:
- tools
docs_search,docs_read,docs_list,kb_search,kb_get,setup_detect_stack,setup_get_instructions,events_validate; - resources: the docs (
x3://docs/…), OpenAPI and API reference, event catalog, onboarding guide, setup prompts and the Claude skill files (x3://skills/x3-connect-website/…); - prompts
connect_website,full_setup,install,events,server_conversions,debug_tracking,connection_test.
claude mcp add --scope user --transport http x3-docs https://api.x3growth.io/mcp/publicCursor / VS Code: {"url": "https://api.x3growth.io/mcp/public"} as a server named x3-docs. An
Authorization header sent here is ignored. Everything with your data – projects, keys, install
snippets with the real publishable key, verification, analytics – lives on /mcp; add it once you have
an account. Do not add /mcp/public as a claude.ai connector: it shows up as No sign-in, which is
correct for it, but it cannot see your data.
Projects
Every data tool takes project – a project id, org-slug/project-slug, or a project slug that is
unique among the projects you can see. It is optional when the credential is bound to exactly one
project. Start with project_list.
Output
- Tool results contain
structuredContent(typed by the tool's output schema) and the same data as JSON text. - Rates are fractions 0–1, durations seconds, money in the project currency.
- Large results are compacted (floats rounded, nulls dropped, long strings cut, ≤ 150 000 characters
with a truncation note) – narrow the filter or use
limitfor more detail.
Privacy and audit
Only leads_list and leads_get return personal data; they need leads:read and are marked with
_meta.personalData. leads_list never returns phone numbers or free text. Contact data passed to
conversions_mark is hashed before it is stored and redacted in the audit log. Every tool call is
written to the audit log (mcp_audit: principal, tool, shortened arguments, duration, result size).
Next: Tools · Resources and prompts.