feat: add mcp_server_auth_mode and OAuth 2.1 gateway auth docs with gateway-auth page#4522
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds a new ChangesMCP Gateway OAuth Authentication Documentation and Schema
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/mcp/gateway.mdx (1)
314-352:⚠️ Potential issue | 🔴 CriticalComplete documentation of
mcp_external_base_urlsplit and missingmcp_external_server_url.The field refactor is more significant than a simple rename:
mcp_external_base_urlwas split into two distinct fields (mcp_external_server_urlandmcp_external_client_url) in the database migrations (framework/configstore/migrations.go). The current documentation only coversmcp_external_client_urland omitsmcp_external_server_urlentirely. Additionally, this breaking change is not documented in the v1.5.0 migration guide (docs/migration-guides/v1.5.0.mdx), which covers many other breaking changes. The breaking change warning in gateway.mdx correctly applies tomcp_external_client_url, but the documentation should clarify the split, define the purpose of both resulting fields, and ensure the migration guide covers this change.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/mcp/gateway.mdx` around lines 314 - 352, The current documentation in gateway.mdx only describes mcp_external_client_url and completely omits mcp_external_server_url, even though mcp_external_base_url was split into these two distinct fields. Add documentation for mcp_external_server_url in the "Public URL configuration when behind a proxy" section that explains its distinct purpose compared to mcp_external_client_url, clarify that this was a split from the original mcp_external_base_url field, and specify when each field should be used. Additionally, add a breaking change entry to docs/migration-guides/v1.5.0.mdx documenting this split and providing migration guidance for users upgrading from previous versions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/docs.json`:
- Around line 531-533: Fix the indentation of the
"deployment-guides/config-json/source-of-truth" entry in the docs.json file by
adjusting its leading whitespace to align with the adjacent array entries
"deployment-guides/config-json" and
"deployment-guides/config-json/schema-reference" to ensure consistent
indentation throughout the array.
---
Outside diff comments:
In `@docs/mcp/gateway.mdx`:
- Around line 314-352: The current documentation in gateway.mdx only describes
mcp_external_client_url and completely omits mcp_external_server_url, even
though mcp_external_base_url was split into these two distinct fields. Add
documentation for mcp_external_server_url in the "Public URL configuration when
behind a proxy" section that explains its distinct purpose compared to
mcp_external_client_url, clarify that this was a split from the original
mcp_external_base_url field, and specify when each field should be used.
Additionally, add a breaking change entry to docs/migration-guides/v1.5.0.mdx
documenting this split and providing migration guidance for users upgrading from
previous versions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ea0ba857-deb5-467d-ac5f-00861ae1def8
⛔ Files ignored due to path filters (3)
docs/media/ui-mcp-server-auth-mode.pngis excluded by!**/*.pngdocs/media/ui-oauth-consent.pngis excluded by!**/*.pngdocs/media/ui-oauth-grants.pngis excluded by!**/*.png
📒 Files selected for processing (6)
docs/cli-agents/claude-code.mdxdocs/docs.jsondocs/mcp/gateway-auth.mdxdocs/mcp/gateway.mdxdocs/openapi/openapi.jsondocs/openapi/schemas/management/config.yaml
8bff02e to
93724be
Compare
91623fa to
045411d
Compare
93724be to
5da157b
Compare
045411d to
7cae97e
Compare
5da157b to
7d99b9a
Compare
736beb4 to
f48f3dd
Compare
4e3262a to
bf4762b
Compare
f48f3dd to
47877f6
Compare
bf4762b to
72599fb
Compare
47877f6 to
3cbbfba
Compare
3cbbfba to
a69e4b4
Compare
72599fb to
6c0c65f
Compare

Summary
Adds a new
mcp/gateway-auth.mdxdocumentation page covering how inbound MCP clients authenticate to Bifrost's/mcpendpoint, and introduces themcp_server_auth_modeconfiguration field (headers,both,oauth) along with anoauth2_server_configblock for controlling Bifrost's OAuth 2.1 authorization server behavior.Changes
mcp/gateway-auth.mdxpage — documents the three auth modes, the full OAuth 2.1 connect flow (with sequence diagram), identity modes at consent (virtual key, session, user), configuration via UI/API/config.json, grant management, token lifetime and revocation behavior, discovery endpoints, and troubleshooting guidance.mcp_server_auth_modeandoauth2_server_configfields — added to the OpenAPI schema and config YAML.mcp_server_auth_modecontrols whether/mcpaccepts header credentials, Bifrost-issued JWTs, or both.oauth2_server_configexposesissuer_url,auth_code_ttl, andaccess_token_ttl.mcp_external_base_urlrenamed tomcp_external_client_url— clarifies that this field governs Bifrost's outbound OAuth client redirect URI (to upstream servers like Notion/Jira), not the inbound server-side discovery URL.mcp/gateway.mdxupdated — the per-user auth section now references the gateway auth mode and notes that identity establishment differs betweenheadersandboth/oauthmodes. The Claude Code DCR probe note is updated to reflect that inboth/oauthmode the probe is handled correctly and the error doesn't appear.cli-agents/claude-code.mdxupdated — the "Method Not Allowed" troubleshooting note is scoped to the defaultheadersmode and clarifies thatboth/oauthmode serves real Dynamic Client Registration.docs.jsonupdated —mcp/gateway-authadded to the MCP Gateway navigation group; indentation normalized to tabs throughout.ui-mcp-server-auth-mode.png,ui-oauth-consent.png, andui-oauth-grants.pngadded.Type of change
Affected areas
How to test
Navigate to the MCP Gateway section of the docs and verify the new Gateway Authentication page renders correctly, including the sequence diagram, configuration tabs, and screenshots. Confirm the
mcp/gateway.mdxcross-links togateway-authresolve. Verify the renamedmcp_external_client_urlfield appears correctly in the API reference.Screenshots/Recordings
New page includes screenshots of the OAuth consent UI (
ui-oauth-consent.png), the MCP server auth mode config panel (ui-mcp-server-auth-mode.png), and the OAuth grants table (ui-oauth-grants.png).Breaking changes
The
mcp_external_base_urlconfig field is renamed tomcp_external_client_url. Any existing configuration using the old field name will need to be updated.Related issues
Related to the Claude Code DCR probe error reported at anthropics/claude-code#46640.
Security considerations
The new OAuth 2.1 authorization server surface (when
mcp_server_auth_modeisbothoroauth) issues short-lived JWTs signed with an auto-generated RSA key. Refresh tokens rotate on each use. Grants can be revoked from the UI. Inoauthmode, header-based credentials (virtual keys, API keys) are rejected on/mcp, tightening the inbound auth surface. Theaccess_token_ttldefault of 600 seconds bounds the window between a revoke and full enforcement.Checklist
docs/contributing/README.mdand followed the guidelines