docs(mcp-oauth): document oauth2_flow as required for oauth2 MCP servers - #505
Merged
Merged
Conversation
auth_type: oauth2 servers in config.yaml now require an explicit oauth2_flow (client_credentials or authorization_code); the proxy raises at startup when it is missing and no longer infers the flow from field shape for config entries (BerriAI/litellm#32292). Add the field to every oauth2 config example, update the mcp_oauth config reference row from optional-with-inference to required, and map each flow to its value in the flow comparison table. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
What
Updates every
auth_type: oauth2MCP server config example to include the now-requiredoauth2_flowfield, and corrects the config reference to match current behavior.Since BerriAI/litellm#32292, an
auth_type: oauth2server inconfig.yamlmust declareoauth2_flow: client_credentials(M2M) oroauth2_flow: authorization_code(interactive PKCE, includingdelegate_auth_to_upstream). The proxy raises aValueErrorat startup when the field is missing or invalid, and no longer infers the flow from field shape for config entries. Only legacy DB rows created before the field existed still fall back to shape inference at request time.Without this change, every oauth2 config example in the docs fails proxy startup on current builds.
Resolves LIT-4251
Changes
docs/mcp_oauth.md: adds anoauth2_flowcolumn to the flow comparison table so the interactive flow visibly maps toauthorization_code; adds the field to the interactive setup, M2M setup, mock-server test config, and delegate-auth examples; rewrites theoauth2_flowconfig reference row from optional-with-inference to required; adds the field to the delegate section's config reference.docs/mcp_control.md,docs/tutorials/claude_mcp.md,docs/mcp.md: addsoauth2_flowto the remaining oauth2 examples (authorization_codefor all; they are interactive GitHub/Atlassian setups) and a sentence in mcp.md stating the flow must be declared.Screenshots
Each pair below renders the affected doc section from a local Docusaurus build,
mainon the left and this branch on the right.docs/mcp_oauth.md
The flow comparison table gains an
oauth2_flowcolumn so each flow visibly maps to its config value.The config reference row for
oauth2_flowmoves from optional with shape inference to required, and states that the proxy refuses to start when it is missing.The interactive PKCE and machine-to-machine setup examples now declare the flow explicitly.
The delegate-auth example and its config reference add
oauth2_flow: authorization_code, since delegated servers are interactive.docs/mcp.md, docs/mcp_control.md, docs/tutorials/claude_mcp.md
The remaining oauth2 examples across these pages pick up the field, and the mcp.md overview adds a sentence explaining that the flow must be declared.
Note on timing
This documents the behavior on
litellm_internal_staging(required-in-config landed 2026-07-07). If the docs site should track the latest stable release, hold merging until that change ships; the examples themselves are forward-compatible either way since the field is accepted on older versions that still infer.🤖 Generated with Claude Code
Link to Devin session: https://app.devin.ai/sessions/f03da2725ec94d28b3facf766871b102