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:
| Path | Returns |
|---|---|
GET /.well-known/oauth-protected-resource | The 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 method | Behaviour |
|---|---|
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 else | 405 with Allow: GET, POST, DELETE. |
All methods on / need a valid bearer token.
Request headers
| Header | When | Rules |
|---|---|---|
Authorization | Every request to / | Bearer <access token>. Tokens in query strings are not accepted. |
Content-Type | POST | Must be application/json, otherwise 415. |
Accept | POST | Must list both application/json and text/event-stream, otherwise 406. |
MCP-Protocol-Version | Optional | If sent, it must be one of the supported versions, otherwise 400. |
Mcp-Session-Id | Not used | The server never issues a session ID and doesn’t check one. |
X-Request-Id | Optional | The 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-Idis returned afterinitialize, and none is needed on later requests. - The server doesn’t check that
initializecame first. Send it anyway, as the MCP lifecycle requires, to negotiate the protocol version. - The tool list never changes during a connection. The
toolscapability advertiseslistChanged: true, but nonotifications/tools/list_changedis 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:
| Version | Notes |
|---|---|
2025-11-25 | Latest. Returned when the client asks for a version the server doesn’t know. |
2025-06-18 | |
2025-03-26 | |
2024-11-05 | Streamable 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).
| Method | Supported |
|---|---|
initialize, notifications/initialized | Yes |
ping | Yes |
tools/list | Yes. All 29 tools in one page, with no nextCursor. |
tools/call | Yes |
resources/*, prompts/*, logging/setLevel, completion/complete | No. JSON-RPC error -32601 Method not found. |
Tool definitions
Each entry from tools/list has:
| Field | Content |
|---|---|
name | The tool name, for example search_leads. |
title | A short human-readable title, for example Search leads. |
description | What the tool does, written for the model. Write tools say to confirm with the user first. |
inputSchema | JSON Schema (draft-07) with "additionalProperties": false. |
annotations | readOnlyHint, 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.
| Layer | When | What the client receives |
|---|---|---|
| HTTP | The request is refused before MCP handles it | A non-200 status with a plain JSON body (not JSON-RPC, except where noted). |
| JSON-RPC | The method itself is unsupported or malformed | 200 with a JSON-RPC error object. |
| Tool | tools/call ran but failed or was refused | 200 with a normal result that has "isError": true. |
HTTP errors
| Status | Body | Cause |
|---|---|---|
400 | JSON-RPC error -32000, Bad Request: Unsupported protocol version: … (supported versions: …) | MCP-Protocol-Version header not supported. |
400 | JSON-RPC error -32700, Parse error: Invalid JSON-RPC message | The body is JSON but not a JSON-RPC message. |
401 | {"error":"unauthorized","message":"…"}, for example Missing bearer token. or Token expired | No, 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. |
405 | JSON-RPC error -32000, Method not allowed. | HTTP method other than GET, POST or DELETE. |
406 | JSON-RPC error -32000, Not Acceptable: … | Accept header missing application/json or text/event-stream. |
415 | JSON-RPC error -32000, Unsupported Media Type: Content-Type must be application/json | Wrong 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:
| Cause | content[0].text | Notes |
|---|---|---|
| Missing scope | Scope 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 arguments | MCP 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 tool | MCP error -32602: Tool <name> not found | |
| Tool rule not met | Plain 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 allowed | JSON: {"error": "business_id is required: …", "detail": {"allowed_business_ids": [12, 34]}} | Only for multi-business connections. See Business ID parameter. |
| Guardrail refusal | JSON: {"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 request | JSON: {"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 failure | Plain text error message | 5xx, timeouts and network errors. |
Limits
Values marked by default come from server configuration and may change.
| Limit | Value |
|---|---|
| Requests | 120 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_message | 10 per 60 seconds per Zoie user, by default, on top of the general limit. |
| Rate-limit headers | RateLimit-Policy and RateLimit (IETF draft 7) on authenticated responses from /; Retry-After on 429. |
| Request body | 1 MB |
| Zoie API timeout | 30 seconds per upstream call. |
| Page sizes | search_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 lengths | send_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 messages | Each message_text is cut to 1,000 characters (with a trailing …). Media links are removed and replaced by has_media. |
| Campaign audience | At 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 schedule | At least 5 minutes ahead, as a wall-clock time in the business’s time zone. |
| Businesses per connection | Up to 50. |
| OAuth endpoints | See 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.