JSON-RPC Methods
What the handler answers, and on which era.
Every method below is implemented for you. You never register a method — you declare tools, resources, and prompts, and the methods that expose them exist.
#Shared
| Method | Answers with |
|---|---|
tools/list | Declared tools, paginated, schemas resolved |
tools/call | Tool result, after validating arguments |
resources/list | Declared resources, paginated |
resources/read | Resource contents; falls back to URI templates |
resources/templates/list | Declared resource templates, paginated |
prompts/list | Declared prompts, paginated |
prompts/get | Prompt messages, after checking required args |
completion/complete | Values from a complete callback |
#Modern Only
| Method | Answers with |
|---|---|
server/discover | Versions, capabilities, instructions, identity (cacheable) |
subscriptions/listen | A long-lived SSE stream of opted-in notifications |
#Legacy Only
| Method | Answers with |
|---|---|
initialize | Negotiated version, capabilities, serverInfo |
notifications/initialized | Accepted, no-op |
ping | Empty result |
notifications/cancelled | Aborts the named in-flight request (alias: notifications/canceled) |
notifications/progress | Invokes onProgress |
resources/subscribe | Invokes onSubscribe |
resources/unsubscribe | Invokes onUnsubscribe |
logging/setLevel | Invokes onLogLevelSet |
An unknown method is -32601, with HTTP 404 on the modern era.
#Pagination
tools/list, resources/list, resources/templates/list, and prompts/list are cursor-paginated. Clients pass the nextCursor from the previous page; the cursor is opaque and validated, so a malformed one is -32602 rather than an unbounded read.
curl -X POST http://localhost:3000/mcp \
-H 'content-type: application/json' \
-d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list",
"params": { "cursor": "eyJvZmZzZXQiOjEwfQ==" } }'#Capabilities
Capabilities are derived, never declared by hand:
| Capability | Advertised when |
|---|---|
tools | at least one tool |
resources | at least one resource or resource template |
prompts | at least one prompt |
completions | any prompt argument or template has a complete callback |
logging | onLogLevelSet (legacy) or logging: true (modern) |
resources.subscribe | onSubscribe (legacy) or onListen (modern) |
*.listChanged | always (legacy) · onListen (modern) |
extensions | extensions is set (modern) |
Read more in Protocol eras.