Skip to content

Commit 81e14b5

Browse files
committed
docs: document HTTP 404 / -32601 response for unsupported RPC methods
1 parent ad108c5 commit 81e14b5

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

docs/specification/draft/basic/transports.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ listing its supported versions. See
267267
[Lifecycle: Protocol Version Negotiation][lifecycle-version]
268268
for the negotiation flow.
269269

270+
If the server does not implement the requested RPC method, it **MUST** respond
271+
with `404 Not Found` and a JSON-RPC error with code `-32601`
272+
(`Method not found`).
273+
270274
For backward compatibility, if the server does _not_ receive an
271275
`MCP-Protocol-Version` header and has no other way to identify the version,
272276
the server **SHOULD** assume protocol version `2025-03-26`.

docs/specification/draft/server/discover.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,3 @@ is useful in two scenarios:
8282

8383
See [Protocol Version Negotiation](/specification/draft/basic/lifecycle#protocol-version-negotiation)
8484
for the full version-selection flow.
85-
86-
## Unsupported RPCs
87-
88-
If a client calls an RPC the server does not implement, the server **MUST**
89-
return a `Method not found` JSON-RPC error (`-32601`). On HTTP the response
90-
status **MUST** be `404 Not Found`.

0 commit comments

Comments
 (0)