PlatformXeDocs
Get API Key

Remote MCP

Connect an MCP client (the Claude API MCP connector, Claude Managed Agents, an IDE) to PlatformXe's read-only platform tools over the Model Context Protocol, with a dedicated API key.

Remote MCP

PlatformXe serves its read-only platform tools over the Model Context Protocol (MCP), so an MCP client can look up your organisation's webhooks, deliveries, event log, messaging log metadata, usage and issues. It is the same tool layer the AI & Vision gateway runs server-side with toolsets: the same tools, the same checks on every call, the same record of every call. Your MCP client owns the prompt and the decision; PlatformXe answers the tool calls it is asked for, for your own organisation only, and never writes.

URLhttps://mcp.platformxe.com/mcp (also https://www.platformxe.com/api/v1/mcp)
TransportStreamable HTTP, stateless: one JSON-RPC message per POST, JSON answers, no session id, no server-sent events
AuthenticationAuthorization: Bearer <pxk_live_… or pxk_test_…> (or x-api-key)
Scopemcp:connect, named on the key, plus each tool's own scope (tools:platform.read)
Offeredinitialize, ping, tools/list, tools/call. No resources, no prompts

1. Mint a dedicated key

In the portal, open API keys → Generate and tick mcp:connect and tools:platform.read. A key for an MCP host is dedicated: it may carry only mcp:connect and tools:* scopes, so a key stored in another company's vault or connector settings can do nothing else if it leaks: every other PlatformXe route refuses it (403 MCP_KEY_NOT_DEDICATED), including the routes any other key may call. Mint a separate key for anything else. The dialog then asks which host will use it:

  • Claude Managed Agents — the host keeps session history, so the key is listed and served only tools that return no personal data (see The Managed Agents rule).
  • Another MCP client — the Claude API MCP connector on a plain Messages request, Claude Code, Cursor or another IDE: every tool the key's scopes allow.

mcp:connect is granted only by naming it: a key whose scope list is empty or * never holds it, so no existing key becomes attachable by default. Through the API the same rules apply on POST /api/portal/api-keys (and the admin key routes): send mcpHostKind: "MANAGED_AGENT" or mcpHostKind: null with the scopes, or the request is refused.

CodeWhen
400 MCP_HOST_KIND_REQUIREDThe scopes name mcp:connect and mcpHostKind is missing
400 MCP_HOST_KIND_INVALIDmcpHostKind is neither "MANAGED_AGENT" nor null, or is "MANAGED_AGENT" on a key whose scopes do not name mcp:connect
400 MCP_KEY_NOT_DEDICATEDmcp:connect sits beside a scope that is not tools:*
400 MCP_ORGANIZATION_KEY_REQUIREDmcp:connect on a platform key (no organisation)

A key bound to an organisation is required: a platform key cannot be given mcp:connect, and is refused at the endpoint.

The host choice is fixed when the key is minted: the portal has no way to change it on an existing key. If the host changes, mint a new key with the other choice and revoke the old one.

2. Connect your MCP client

Claude API MCP connector

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();
const response = await client.beta.messages.create({
  model: "claude-opus-5-5",
  max_tokens: 16000,
  betas: ["mcp-client-2025-11-20"],
  mcp_servers: [
    {
      type: "url",
      url: "https://mcp.platformxe.com/mcp",
      name: "platformxe",
      authorization_token: process.env.PLATFORMXE_MCP_API_KEY,
    },
  ],
  tools: [{ type: "mcp_toolset", mcp_server_name: "platformxe" }],
  messages: [{ role: "user", content: "Which of our webhooks failed in the last day?" }],
});

Mint this key with Another MCP client.

Claude Managed Agents

Declare the server on the agent (no credential there) and store the key in a vault as a bearer credential for the same URL; the vault adds it to each call outside the agent's sandbox.

{
  "mcp_servers": [{ "type": "url", "name": "platformxe", "url": "https://mcp.platformxe.com/mcp" }],
  "tools": [{ "type": "mcp_toolset", "mcp_server_name": "platformxe" }]
}
{
  "display_name": "PlatformXe (production)",
  "auth": { "type": "static_bearer", "mcp_server_url": "https://mcp.platformxe.com/mcp", "token": "<pxk_live_…>" }
}

Mint this key with Claude Managed Agents.

If the agent's environment uses limited networking, it must allow MCP servers: set allow_mcp_servers: true in its networking settings (or list mcp.platformxe.com in allowed_hosts), or creating a session is refused.

Claude Code, Cursor and other IDEs

Add an HTTP MCP server with an Authorization header, the dedicated key in the environment variable PLATFORMXE_MCP_API_KEY. Claude Code (.mcp.json) expands ${NAME}:

{
  "mcpServers": {
    "platformxe": {
      "type": "http",
      "url": "https://mcp.platformxe.com/mcp",
      "headers": { "Authorization": "Bearer ${PLATFORMXE_MCP_API_KEY}" }
    }
  }
}

Cursor (mcp.json) expands ${env:NAME}:

{
  "mcpServers": {
    "platformxe": {
      "url": "https://mcp.platformxe.com/mcp",
      "headers": { "Authorization": "Bearer ${env:PLATFORMXE_MCP_API_KEY}" }
    }
  }
}

A host that speaks stdio only

@caldera/platformxe-mcp 1.0 runs over stdio as before, with its SDK tools on PLATFORMXE_API_KEY. With PLATFORMXE_MCP_REMOTE_TOOLS=true (exactly true or false; anything else is off) it also connects to PLATFORMXE_MCP_URL (default https://mcp.platformxe.com/mcp) and lists these tools beside its own; on a name clash the tool from this endpoint wins. Calls through it are recorded with the channel MCP_STDIO.

The bridge sends PLATFORMXE_MCP_API_KEY to the endpoint, and falls back to PLATFORMXE_API_KEY only when it is unset. Set it to a dedicated MCP key: the SDK key carries other scopes, so the endpoint refuses it (MCP_KEY_NOT_DEDICATED, or FORBIDDEN without mcp:connect) and the bridge then starts with the SDK tools only.

{
  "mcpServers": {
    "platformxe": {
      "command": "npx",
      "args": ["-y", "@caldera/platformxe-mcp"],
      "env": {
        "PLATFORMXE_API_KEY": "${env:PLATFORMXE_API_KEY}",
        "PLATFORMXE_MCP_REMOTE_TOOLS": "true",
        "PLATFORMXE_MCP_API_KEY": "${env:PLATFORMXE_MCP_API_KEY}"
      }
    }
  }
}

That block uses Cursor's ${env:NAME}; in Claude Code write ${PLATFORMXE_API_KEY} and ${PLATFORMXE_MCP_API_KEY}.

The tools

ToolReturnsData classes
platformxe_webhooks_listYour webhook endpoints: name, URL host, events, status, countersnone
platformxe_webhook_getOne of your endpoints by id (found: false for any other id)none
platformxe_webhook_deliveries_listDelivery outcomes, never payloadsnone
platformxe_webhook_activityDelivery totals over a windownone
platformxe_event_log_searchEvent log entries, ids and types onlynone
platformxe_messaging_log_listMessage metadata: channel, status, time; never bodies or SMS / WhatsApp textnone
platformxe_usage_summaryYour usage by servicenone
platformxe_issues_listYour issues: titles and tags are free text that can name a personPII_NAME

Every tool is read-only and reads only the key's organisation, which PlatformXe takes from the key on every request — never from the tool input. A tool input with an unknown field (for example another organisation's id) is refused by the tool's schema. Each call is checked in order (tenant, scope, data class, budget), recorded, and its result is returned as data: {"tool": …, "result": …} with personal data replaced by placeholders (‹EMAIL_1› and so on) that are never resolved. Placeholders are numbered per call: the same placeholder in two calls of one session may stand for different values, and no call can turn one back into the value. Tool arguments over the size limit are refused before the call is checked or recorded. A refused or failed call comes back as a tool error (isError: true) with a fixed sentence that names no data.

The Managed Agents rule

Claude Managed Agents keeps session history until it is deleted, so a tool result read there is retained by the host. A key minted for Claude Managed Agents is therefore listed, and may run, only tools with no data classes: every tool above except platformxe_issues_list, whose call is refused (DATA_CLASS). The choice cannot be changed on an existing key in the portal: if the host changes, mint a new key and revoke the old one.

Errors

StatusCodeWhen
400MCP_BATCH_NOT_SUPPORTEDA JSON array (batch) was sent
400JSON-RPC -32700The body is not JSON or not a JSON-RPC message
401UNAUTHORIZEDNo key, or a key that is unknown, revoked or expired (WWW-Authenticate: Bearer)
403MCP_HOST_NOT_ALLOWED / MCP_ORIGIN_NOT_ALLOWEDThe request was not addressed to an MCP host, or came from a browser Origin that is not allowed
403FORBIDDENThe key does not name mcp:connect, or its organisation is inactive
403MCP_ORGANIZATION_KEY_REQUIREDA platform key (no organisation)
403MCP_KEY_NOT_DEDICATEDThe key holds a scope that is not mcp:connect or tools:*
405METHOD_NOT_ALLOWEDGET / DELETE / OPTIONS / PUT / PATCH /api/v1/mcp: anything but POST (Allow: POST)
406JSON-RPC -32000Accept does not list both application/json and text/event-stream
413PAYLOAD_TOO_LARGEThe body is over 256 KiB
415UNSUPPORTED_MEDIA_TYPEContent-Type is not application/json
429RATE_LIMITEDThe key's budget or the mcp:connect tier is spent (Retry-After)
500INTERNAL_ERROR / JSON-RPC -32603The key could not be checked, or the request could not be handled (fixed messages)
503SERVICE_UNAVAILABLEThe key's caller service could not be verified; retry shortly

A tool that is refused, fails or times out is not an HTTP error: the answer is 200 with a tool error.

Limits and logging

  • Rate: 1,200 requests an hour per key on mcp:connect, beside the key's own limit. Every POST is one request: initialize, the notifications/initialized notification and ping count as well as tools/list and tools/call. A client that connects afresh for each conversation turn (the Claude API connector does) spends about three requests before its first tool call.
  • Size: 256 KiB per request, one message per request; tool arguments up to 32,000 characters; each tool answers within 8 seconds.
  • Billing: tool calls are recorded and not billed.
  • Logging: one line per request with the key's id prefix, the method, the tool name, the outcome and the time taken. Arguments, results, headers, addresses and organisation names are never logged.
  • Not offered: OAuth sign-in (use a key), streaming, write tools, MCP resources and prompts.