Predict what happens when a client calls resources/subscribe on a server that did not advertise it
A client completes the initialize handshake with a server. The server's capabilities response does not include the `resources` capability object at all. The client proceeds to send a `resources/subscribe` request for URI `file:///data/config.json`.
The server returns a JSON-RPC error, usually code -32601 Method not found. The deeper point: a correct client never sends this call, because the missing capability was visible at initialize time.
Think of moving into an apartment. On day one the landlord hands you a sheet listing which utilities are connected: water, electricity, internet. Suppose the sheet says nothing about a phone line. If you later pick up a phone and dial, you get dead silence or an error tone, because that service was never wired up. A careful tenant reads the sheet first and simply does not reach for the phone. In MCP, the initialize handshake is that sheet. The server lists which capabilities it offers. If resources is absent and the client calls resources/subscribe anyway, the server replies with an error. But the real mistake happened earlier: the client should have read the sheet and disabled the feature.
Detailed answer & concept explanation~7 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: predict the -32601 error, explain why JSON-RPC forces a response, then pivot to capability negotiation and where the real client bug lives, plus the nested subscribe sub-flag nuance.
| Behavior | Naive client | Capability-aware client |
|---|---|---|
| Reads capabilities at initialize | No, calls methods blindly | Yes, builds feature set from it |
| Calling resources/subscribe here | Sends it, gets -32601 | Never sends it, feature disabled |
| Failure mode | Runtime JSON-RPC error | Graceful degradation at startup |
| Log noise | High, errors used as discovery | Low, no avoidable error traffic |
Real products, models, and research that use this idea.
- Claude Code and Cursor inspect each MCP server's capabilities at session start and only surface tools or resources the server actually advertised.
- The official MCP TypeScript and Python SDKs route calls to unregistered methods through a JSON-RPC -32601 Method not found response.
- mcp-inspector lets you watch the initialize response and confirm whether a server declared resources with a subscribe sub-flag before you wire up subscriptions.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does subscribe differ from a server that advertises resources but not subscriptions?
QWhy does MCP negotiate capabilities up front instead of letting clients probe by trial and error?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Predicting a silent no-op or a crash. The server returns a structured JSON-RPC error, and the real fault is the client skipping capability inspection.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.