Conversation
Remote MCP servers that authenticate with OAuth (Notion, Google, Slack,
GitHub, ...) can now be connected from Settings, per workspace, without
any Highflame dependency. Firehog routing stays a later alternative behind
the McpCredentialSource seam.
- Config: `oauth: true | {clientId, clientSecretEnv, scopes}` on an http
registry server; `mcpOAuth.redirectBaseUrl` for a tunnelled daemon.
- Engine (src/daemon/mcp/oauth.ts) on the official MCP SDK's auth():
discovery, dynamic registration, PKCE, resource indicators, refresh
(single-flight, and on a 401). Credentials per tenant, keyed by server
URL too, in an owner-only store.
- mcp.oauth.begin / complete / disconnect (settings:write), a callback
route, and Settings controls with a paste fallback.
- Login CSRF: the callback completes only for the browser that began the
sign-in (binding cookie); otherwise only the starting tenant can finish
it by pasting.
- The daemon-run backends (openai, gemini, pi) call OAuth servers with
the tenant's token. Native-mount backends (claude, codex, gemini-cli,
qwen) leave them unmounted for now rather than bake a token into the
agent process; Settings says so.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Collaborator
Author
|
Auto-fixed by pr-shepherd (iteration 1):
Re-running CI. No content changes beyond the rebase. |
Collaborator
Author
|
pr-shepherd: CI is green on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remote MCP servers that use OAuth (Notion, Google, Slack, GitHub and most SaaS servers) can now be connected from Settings → MCP Servers, per workspace.
codeoid runs the whole flow itself, with no Highflame dependency.
Routing through Firehog remains a later option behind the
McpCredentialSourceseam.Design:
docs/mcp-oauth-design.md.What's in it
"oauth": trueto an http registry server, or{clientId, clientSecretEnv, scopes}for a pre-registered client. SetmcpOAuth.redirectBaseUrl(orCODEOID_MCP_OAUTH_REDIRECT_BASE_URL) for a daemon behind a tunnel.src/daemon/mcp/oauth.ts): runs on the official SDK'sauth().mcp.oauth.begin/complete/disconnect, all requiringsettings:write, plus the/mcp/oauth/callbackroute.Security (from an independent review round, all addressed)
no-store,no-referrerand a strict CSP.Test plan
src/tests/mcp-oauth.test.ts(28): runs against a local spec-shaped authorization server plus MCP server.mcp.oauth.*handlers, the login-CSRF refusal, URL binding, the pending cap and per-tenant status.src/tests/mcp-oauth-server.test.ts(3): a real daemon. Begin over the socket, then the provider redirect into the actual callback route, then settings show the server connected. Also covers a browser without the binding (refused, then finished by paste) and an escaped failure page.McpOAuthControls.test.tsx(3).🤖 Generated with Claude Code