For builders implementing Shōkai. A visiting agent doesn't need this; follow the place's guide and the door's replies.
What the MCP binding (SPEC §11.3) uses from MCP revision 2026-07-28 (informative)
Informative notes for SPEC.md §11.3, written in our own words so an implementer reading the bundle offline knows which parts of the Model Context Protocol the binding relies on. The MCP specification is the normative source: https://modelcontextprotocol.io/specification/2026-07-28 (its changelog: https://modelcontextprotocol.io/specification/2026-07-28/changelog). Checked on 2026-10-27. Where these notes and MCP differ, MCP wins.
How Shōkai makes MCP better
MCP lets an agent call a server's tools; it doesn't say whose agent is calling, why, or what it may do. A Shōkai door in front of an MCP server answers those first: the visiting representative introduces itself (whose it is, why it came, which tools it needs), the door reviews and decides on signed facts, the host representative welcomes the visitor, and a grant gives it a pass (the specification's seat) with only the tools granted, within its owner's limits. Only those tools show in tools/list, and every tools/call carries a signed act that is checked against the pass. MCP itself is unchanged. (Diagram; in plain words: How Shōkai makes MCP better.)
What §11.3 relies on
- Streamable HTTP, one endpoint. The server has one MCP endpoint that accepts
POST. Every JSON-RPC 2.0 request or notification is its ownPOST; the body is a single message. The client sendsAccept: application/json, text/event-stream, and a request is answered with either one JSON object or a short SSE stream ending in the response. - Notifications. A notification
POSTthat the server accepts is answered202 Acceptedwith no body. - Request headers. Every
POSTcarriesMCP-Protocol-Version(for this revision,2026-07-28), which must match the version the request names in its_meta, and the routing headersMcp-MethodandMcp-Name. A server that doesn't support the requested version answers400with anUnsupportedProtocolVersionerror listing what it supports. - No handshake, no sessions. Revision 2026-07-28 removed the
initialize/notifications/initializedhandshake and theMcp-Session-Idheader. Each request carries its protocol version, client capabilities and client info inparams._meta.server/discover(which servers implement) tells a client the supported versions and capabilities; calling it is optional. - Tools.
tools/listlists tools (name,description,inputSchema, any JSON Schema 2020-12);tools/callhasparams: {name, arguments}and a result withcontentand optionalisError. Results carryresultType("complete"for an ordinary result); list results carryttlMsandcacheScope. - Errors. A tool's own failure is a result with
isError: true. A refusal is a JSON-RPC error.
How §11.3 maps onto it
- The
Shokai-ActandShokai-Seatheaders ride alongside MCP's own headers on thetools/callPOST. The act'stoolequalsparams.name(andMcp-Name), and itsargumentsequalparams.argumentsby digest. - Open methods. §11.3 lists the methods a place answers without a seat. Under 2026-07-28 these are
server/discoverand the listing methods.initialize,pingandnotifications/initializedexist only in earlier revisions; a place that also serves earlier revisions answers them without a seat too. The reference gate (@kigenka/shokai/mcp) does both. - Sessions. "An MCP session is not a seat" applies to earlier revisions, which had
Mcp-Session-Id. Under 2026-07-28 there are no sessions, and every call carries its act anyway. - Refusals. §11.3 answers a refused call with HTTP
200and JSON-RPC error-32012withdata.shokai(v0.5.0;-32040, inside MCP's reserved range, was the code before it: item 1 below).
Known tensions
- The refusal code (resolved in v0.5.0). MCP 2026-07-28 reserves JSON-RPC server-error codes
-32020to-32099for the MCP specification. v0.4.0 and earlier used-32040, inside that range; v0.5.0 uses-32012, outside it. Clients should still read-32040from older places. - The handshake (resolved in v0.5.0). The SDK's conformance runner first calls
server/discoverwithMCP-Protocol-Version: 2026-07-28and_meta; only if the server doesn't answer it does it fall back toinitializewith2025-06-18, for a server on an earlier revision. - HTTP status for a refusal. MCP answers some transport errors with
4xx(version, header mismatch, unknown method). A Shōkai refusal is a protocol answer about the act, not a transport error, so §11.3 keeps200with the JSON-RPC error.