go-sdk/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Yaroslav 2b7c9937e6
mcp: align resource not found error code with sep-2164 (#931)
Change the error code returned by ResourceNotFoundError from -32002 to
-32602 (jsonrpc.CodeInvalidParams), aligning with
[SEP-2164](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2164).

* Not gated with a protocol version check, because the previous error
code was never formally specified and the behaviour varied across SDKs.
* In case clients which rely on the old error code exist, the previous
behaviour can be restored with `MCPGODEBUG=customresnotfounderrcode=1`.
* `CodeResourceNotFound` deprecated since its only purpose going forward
is backward compatibility. The new code should use
`jsonrpc.CodeInvalidParams` directly.
* `CodeResourceNotFound` changed to `var` so it can stay in sync with
`ResourceNotFoundError` and existing code doing `code ==
mcp.CodeResourceNotFound` keeps working in both the default and compat
modes.
2026-05-05 16:20:02 +02:00
..
images Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
client.md mcp: add Capabilities fields to ServerOptions and ClientOptions (#713) 2025-12-11 20:17:46 -05:00
CNAME Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
contributing.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
mcpgodebug.md mcp: align resource not found error code with sep-2164 (#931) 2026-05-05 16:20:02 +02:00
protocol.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
quick_start.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
README.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
rough_edges.md mcp: remove default cross origin protection (#906) 2026-04-24 11:35:22 +02:00
server.md Add documentation backed by mkdocs (#883) 2026-04-09 14:25:43 +02:00
troubleshooting.md mcp: update latestProtocolVersion to 2025-11-25 (#724) 2026-03-03 10:30:11 +01:00

Overview

The SDK consists of several importable packages:

These docs mirror the official MCP spec. Use the index below to learn how the SDK implements a particular aspect of the protocol.

Base Protocol

  1. Lifecycle (Clients, Servers, and Sessions).
  2. Transports
    1. Stdio transport
    2. Streamable transport
    3. Custom transports
  3. Authorization
  4. Security
  5. Utilities
    1. Cancellation
    2. Ping
    3. Progress

Client Features

  1. Roots
  2. Sampling
  3. Elicitation

Server Features

  1. Prompts
  2. Resources
  3. Tools
  4. Utilities
    1. Completion
    2. Logging
    3. Pagination

TroubleShooting

See troubleshooting.md for a troubleshooting guide.

Backwards compatibility

See mcpgodebug.md for a list of backwards incompatible behavior changes and description how they can be temporarily undone.

Rough edges

See rough_edges.md for a list of rough edges or API oversights that can't be addressed due to our compatibility promise. We'll revisit these if/when we move to a v2 of the SDK.