go-sdk
go-sdk copied to clipboard
The official Go SDK for Model Context Protocol servers and clients. Maintained in collaboration with Google.
mcp/protocol: Implement [SEP-973](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/955) specification - Define Icon structure, which includes source, mimeType and sizes. - sizes is any array of strings. refer https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1531 - Support setting websiteUrl, icons for mcp.Implementation...
In `examples/http`, previous HTTP-level logging middleware blocked SSE streaming because `handler.ServeHTTP()` does not return until the connection closes for GET requests (SSE streams). This prevented response headers from being sent...
This PR is the result of spending a few hours going through and attempting to implement SEP 1442 (modelcontextprotocol/modelcontextprotocol#1442). Implemented: - skipping initialization - new protocol version and session ID...
- add a pluggable `ServerSessionStateStore` interface plus an in-memory implementation for persistence - update streamable handler/transport to load, save, and clear session state so serverless deployments can resume conversations -...
Once this module is at v1, we won't make any breaking API changes. But we may make slight behavior changes. For example, our streaming transport implementation may return more fine-grained...
**Is your feature request related to a problem? Please describe.** I have two semi-related questions, caused by uncertainty of how to check client capabilities from an MCP server. 1. How...
We should add this field to StreamableClientTransport: ``` OAuthHandler auth.OAuthHandler ``` The type is defined [here](https://github.com/modelcontextprotocol/go-sdk/blob/main/auth/client.go#L21). I believe that gives us everything we need for auth. It does couple the...
Address an API oversight (#607) by exposing a Supported field on the ClientCapabilities.Roots. Given our promise of compatibility, we unfortunately can't change the Roots field, so this may be the...
Add a UserID field of type string to auth.TokenInfo. A [TokenVerifier](https://pkg.go.dev/github.com/modelcontextprotocol/[email protected]/auth#TokenVerifier) may set this field to a non-empty value if it knows how to find the user ID in the...
https://verialabs.com/blog/from-mcp-to-shell documents some attacks that arise from trusting the authentication URLs served by MCP servers. We should fix this along the lines of https://github.com/modelcontextprotocol/typescript-sdk/pull/877, by preventing certain URL schemes.