MCP
Every capability is an MCP tool of the same name, such as public_holiday or scholarly_search. A tool call takes the same path as the HTTP endpoint: the same validation, invocation_id rule, provider admission, execution record, usage and call log entry.
Endpoint
Section titled “Endpoint”| URL | https://services.zgi.im/v1/mcp |
| Transport | Streamable HTTP, stateless; every response is one application/json object, never an SSE stream |
| Authentication | As for the HTTP API: Authorization: Bearer <service credential> |
| Protocol versions | 2026-07-28 (stateless), 2025-11-25, 2025-06-18 (handshake) |
Client configuration
Section titled “Client configuration”claude mcp add --transport http zgi-services https://services.zgi.im/v1/mcp \ --header "Authorization: Bearer $ZGI_SERVICES_TOKEN"~/.cursor/mcp.json:
{ "mcpServers": { "zgi-services": { "url": "https://services.zgi.im/v1/mcp", "headers": { "Authorization": "Bearer zsk_..." } } }}Any client that supports remote MCP (Streamable HTTP) with custom headers:
{ "type": "http", "url": "https://services.zgi.im/v1/mcp", "headers": { "Authorization": "Bearer zsk_..." }}tools/listreturns only tools you are scoped for that have at least one available provider; it is not paginated.inputSchemais the HTTP request body: the same fields, required list and descriptions, withadditionalProperties: false.providercarries anenumof the providers you may select.outputSchemadescribes the success{execution, result}, exactly the HTTPdata.- Every tool is a read-only query:
readOnlyHint: true,destructiveHint: false,openWorldHint: true.
Calls and errors
Section titled “Calls and errors”{"jsonrpc":"2.0","id":7,"method":"tools/call","params":{"name":"public_holiday","arguments":{ "invocation_id":"inv_8842","provider":"holiday-cn","region":"CN", "start_date":"2026-10-01","end_date":"2026-10-10"}}}| Case | Result |
|---|---|
| Success | isError: false; structuredContent is {execution, result} and content[0].text is the same JSON |
| Tool error (validation, provider failure, duplicate invocation, unknown outcome, …) | isError: true; content[0].text is JSON {"error_code", "message", "request_id", "execution"?, "retry_after_seconds"?} with the HTTP error codes |
| Unknown tool, or a tool outside your scopes | JSON-RPC error -32602 (indistinguishable) |
Protocol details
Section titled “Protocol details”2026-07-28(stateless): every request sendsMCP-Protocol-VersionandMcp-Method, andtools/callalsoMcp-Name, matching the body’s version, method and tool name; otherwise400with-32020. Unknown methods return404with-32601.server/discoveris supported.2025-11-25,2025-06-18(handshake):initializenegotiates the version, falling back to2025-11-25for an unsupported request.- An unsupported version returns
400with-32022, listing the supported versions indata. - No
Mcp-Session-Idis issued; batches (JSON arrays) return-32600; notifications (noid) return202;GETandDELETEreturn405.
Debugging with curl
Section titled “Debugging with curl”curl -sS https://services.zgi.im/v1/mcp \ -H "Authorization: Bearer $ZGI_SERVICES_TOKEN" \ -H 'Content-Type: application/json' \ -H 'Accept: application/json, text/event-stream' \ -H 'MCP-Protocol-Version: 2025-11-25' \ -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'