
This fix is part of MCP troubleshooting, within The MCP Guide. Still stuck? Request a free MCP readiness review.
"Resource not found" means a client asked an MCP server to read a resource URI the server does not have. The fastest fix is to list the server's resources and resource templates, then read with the exact URI the server returned. If you build the server, return a proper error for unknown URIs instead of an empty result. Note the code changed: the 2026-07-28 spec uses -32602 (Invalid Params), while 2025-era servers used -32002.
Checked against: the Resources page, the base protocol error codes and the changelog of the 2026-07-28 spec, plus Claude Code's MCP docs, on 2 November 2026. eSEOspace did not run these steps.
Key Takeaways
- A server must return a JSON-RPC error with code
-32602when a requested resource does not exist, per the 2026-07-28 spec. - Earlier revisions used
-32002; the spec says clients "SHOULD also accept" it from older servers. - Servers "MUST NOT" return an empty
contentsarray for a missing resource, because that is ambiguous. - Most client-side cases are a URI typo, a wrong scheme, or a template filled in incorrectly.
- In Claude Code, reference resources with
@server:protocol://resource/pathand pick from the@menu to avoid typos.
What this error means
Resources are read-only data a server exposes by URI, such as file:///project/README.md or db://customers/schema. A client calls resources/list to see fixed resources, resources/templates/list to see parameterized ones, and resources/read to fetch one. Our resources explainer covers the basics.
The Resources page says: "If the requested resource does not exist, servers MUST return a JSON-RPC error with code -32602 (Invalid Params). Servers SHOULD return -32603 for internal errors." Its example:
{
"jsonrpc": "2.0",
"id": 5,
"error": {
"code": -32602,
"message": "Resource not found",
"data": { "uri": "file:///nonexistent.txt" }
}
}
The changelog explains the change: the resource-not-found code moved from -32002 to -32602 "to align with JSON-RPC specification." The base protocol page says 2026-07-28 implementations must not emit -32002, but clients should still accept it from servers on earlier versions.
Because -32602 also means "invalid params" in general, read the message and data.uri fields to tell a missing resource from a malformed request. See -32602 invalid params.
Quick fix
- List what exists. Call
resources/listandresources/templates/list(the Inspector's Resources tab does both). - Copy the URI exactly. Scheme, slashes, case and encoding all count.
file:///a.txthas three slashes. - Fill templates correctly. For a template like
db://tables/{name}, substitute the value and URL-encode it if needed. Our resource templates guide shows the pattern. - Check the data still exists. A file may have moved, or a record was deleted since the list was cached.
- Check permissions. A server may treat "not allowed" as "not found" for sensitive resources.
- Reconnect if the server's resource list changed and your client has an old copy.
Fix by client / OS
Claude Code
Claude Code's docs say to type @ to see resources from all connected servers, then reference one as @server:protocol://resource/path. Choose from the autocomplete instead of typing the URI. If a server changed its resources, Claude Code keeps the previously discovered list until a refresh succeeds, so reconnect from /mcp to pick up changes.
MCP Inspector
List resources and templates in the web UI, or from the CLI. The Inspector configuration page lists --method and --uri among the invocation flags:
npx @modelcontextprotocol/inspector --cli node path/to/server.js --method resources/list
npx @modelcontextprotocol/inspector --cli node path/to/server.js --method resources/read --uri "file:///path/to/file.txt"
If the read works here but not in your client, the client is sending a different URI. See MCP Inspector connection errors.
Your own server
- Return
-32602withdata.urifor unknown URIs on 2026-07-28. Never return an emptycontentsarray. - Return
-32603for internal failures, so clients can tell "missing" from "broken." - Validate and sanitize URIs. The spec requires servers to prevent directory traversal when serving
file://resources. - If you serve 2025-era clients too, keep in mind their SDKs may expect
-32002.
Your own client
Treat both -32602 (with a resource-not-found message) and -32002 as "not found," as the spec advises, and show the URI to the user.
Where to find the logs
- Claude Code:
claude --debug-file /tmp/claude-debug.log. - VS Code: MCP: List Servers > Show Output, per the manage and troubleshoot page.
- Claude Desktop:
~/Library/Logs/Claude/mcp*.logon macOS or%APPDATA%\Claude\logson Windows, per the MCP debugging guide. - Your server: log every
resources/readURI to stderr (never stdout on stdio).
If it still fails
- URI has spaces or non-ASCII characters. On Streamable HTTP the URI is mirrored in the
Mcp-Nameheader, and clients must Base64-encode values that are not plain ASCII. A mismatch there gives-32020 HeaderMismatch, not not-found. - The server does not declare resources. Servers that support resources must declare the
resourcescapability. Without it, a call may return-32601instead. See -32601 method not found. - Stale cache. In 2026-07-28, list results carry a
ttlMsfreshness hint, so a client may reuse an old list for a while. - Unsure what a code means. Use our MCP error code lookup.
Next step
If your server exposes resources and you want them to work reliably across clients, eSEOspace's MCP development team can review URI design and error handling. Related reading: tool errors vs protocol errors.
More in the MCP Guide
Free tools: MCP Error Code Lookup · MCP Config Generator
Latest research: State of MCP: October 2026
Frequently asked questions
Why did the resource not found code change?
The 2026-07-28 changelog moved it from -32002 to -32602 to align with the JSON-RPC specification. The -32002 code stays reserved and will not be reused.
Is an empty contents array a valid "not found" answer?
No. The spec says servers MUST NOT return an empty contents array for a non-existent resource, because it could also mean the resource exists but is empty.
How do I tell resource not found from other -32602 errors?
Check the message and data fields. The spec example uses the message "Resource not found" and puts the missing URI in data.uri.
Can I read a resource that is not in resources/list?
Yes, if it matches a resource template. Templates describe whole families of URIs, so a valid URI may never appear in the fixed list.











