Skip to main content

ExchangeDeploymentMcpOAuthCode

POST 

/v1/mcp-oauth-clients/:id:exchangeCode

ExchangeDeploymentMcpOAuthCode completes a sign-in through a shared client: it trades the authorization code for an access token at the client's token endpoint and returns the access token. It never returns a refresh token, and valet stores nothing. The Admin Console uses it to list an MCP server's tools. redirect_uri must be one of the client's. The token endpoint must be https on a public address (MCP_OAUTH_TOKEN_ALLOW_PRIVATE_ADDRESSES opens private ones), and redirects are not followed. Every call is audited, a failed one included.

Request​

Responses​

Success