Learning resourcesReviewed · Model Context Protocol

SEP-2164: Standardize Resource Not Found Error Code

SEP-2164 is an accepted Model Context Protocol proposal for client and server developers, with the catch that it is preserved as a historical record. It specifies JSON-RPC error code -32602 for missing resources, recommends including the requested URI and explains migration from inconsistent SDK behavior.

Researched 23 Nov 2026

In short.

SEP-2164 is an accepted proposal for developers handling missing resources in Model Context Protocol, with the main limitation that later protocol changes are not reflected. Its accepted text requires error code -32602, recommends including the missing URI and prohibits representing a nonexistent resource with an empty contents array. It offers useful implementation rationale and migration guidance, but current protocol requirements and SDK adoption are not established here. No software was executed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the complete selected documentation page at [https://modelcontextprotocol.io/seps/2164-resource-not-found-error.md], including its Final and historical-record notice, SDK comparison, requirements, example, rationale, compatibility guidance and security statement. Linked pages, the documentation index, current specification, changelog, pull request and SDK source files are excluded. No code was executed, and current implementation behavior was not assessed.

The overview

Identity

SEP-2164, Standardize Resource Not Found Error Code, is a Standards Track proposal marked Final, authored by Peter Alexander and created on 28 January 2026. The source is [https://modelcontextprotocol.io/seps/2164-resource-not-found-error.md]. Its notice describes the page as a historical record of the accepted design and directs readers to the current specification for authoritative requirements.

Assessment

The document is useful for understanding why missing-resource errors differed across MCP implementations and how this proposal sought to standardize them. Its concrete response example and migration guidance support implementation discussions. Decisions about present-day compliance require the current specification and relevant SDK version, neither of which is established by this page.

Users

The clearest audience is developers implementing MCP servers, clients or SDKs. Server authors can understand the proposed response contract; client authors can understand compatibility concerns. Beginners will benefit from familiarity with JSON-RPC requests, error responses and URIs before applying the details.

Capabilities

The proposal defines how to signal that a requested resource does not exist, supplies an example error object, compares documented SDK behavior and outlines migration. It also explains why an empty contents array is ambiguous: it cannot distinguish a missing resource from an existing resource with no content.

Using it

Requirements

Within the accepted proposal, a server must return JSON-RPC error code -32602, Invalid Params, when the requested resource does not exist. The error data should include the missing URI; this is recommended rather than mandatory. Servers must not return an empty contents array for a nonexistent resource. No package, runtime or SDK version requirement is supplied.

Mechanism

The design treats a URI that identifies no resource as an invalid request parameter. The server returns an error object containing code -32602 and a descriptive message, with the URI preferably included in error.data.uri. The proposed transition asks clients to accommodate both -32602 and the previously recommended -32002.

Setup

The page provides migration steps: SDKs should change their missing-resource error to -32602, clients should accommodate the old and new codes during transition, and the specification should identify the canonical code. It supplies no installation commands, configuration settings, release schedule or confirmation that particular SDK releases adopted the change.

Example

For a missing resource at file:///nonexistent.txt, the page gives this response: {"jsonrpc":"2.0","id":2,"error":{"code":-32602,"message":"Resource not found","data":{"uri":"file:///nonexistent.txt"}}}. This is a documentation example; no request was sent and no server response was observed.

Assessment & evidence

Limitations

The SDK comparison is not tied to release versions or commit identifiers. The abstract cites four of six SDKs using -32002, while the later table lists five of ten; those different counts are not reconciled. The table therefore cannot establish behavior for a particular installed SDK.

A practical limitation follows from choosing the general Invalid Params code: -32602 alone cannot uniquely identify a missing resource. Request context or additional error details would be needed to distinguish it from other invalid-parameter failures. The proposal does not define a dedicated machine-readable subtype.

Reasoning

The author argues that a nonexistent URI is an invalid parameter and that the standard JSON-RPC code -32602 fits that meaning. The page also argues that the -32000 to -32099 range is reserved for implementation-defined server errors. Standardizing behavior could simplify interoperability, but the document provides no measured compatibility improvement. Its claim of minimal practical migration impact is an argument, not a demonstrated result.

Alternatives

The principal alternative discussed is the custom -32002 code previously recommended for missing resources. Codes 0 and -32603 appear as divergent SDK behaviors, rather than recommended replacements. For authoritative requirements, the page points to [https://modelcontextprotocol.io/specification/latest.md]; that linked specification was not assessed.

Evidence

The page supplies the accepted proposal text, a response example, an SDK comparison, rationale and migration guidance. Its linked SDK source files, pull request and external standards were not assessed. Actual SDK behavior, interoperability and security outcomes remain unverified; no software was executed.

Access & freshness

Costs

The page states no access fee, implementation price or cost estimate. The effort needed to change an SDK, update clients or maintain transitional compatibility is not quantified. Costs remain unknown.

Rights

The supplied page does not state a license or redistribution terms. Permission to redistribute the document or reuse its examples is unknown from this evidence. Licenses for linked SDK repositories were not assessed.

Freshness

The proposal was created on 28 January 2026 and is marked Final in the page captured on 23 November 2026. Its notice explicitly warns that later protocol changes are omitted. The finalization date, last substantive update, current SDK adoption and currently effective protocol requirements are unknown from this page.

Actions

Before applying the design, consult the current specification and changelog, then establish how the relevant SDK version handles missing resources. Implementation checks should distinguish nonexistent resources from existing resources with empty content, inspect the returned error and URI, and cover transitional client behavior. Avoid classifying every -32602 response as a missing resource solely from its numeric code. These are suggested checks; none were performed.

Evidence for this report

selected-page.txtselected · checked 2026-11-23