Skip to content

Add OAuth support for remote MCP servers#302

Open
rohitprasad15 wants to merge 1 commit into
mainfrom
feat/mcp-oauth
Open

Add OAuth support for remote MCP servers#302
rohitprasad15 wants to merge 1 commit into
mainfrom
feat/mcp-oauth

Conversation

@rohitprasad15

Copy link
Copy Markdown
Collaborator

HTTP MCP servers can declare an oauth block (client id/secret + scopes) in mcp.json: first use opens a one-time browser consent (PKCE + localhost redirect), tokens are cached in the SecretStore and refreshed automatically, with a forced refresh on 401. Defaults target Google's hosted Calendar/Gmail MCP servers; endpoints are overridable for other providers. Tested with 10 new unit tests; full platform suite green.

HTTP MCP servers can now declare an oauth block (client_id, client_secret,
scopes) in mcp.json. First use opens the system browser for consent via a
localhost loopback redirect; tokens are cached in the SecretStore (profile
mcp-oauth:<server>) and refreshed silently, with a one-shot forced refresh
on 401. Endpoint defaults target Google's hosted Workspace MCP servers
(Calendar/Gmail), which take a developer-created OAuth client and do not
support dynamic client registration; authorize_url/token_url are
overridable for other providers.

Co-authored-by: Devika <dr.drp8226@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant