Expand description
JSON-RPC dispatch for one HTTP request: version negotiation, header checks, server/discover,
tools/list and tools/call, including confirmation round trips through requestState.
StructsΒ§
- Http
Request - One HTTP request to the MCP endpoint, framework-independent.
- Http
Response - The answer to one HTTP request, framework-independent.
- McpServer
- The MCP server: answers each request with the tools of its registry, run against the state
S. - RpcError π
- Server
Config π - Deployment settings of an
McpServer.
ConstantsΒ§
- CONFIRMATION_
TTL π - DISCOVER_
TTL_ πMS - SERVER_
INFO_ πMETA_ KEY - SERVER_
NAME π - SERVER_
TITLE π - TOOLS_
LIST_ πTTL_ MS - Short, so scope and role changes show up promptly.
FunctionsΒ§
- confirmation_
binding π - Binds a confirmation to the user, the tool and its exact arguments, so a sealed state canβt be replayed by someone else or for another change.
- to_json π
- A protocol value as JSON; one that doesnβt serialize is logged and becomes
null.