go-sdk/internal
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Sam Thanawalla 069aae16df
mcp: add client-side OAuth flow (#544)
This is a preliminary implementation of OAuth 2.1 for the client.

When a StreamableClientTransport encounters a 401 Unauthorized response
from the server, it initiates the OAuth flow described in thec
authorization section of the MCP spec

(https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization).
On success, the transport obtains an access token which it passes
to all subsequent requests.

Much remains to be done here:

* Resource Indicators, as described in section 2.5.1 of the MCP spec.

* All of this is unexported, so it is available only to our own
StreamingClientTransport. We should add API so people can use it
with their own transports.

* And, of course, tests. We should test against fake implementations
but also, if we can find any, real reference implementations.

For #19
Co-authored-by: Jonathan Amsterdam <jba@google.com>

---------

Co-authored-by: Jonathan Amsterdam <jba@google.com>
2025-09-30 16:16:30 -04:00
..
docs all: more minor cleanup (#547) 2025-09-30 16:07:07 -04:00
jsonrpc2 many: minor cosmetic changes (#529) 2025-09-25 16:06:24 -04:00
oauthex mcp: add client-side OAuth flow (#544) 2025-09-30 16:16:30 -04:00
readme README: remove caveats (#543) 2025-09-29 15:33:35 -04:00
testing internal/testing: add copyright header (#477) 2025-09-16 21:43:18 -04:00
util internal/util: move FieldJSONInfo into jsonschema/util (#251) 2025-08-06 12:07:57 -04:00
xcontext x/tools: modernize interface{} -> any 2025-02-19 15:14:27 -08:00