DocsMCP serverProtocol notes

Protocol notes

Transport, sessions, limits and error handling.

Everything about the transport, authentication, limits and error shapes that a client author needs and a client user occasionally has to debug.

Transport

PropertyValue
Endpointhttps://mcp.indexone.io
TransportMCP streamable HTTP, stateless (json_response=True)
Protocol revisions2026-07-28 and 2025-11-25 and earlier — both eras served
MethodsPOST only
Server nameindexone
Server version1.5.0
Tools22

Responses come back as plain JSON. No SSE stream is required or offered, so a client that insists on upgrading to an event stream will not get one — send accept: application/json, text/event-stream and take the JSON.

Protocol revisions

The server answers both eras of the protocol on the same endpoint, and picks per request based on how the client opens. There is nothing to configure either way.

A modern client (revision 2026-07-28) sends no handshake: every request carries its protocol version and capabilities in _meta, mirrored into the MCP-Protocol-Version, Mcp-Method and Mcp-Name headers. Call server/discover to read the server identity, capabilities and instructions in one request.

A legacy client (2025-11-25 and earlier) sends initialize and gets the same server info and instructions back in the handshake result. Hosted Claude connectors are still on this path, so it is fully supported rather than merely tolerated.

Instructions live in two places

The server's agent instructions — the operating guide the model reads — come back on initialize for legacy clients and in the server/discover result for modern ones. Calling server/discover is optional in the modern revision, so a client that skips it never sees them. Nothing required for correctness depends on them: every rule that must hold is enforced by the write tools themselves.

Response caching

tools/list and server/discover results carry ttlMs and cacheScope freshness hints. Both are identical for every caller — the tool list is rendered from a static registry with no per-team filtering — so both are "public" with a one-hour TTL, and the tool order is stable across calls.

A client that honours the hints stops re-fetching about 50KB of schema and instructions on every session. Deploys restart the server, which is also when a cached copy legitimately goes stale.

POST only

GET and DELETE return 405 with an Allow: POST header and this body:

{
"error": "This MCP endpoint is stateless: POST only.",
"code": "method_not_allowed"
}

Some MCP clients open a GET to establish a server-to-client event stream, and some send DELETE to tear down a session. Revision 2026-07-28 removed both — the GET stream along with session ids — and states that a server receiving them from an older client should answer 405, which is what happens here. An Mcp-Session-Id or Last-Event-ID header on a request is ignored; streams are not resumable.

Why the server is stateless

There is no MCP session id. Every request is self-contained, carrying its own credentials and everything the handler needs.

That was originally an infrastructure constraint. The server sits behind API Gateway over a VPC link, which buffers responses rather than streaming them, and behind a network load balancer with no session stickiness — two consecutive requests from the same client can land on different tasks, so a session id issued by one task would be meaningless to the next.

As of revision 2026-07-28 it is also what the specification requires: protocol-level sessions and the Mcp-Session-Id header were removed, and servers that need state across calls are told to mint explicit handles and pass them as ordinary tool arguments — which is exactly what the run cache below does.

The run cache

Stateless transport does not mean no continuity. Cross-request continuity comes from a per-team run store rather than from the protocol.

When run_workflow executes a preview, its outputs are cached against the calling team and given a run id — run_1, run_2, and so on, numbered per team. inspect_run and get_column_values can then reference an earlier run by run_id and op_id, which is what makes "run it, then look at what came out" work across separate tool calls.

PropertyValue
TTL2 hours
Row cap20,000 rows per output
Run idsrun_1, run_2, … per team
DefaultThe most recent run, and — if it has one operation — that operation

The cache is a convenience, not storage

Preview outputs expire after two hours and are truncated at 20,000 rows per output. An agent returning to a conversation the next day will find its runs gone and must re-run the workflow. Nothing in the cache is persisted state — run_workflow writes nothing durable by design.

Authentication

Two methods, both resolving to a team scope, and a signed-out path for public reads. See Connect a client for the per-client setup.

API key. Send x-api-key: <team API key> or Authorization: Bearer <key>. The key is resolved against the API Gateway key registry and maps to a team. Resolutions are cached for 300 seconds, with a forced refresh on a miss no more often than every 30 seconds, so a key issued moments ago works without waiting out a cache window.

OAuth 2.1. Authorization code with PKCE, backed by Cognito, for any client implementing the MCP authorization spec — the Claude apps, Claude Code, ChatGPT, Cursor and VS Code among them. The user signs in with their normal Index One console account and no key touches a config file.

Signed out. A request with no credential may list tools and call the tools marked no sign-in on the Tool reference: the catalog and example tools, validate_workflow, and the six get_index* reads on public indices. Any other call, and a read of a private index, answers 401, which starts sign-in. The initialize handshake and server/discover need no credential either, so clients of both eras connect signed out. Signed-out calls are rate-limited per IP address, below.

Discovery documentPurpose
/.well-known/oauth-protected-resourceProtected resource metadata
/.well-known/oauth-authorization-serverAuthorization server metadata
/.well-known/openid-configurationOpenID Connect discovery
POST /oauth/registerDynamic client registration shim (RFC 7591)

The registration endpoint is a shim, and it is static: every registrant is handed the same pre-provisioned public client. It exists because clients following the MCP authorization spec expect to register before they can begin a flow. Cognito enforces the real redirect-URI allowlist, so handing out a shared client id grants nothing on its own.

ParameterValue
Scopehttps://mcp.indexone.io/mcp
code_challenge_methods_supported["S256"]
token_endpoint_auth_methods_supported["none"]
client_id_metadata_document_supportedtrue
Grant types["authorization_code", "refresh_token"]
Loopback redirectshttp://localhost/callback, http://127.0.0.1/callback, http://localhost/oauth/callback and http://127.0.0.1/, on any port
Hosted redirectshttps://claude.ai/api/mcp/auth_callback, https://chatgpt.com/connector_platform_oauth_redirect, https://vscode.dev/redirect, https://www.cursor.com/agents/mcp/oauth/callback

Client ID Metadata Documents first, registration second

Revision 2026-07-28 deprecates RFC 7591 dynamic client registration in favour of Client ID Metadata Documents (CIMD), with a minimum twelve-month window before removal. A client whose client_id is a metadata URL under https://claude.ai/oauth/, https://chatgpt.com/oauth/ or https://vscode.dev/oauth/ signs in with the redirect URIs its own document lists. Every other client registers through the shim.

Origin

The specification requires servers to validate the Origin header to prevent DNS rebinding. A request with no Origin is accepted — that is every non-browser client, including Claude Code, mcp-remote, curl and the Python SDK. A request that does carry one must present a recognised origin, or it gets 403. Host is deliberately not validated: the endpoint sits behind API Gateway over a VPC link, so the inbound host is an infrastructure detail rather than a security signal.

401 Unauthorized

A call that needs sign-in, or carries an invalid credential, returns 401 with a WWW-Authenticate header pointing at the protected-resource metadata, which is how a spec-compliant client discovers it should start an OAuth flow.

WWW-Authenticate: Bearer resource_metadata=".../.well-known/oauth-protected-resource", scope=".../mcp/mcp"
{
"error": "Provide a valid Index One API key in the 'x-api-key' header (or 'Authorization: Bearer <key>'), or connect via OAuth. Keys are issued per team in the Index One console.",
"code": "unauthenticated"
}

Rate limits

60 requests per minute per team, counted in a fixed 60-second window rather than a rolling one. The limit is shared across everyone and everything using that team's credentials, so several agents on one key contend with each other. It can be overridden per deployment with the MCP_RATE_LIMIT_PER_MIN environment variable. Signed-out calls get half that, counted per IP address.

The three tools that run a full workflow server-side — run_backtest, save_workflow and deploy_index — share a second, narrower window of 10 per minute per team (MCP_WRITE_RATE_LIMIT_PER_MIN) on top of the overall one. Cheap reads and polls never consume it, so an agent polling get_backtest cannot starve a deploy, and a runaway loop cannot fire sixty deploys a minute. The narrower window is keyed off the Mcp-Name header, which only modern clients send; a legacy client is covered by the overall window alone.

Over either limit returns 429 with a Retry-After header giving the seconds until the next window opens. Because the window is fixed, that value is often small — waiting it out is usually better than backing off exponentially.

{
"error": "Rate limit exceeded for this team. Retry shortly.",
"code": "rate_limited"
}

Timeouts and polling

API Gateway enforces a 29-second integration ceiling. Any tool call that could exceed it has to return before it does, or the client sees a gateway error instead of a result.

run_backtest and deploy_index therefore never wait on the run at all: they validate synchronously, launch the job server-side, and immediately return a backtest_id (deploys also return the pending index_id). Poll get_backtest(backtest_id) for the outcome — including deployed_index_id, which appears there once a deploy completes. This is the MCP call-now/fetch-later pattern: the id is a durable handle, and polling is the authoritative way to observe the terminal status.

get_index_values handles the same ceiling differently: rather than truncating, it caps at 5000 points and downsamples evenly, always keeping the latest point, and reports {count, returned, downsampled} so a model can tell that it is reading a thinned series.

Tool result shape

Every tool returns its payload as a single compact JSON text block — one content entry of type text whose body is the result object. Parse that string to get the result.

{
"content": [
{ "type": "text", "text": "{\"ok\":true,\"workflow_id\":\"idx_...\"}" }
],
"isError": false
}

structuredContent is no longer sent

Earlier versions returned the same payload twice — once as structuredContent and once as pretty-printed text — which roughly doubled every response. No tool declares an outputSchema, which is what structuredContent exists to be validated against, so only the text block is sent now. A client that read structuredContent should read content[0].text and parse it. Payloads are about 59% smaller as a result.

Tool errors

Tool dispatch never raises. An unknown tool name, a malformed JSON argument, a TypeError from wrong argument types, or any exception inside a handler comes back as an ordinary tool result — inside that same text block:

{ "error": "..." }

This is a deliberate choice. A JSON-RPC-level error tends to abort the client's tool loop or surface as an opaque failure to the user, whereas an error returned as a result lands back in the model's context where it can be read and acted on. An agent that passes operation_ids as a string instead of an array gets told so and retries; it does not lose the conversation.

The corollary for client authors: parse content[0].text and check the result for an error key. A successful protocol response does not mean the tool succeeded.

Raw JSON-RPC

Listing tools. Useful as a credential smoke test.

curl -X POST https://mcp.indexone.io \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Calling a tool. Arguments go in params.arguments, matching the tool's inputSchema.

curl -X POST https://mcp.indexone.io \
-H "content-type: application/json" \
-H "accept: application/json, text/event-stream" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "get_index_values",
"arguments": { "index_id": "idx_bh7fgXWJMaa3", "limit": 100 }
}
}'

Both take the legacy path, which is the shortest thing to type by hand. A modern client instead sends MCP-Protocol-Version: 2026-07-28 and Mcp-Method headers plus a matching params._meta block — the header and the body must agree, or the request comes back -32020. Real integrations get that from their SDK rather than assembling it by hand.

Server card

A static capability card is served, unauthenticated, at GET /.well-known/mcp/server-card.json:

{
"serverInfo": { "name": "indexone", "version": "1.5.0" },
"authentication": { "required": false, "schemes": ["oauth2", "apiKey"] },
"tools": [ ... ],
"resources": [],
"prompts": []
}

It exists because anonymous scanners — registry crawlers, directory listings, client discovery UIs — cannot complete an MCP handshake without signing in, and would otherwise have nothing to show. The card gives them the server identity, how to sign in and the full tool list without granting access to anything. The server exposes tools only, so resources and prompts are empty. It is static: it does not reflect the caller's team, because there is no caller.

authentication.required is false because the signed-out tools answer without a credential; anything that touches a team's data still asks for sign-in.

Registry manifest

Index One publishes a server.json manifest declaring the name io.indexone/mcp, the title "Index One", and a single remote entry with remotes[0].type = "streamable-http". Clients that browse the MCP registry can find and add the server from that entry without any manual configuration — they still have to authenticate afterwards.