claude-code - 💡(How to fix) Fix [DOCS] MCP OAuth docs omit `client_secret_post` support for pre-configured credentials [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52620Fetched 2026-04-24 06:02:15
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3

Error Message

Some MCP servers don't support automatic OAuth setup via Dynamic Client Registration. If you see an error like "Incompatible auth server: does not support dynamic client registration," the server requires pre-configured credentials. Claude Code also supports servers that use a Client ID Metadata Document (CIMD) instead of Dynamic Client Registration, and discovers these automatically. If automatic discovery fails, register an OAuth app through the server's developer portal first, then provide the credentials when adding the server.

RAW_BUFFERClick to expand / collapse

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/mcp#use-pre-configured-oauth-credentials

Section/Topic

Use pre-configured OAuth credentials for MCP servers, plus the related MCP_CLIENT_SECRET environment variable reference.

Current Documentation

The docs currently say:

Some MCP servers don't support automatic OAuth setup via Dynamic Client Registration. If you see an error like "Incompatible auth server: does not support dynamic client registration," the server requires pre-configured credentials. Claude Code also supports servers that use a Client ID Metadata Document (CIMD) instead of Dynamic Client Registration, and discovers these automatically. If automatic discovery fails, register an OAuth app through the server's developer portal first, then provide the credentials when adding the server.

Use --client-id to pass your app's client ID. The --client-secret flag prompts for the secret with masked input:

  • The client secret is stored securely in your system keychain (macOS) or a credentials file, not in your config

The env var reference also says:

MCP_CLIENT_SECRET — OAuth client secret for MCP servers that require pre-configured credentials. Avoids the interactive prompt when adding a server with --client-secret

What's Wrong or Missing?

These pages explain how to supply and store a client secret, but they do not document that Claude Code uses that stored secret during the OAuth token exchange for servers that require client_secret_post token-endpoint authentication.

Changelog v2.1.119 makes this supported behavior explicit:

Fixed MCP OAuth client secret stored via --client-secret not being sent during token exchange for servers requiring client_secret_post

Without this detail, users cannot tell whether --client-secret is expected to work with OAuth servers that require client_secret_post, or whether a failed token exchange means the server is unsupported.

Suggested Improvement

Add a short compatibility note in Use pre-configured OAuth credentials stating that Claude Code sends the stored client secret during the OAuth token exchange, including for servers that require client_secret_post.

Also add a brief troubleshooting/version note such as:

client_secret_post support for MCP OAuth token exchange requires Claude Code v2.1.119 or later.

The MCP_CLIENT_SECRET env var entry should cross-reference the same behavior so CI users know the environment variable is used for the token exchange, not just for initial setup.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageContext
https://code.claude.com/docs/en/mcpPrimary MCP OAuth setup guide for pre-configured credentials, --client-secret, and --client-id
https://code.claude.com/docs/en/env-varsReference entry for MCP_CLIENT_SECRET

Total scope: 2 pages affected

Source: Changelog v2.1.119

Exact changelog entry: Fixed MCP OAuth client secret stored via --client-secret not being sent during token exchange for servers requiring client_secret_post

extent analysis

TL;DR

Add a compatibility note to the Use pre-configured OAuth credentials documentation to clarify that Claude Code sends the stored client secret during OAuth token exchange, including for servers that require client_secret_post.

Guidance

  • Update the Use pre-configured OAuth credentials section to include a note about the stored client secret being sent during token exchange for client_secret_post servers.
  • Add a troubleshooting/version note to specify that client_secret_post support requires Claude Code v2.1.119 or later.
  • Cross-reference the MCP_CLIENT_SECRET environment variable entry to indicate its use in token exchange, not just initial setup.
  • Review the affected pages (MCP OAuth setup guide and MCP_CLIENT_SECRET reference entry) to ensure consistency and clarity.

Notes

The suggested improvement aims to address the medium-impact issue of making the feature difficult to understand due to missing documentation.

Recommendation

Apply the suggested improvement to update the documentation and provide clarity on the use of stored client secrets during OAuth token exchange. This will help users understand the expected behavior and troubleshoot issues more effectively.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING