Skip to content

MCP configuration reference: document how to set an OAuth client secret - #10542

Merged
Nick Trogh (ntrogh) merged 1 commit into
microsoft:mainfrom
playb0t:docs/mcp-oauth-client-secret
Oct 29, 2026
Merged

Nick Trogh (ntrogh) merged 1 commit into
microsoft:mainfrom
playb0t:docs/mcp-oauth-client-secret

Conversation

@playb0t

Copy link
Copy Markdown
Contributor

The oauth object in the MCP configuration reference lists only clientId. Since 1.122 (microsoft/vscode#317950), VS Code takes a client secret through a CodeLens above oauth.clientId in mcp.json. It keeps the secret in secret storage, so a confidential OAuth client can connect. The product's own schema text for clientId already says so in 1.143.1: "To set the matching client secret, use the Set Client Secret code lens above this field". It adds that the secret lives in the OS secret store, not in the file. The reference page says nothing about it. A reader who needs a secret cannot find the way from there.

We hit this on a bench. VS Code 1.142.0 on Windows, a local synthetic OAuth server, no dynamic registration. With clientId alone, a confidential client failed at the token endpoint with 401 invalid_client. With the secret entered through the editor's own command, it connected with client_secret_post. The rows are in MCP Host Matrix, connectivity page.

This PR adds one note under the oauth properties table. If you would rather word it differently or put it elsewhere, that is your call.

@ntrogh Nick Trogh (ntrogh) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@ntrogh
Nick Trogh (ntrogh) merged commit 300e4a8 into microsoft:main Oct 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants