MCP server contract

The wire-level contract of https://mcp-us.zoie.ai: stateless Streamable HTTP, required headers, supported protocol versions, the initialize result, how tool results and errors are shaped, and every limit.

This page describes exactly what the Zoie MCP server accepts and returns. For a quick summary, see the MCP server overview. For worked requests, see Examples.

Endpoint

All MCP traffic goes to one URL:

https://mcp-us.zoie.ai/

The server also answers two public paths that need no token:

PathReturns
GET /.well-known/oauth-protected-resourceThe RFC 9728 protected-resource metadata. See Authentication.
GET /healthz{"status":"ok","service":"zoie-mcp","version":"0.1.0"}

Any other path returns 404 — for example {"error":"not_found","path":"/mcp"} for /mcp. The legacy HTTP+SSE transport from protocol version 2024-11-05, with its separate /sse endpoint, is not offered.

Transport

Zoie uses the Streamable HTTP transport in stateless mode.

HTTP methodBehaviour
POST /Carries one JSON-RPC message. A request gets 200 with a text/event-stream body: one event: message event holding the JSON-RPC response, after which the stream closes. A notification (no id) gets 202 with no body.
GET /Opens an SSE stream for server-initiated messages. The server never sends any, so clients don’t need to open it. Without Accept: text/event-stream it returns 406.
DELETE /Returns 200. There is no session to end, so it has no effect.
Anything else405 with Allow: GET, POST, DELETE.

All methods on / need a valid bearer token.

Request headers

HeaderWhenRules
AuthorizationEvery request to /Bearer <access token>. Tokens in query strings are not accepted.
Content-TypePOSTMust be application/json, otherwise 415.
AcceptPOSTMust list both application/json and text/event-stream, otherwise 406.
MCP-Protocol-VersionOptionalIf sent, it must be one of the supported versions, otherwise 400.
Mcp-Session-IdNot usedThe server never issues a session ID and doesn’t check one.
X-Request-IdOptionalThe first 64 characters are passed on to the Zoie API to correlate logs. If you leave it out, the server generates one. Include it when you report a problem.

The request body may be up to 1 MB.

No sessions

The server keeps no state between HTTP requests. Each POST is handled by a fresh server instance, so:

  • No Mcp-Session-Id is returned after initialize, and none is needed on later requests.
  • The server doesn’t check that initialize came first. Send it anyway, as the MCP lifecycle requires, to negotiate the protocol version.
  • The tool list never changes during a connection. The tools capability advertises listChanged: true, but no notifications/tools/list_changed is ever sent.
  • Requests can be sent in parallel. None depends on an earlier one.

Browser clients

Browser requests are checked against an origin allowlist. By default it contains https://claude.ai, https://chatgpt.com and https://chat.openai.com. A request to / whose Origin header isn’t on the list is refused with 403 before authentication:

{ "error": "forbidden", "message": "Origin https://example.com is not allowed." }

For allowed origins, CORS permits the request headers Authorization, Content-Type, Mcp-Session-Id and Mcp-Protocol-Version, and exposes the response headers Mcp-Session-Id and WWW-Authenticate. Clients that send no Origin header — usually desktop apps, CLIs and server-side code — are not affected.

Protocol versions

The server supports these MCP protocol versions:

VersionNotes
2025-11-25Latest. Returned when the client asks for a version the server doesn’t know.
2025-06-18
2025-03-26
2024-11-05Streamable HTTP only — the old HTTP+SSE endpoint isn’t available.
2024-10-07

In initialize, the server echoes the client’s protocolVersion if it is in this list. Otherwise it answers with 2025-11-25, and the client decides whether it can continue.

Lifecycle and methods

For a client that asks for 2025-06-18, the initialize result is:

{
  "protocolVersion": "2025-06-18",
  "capabilities": {
    "tools": { "listChanged": true }
  },
  "serverInfo": {
    "name": "zoie-mcp",
    "version": "0.1.0"
  }
}

There are no instructions. The server doesn’t use any client capabilities (sampling, roots or elicitation).

MethodSupported
initialize, notifications/initializedYes
pingYes
tools/listYes. All 29 tools in one page, with no nextCursor.
tools/callYes
resources/*, prompts/*, logging/setLevel, completion/completeNo. JSON-RPC error -32601 Method not found.

Tool definitions

Each entry from tools/list has:

FieldContent
nameThe tool name, for example search_leads.
titleA short human-readable title, for example Search leads.
descriptionWhat the tool does, written for the model. Write tools say to confirm with the user first.
inputSchemaJSON Schema (draft-07) with "additionalProperties": false.
annotationsreadOnlyHint, destructiveHint, idempotentHint and openWorldHint.
execution{"taskSupport":"forbidden"} — tools run synchronously.

No tool declares an outputSchema. Every tool is listed whatever scopes the connection has; a missing scope is reported when the tool is called. The full schemas are on Available tools.

Arguments that aren’t in a tool’s schema are dropped silently rather than rejected, even though the schema says additionalProperties: false.

Tool results

A successful call returns a single text item whose text is pretty-printed JSON:

{
  "content": [
    { "type": "text", "text": "{\n  \"channel\": \"sms\",\n  \"count\": 42,\n  \"max_recipients\": 500\n}" }
  ]
}

There is no structuredContent. Parse content[0].text as JSON. Records are trimmed to the fields a model needs — for example, a lead carries at most 25 fields rather than the full record, and conversation messages lose media links. The fields each tool returns are listed on Available tools.

Errors

Errors come from three layers. Handle each one differently.

LayerWhenWhat the client receives
HTTPThe request is refused before MCP handles itA non-200 status with a plain JSON body (not JSON-RPC, except where noted).
JSON-RPCThe method itself is unsupported or malformed200 with a JSON-RPC error object.
Tooltools/call ran but failed or was refused200 with a normal result that has "isError": true.

HTTP errors

StatusBodyCause
400JSON-RPC error -32000, Bad Request: Unsupported protocol version: … (supported versions: …)MCP-Protocol-Version header not supported.
400JSON-RPC error -32700, Parse error: Invalid JSON-RPC messageThe body is JSON but not a JSON-RPC message.
401{"error":"unauthorized","message":"…"}, for example Missing bearer token. or Token expiredNo, empty, invalid or expired token. Comes with WWW-Authenticate. See The 401 challenge.
401{"error":"invalid_token","message":"MCP access has been revoked. Reconnect to continue."}The user revoked the connection, it was revoked automatically, or the user lost access to Zoie.
403{"error":"forbidden","message":"Origin … is not allowed."}Browser origin not on the allowlist.
404{"error":"not_found","path":"…"}Any path other than /, /healthz or the discovery document.
405JSON-RPC error -32000, Method not allowed.HTTP method other than GET, POST or DELETE.
406JSON-RPC error -32000, Not Acceptable: …Accept header missing application/json or text/event-stream.
415JSON-RPC error -32000, Unsupported Media Type: Content-Type must be application/jsonWrong Content-Type.
429{"error":"rate_limited","message":"Too many requests."}General rate limit reached.
429{"error":"rate_limited","message":"Too many outbound messages. Slow down."}send_message rate limit reached.
500{"error":"internal_error"}Includes a body that isn’t valid JSON or is larger than 1 MB.
500{"error":"internal_error","message":"MCP request handling failed."}Unexpected server failure.

JSON-RPC errors

Unsupported methods return a standard JSON-RPC error with the request’s id:

{ "jsonrpc": "2.0", "id": 7, "error": { "code": -32601, "message": "Method not found" } }

Tool errors

Inside tools/call, every failure is returned as a result with "isError": true — including an unknown tool name or invalid arguments, which some servers report as JSON-RPC errors. The text is either plain text or a JSON string, depending on the cause:

Causecontent[0].textNotes
Missing scopeScope conversations:write is required for send_message; this connection was not granted it.The result also has _meta with "error": "insufficient_scope", required_scope and granted_scopes. Nothing was sent to the Zoie API.
Invalid argumentsMCP error -32602: Input validation error: Invalid arguments for tool get_lead_by_phone: […]The bracketed part lists each problem with its path and message.
Unknown toolMCP error -32602: Tool <name> not found
Tool rule not metPlain text, for example `subject` is required when channel=Email.Checks a tool makes before calling Zoie, such as send_message channel rules.
business_id missing or not allowedJSON: {"error": "business_id is required: …", "detail": {"allowed_business_ids": [12, 34]}}Only for multi-business connections. See Business ID parameter.
Guardrail refusalJSON: {"error": "The audience matches 812 leads, above this connector's cap of 500. …", "detail": null}Campaign caps, schedule checks and missing channel fields.
Zoie API refused the requestJSON: {"error": "zoie-backend rejected the request (404)", "detail": {…}}Any 4xx from the Zoie API, for example a record that doesn’t exist or that the user’s role can’t reach. detail is diagnostic text, not a stable contract.
Zoie API failurePlain text error message5xx, timeouts and network errors.

Limits

Values marked by default come from server configuration and may change.

LimitValue
Requests120 per 60 seconds per Zoie user, by default. Every request to / counts, including initialize and tools/list, across all of the user’s connections.
send_message10 per 60 seconds per Zoie user, by default, on top of the general limit.
Rate-limit headersRateLimit-Policy and RateLimit (IETF draft 7) on authenticated responses from /; Retry-After on 429.
Request body1 MB
Zoie API timeout30 seconds per upstream call.
Page sizessearch_leads, global_search, list_appointment_leads and list_campaigns: limit 1–100, default 20. get_lead_notes: limit 1–50, default 20. list_campaign_options: up to 100 options per kind.
Text lengthssend_message message, note content and campaign message: up to 10,000 characters. campaign_name: 1–200. email_subject: up to 500. global_search search: 1–200.
Conversation messagesEach message_text is cut to 1,000 characters (with a trailing …). Media links are removed and replaced by has_media.
Campaign audienceAt least one filter. A preview of 0 leads is refused, and so is an audience above 500 leads by default — for new campaigns, replaced filters and start_campaign.
Campaign scheduleAt least 5 minutes ahead, as a wall-clock time in the business’s time zone.
Businesses per connectionUp to 50.
OAuth endpointsSee Rate limits on OAuth endpoints.

The Zoie API applies its own permission checks and limits behind every tool. A request the user couldn’t make in the web app fails through MCP too.