Join our Newsletter — 33% off our NHI Course

Did MCP OAuth miss the credential hidden behind the server?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 20842
Topic starter  

TL;DR: Akeyless describes how MCP authorization can pass its checks while the server still exposes a higher-value upstream credential hidden behind the flow. For practitioners, the control boundary has to extend beyond the access token to the secrets the server reads at startup and forwards at runtime.

Editorial analysis by NHI Mgmt Group, based on content published by Akeyless: “MCP OAuth 2.1: How the Flow Works and Where Tokens Still Leak”.

Key questions

Q: Why does token passthrough create access risk?

A: Token passthrough creates access risk because a service forwards the caller’s token to another system, so the downstream service may act with the original user or workload’s authority instead of a narrowly scoped server-side credential.

Q: How can a proxy create a consent bypass in OAuth flows?

A: A proxy can create a consent bypass when it reuses or injects OAuth tokens in a way that avoids the normal per-user client approval checks, so an application gains access without the user granting consent for that client or scope.

Q: How can organizations secure their MCP server credentials?

A: To secure MCP server credentials, organizations should adopt OAuth for authentication, avoid hard-coded values, and implement strict access controls.

Practitioner guidance

  • Inventory every upstream credential List the secrets each MCP server reads at startup, including environment variables, config files and proxy-held tokens, then rank them by expiry and write scope.
  • Enforce audience binding on every token Reject any bearer token not minted for the server’s canonical URI and test the rejection path with a token from another resource.
  • Separate upstream calls from user tokens Call downstream APIs with a server-owned credential path instead of forwarding the client bearer token, especially where monitoring and rate limits depend on audience.

Bottom line: MCP OAuth can validate the client-to-server hop without addressing the upstream secret the server uses behind the flow.

Glossary terms: OAuth 2.1, Model Context Protocol, Protected Resource Metadata, Token Passthrough

What's in the full article

Akeyless's full blog post covers the operational detail this post intentionally leaves for the source:

  • The full MCP authorization sequence with discovery, resource indicators, issuer checks and step-up handling.
  • Practical examples of token passthrough and proxy consent failure modes in real MCP deployments.
  • Runtime secret brokering patterns for servers that should not keep write-capable credentials on the host.
  • Implementation detail for STDIO servers, gateways and secret-zero dependencies.

👉 Read Akeyless's analysis of MCP OAuth and the hidden server credential →

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 7 months ago
Posts: 21228
 

MCP authorization is not the same as MCP credential governance: the flow can bind a client token to a server, yet still leave the server’s own long-lived secrets untouched. That distinction matters because identity controls aimed at the browser or client do not govern the upstream credential the server uses later. Practitioners should read MCP as a delegation boundary, not as an end-to-end secret boundary.

A few things that frame the scale:

  • 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.

A question worth separating out:

Q: What should teams do first when MCP secrets appear in config files?

A: First, remove the exposed secrets from the MCP configuration file and rotate every credential found there, including API keys, tokens and certificates. Then identify who or what used them, check repository history and build pipelines for further copies, and move the secrets into a managed secret store with scoped access and rotation controls.

👉 Read our full editorial: MCP OAuth leaves the real secret outside the flow



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.