Key takeaways
- Do not treat token passthrough as a convenience feature; it turns the MCP server into an authorization relay and expands the blast radius of any compromise.
- Prefer audience-restricted access tokens and resource metadata so the client asks for a token for the downstream resource itself, not for an entire tool chain.
- Treat localhost and a local stdio transport as privileged process authority, not as evidence that the server is harmless.
- If a relay must exist, make the forwarding explicit, destination-specific, short-lived and auditable; never forward refresh tokens or blanket bearer tokens by default.
- Test the exact token path with a loopback reproduction and reject the design if you cannot prove which hop may see, log or replay the credential.
The decision: pass through, broker or reject
The architectural question is not whether a client can log in. It is whether an MCP server should ever see a bearer token that can also be replayed somewhere else. If the answer is yes, the server is now part of the authorization plane. That may be acceptable for a narrow gateway you fully control. It is usually the wrong default for a tool server that can be extended, patched, proxied or compromised by someone else. In practice, think in three outcomes: Pass through, broker or reject.
Use three outcomes. Pass through only when the downstream resource, token audience, transport, logging and revocation rules are all owned and audited as one unit. Broker when a narrow, single-purpose gateway can mint or exchange a token for exactly one downstream audience and does not persist it. Reject when the server would receive a broad bearer token, when the token might be reused across services, or when the team cannot prove where the credential can travel.
What the MCP documents now say
The MCP security best-practices page explicitly calls out token passthrough risks, local MCP server compromise and SSRF-style attacks. That is already enough to dismiss the fantasy that a local server is automatically safe because it is “just on my machine.” The document is not saying token forwarding is impossible. It is saying token forwarding is a security decision with real blast radius.
The MCP authorization specification goes further and requires servers to validate that access tokens were issued specifically for them as the intended audience. In other words, the server is not entitled to any token merely because a client sent it one. The tools specification reinforces that tool exposure and invocation are security-sensitive, which matters when a server can call downstream APIs, mutate state or relay credentials on the user’s behalf.
Why audience restriction changes the problem
OAuth resource indicators exist because a bearer token without a clear audience is too easy to misuse. RFC 8707 defines resource indicators so the client can request a token for a specific protected resource, and RFC 9728 gives the protected resource a standard metadata document so the client can discover where the authorization belongs. RFC 9700 then treats audience-restricted access tokens as a current best practice for limiting replay and token leakage.
That is the design pattern MCP should inherit. The client should know which downstream resource it is talking to, the resource should expose the metadata needed to obtain the right token, and the server should validate the audience rather than accepting a generic credential and deciding later what it may mean. If the token can be forwarded to multiple services, the audience boundary has already been blurred.
The local relay shows how little work token forwarding requires
I ran a tiny loopback demo on Node v24.10.0 with one local proxy and one local downstream server. The client sent `Authorization: Bearer aag-demo-token` to the proxy. The proxy forwarded the header unchanged to the downstream resource. The downstream server then returned the same bearer token in its response. That is not a defect report against MCP. It is a demonstration of how easily a relay can inherit the user’s authority if nobody constrains it.
The exact response was `{"clientAuthorization":"Bearer aag-demo-token","downstream":{"receivedAuthorization":"Bearer aag-demo-token","url":"/resource"}}`. In one line of JSON, you can see the whole problem: once the server forwards the header unchanged, the downstream service cannot tell whether the client intentionally delegated that audience or the relay simply copied a token it should have dropped.
Localhost is not a trust boundary
The MCP docs call out local server compromise for a reason. A local stdio or localhost transport tells you where packets moved, not who can read the process memory, environment, logs or file descriptors. A compromised local server can still exfiltrate headers, cache refresh tokens, call arbitrary downstream APIs and pivot through the same workstation identity the user trusts for everything else.
The risk is larger when the server can see raw headers, bearer tokens, tool arguments or unredacted payloads. Logs, traces and error reporters are another leakage path. So are SSRF-style fetches to metadata endpoints or authorization servers. The moment the server is allowed to reach outward on its own, it can become a credential broker, an exfiltration point or a confused deputy even if the client never intended that authority.
The safe pattern is narrow and explicit
If passthrough is unavoidable, treat it like a production integration boundary. Pin one downstream resource. Bind the token audience to that resource. Make the forwarding code path explicit and one-way. Keep refresh tokens out of the relay entirely. Refuse to store the token in caches, temp files, traces or crash reports. Rotate tokens quickly enough that any accidental exposure has a short lifetime.
Then add isolation: run the MCP server as least-privilege process code, deny arbitrary outbound destinations, audit the exact downstream hostnames and paths, and verify that the server cannot discover or mint broader authority on its own. If you cannot write down the destination allowlist, the credential lifetime and the revocation story in one paragraph, the passthrough is too broad to approve.
When to reject the design outright
Reject the design when the server is multi-tenant, extensible, plugin-driven or operated by a third party and the token would let that server act across multiple resources. Reject it when the team wants to pass through a single opaque bearer token because that is easier than integrating resource metadata or token exchange. Reject it when the only justification is that the server is local and “therefore safe.”
Also reject it when the team cannot prove the following: who issues the token, which resource is the audience, whether the relay sees the full token, where the token is logged, whether refresh tokens exist, whether the downstream can revoke independently and whether a compromise of the relay would expose authority beyond the intended resource. Missing any one of those answers means the token path is still under-specified.
What to measure before approval
Measure the end-to-end path, not the marketing promise. Record which process first sees the token, which hop forwards it, which service validates the audience, which logs redact it and which component is able to rotate or revoke it. Repeat the test with the relay compromised, the downstream unavailable and the token expired. A secure architecture should fail closed in each case.
Also measure how the design behaves when a downstream service requests a different audience, a token expires mid-conversation or a tool call fans out into a second dependency. If the answer is always “the same bearer token gets copied again,” the architecture is not a bounded authorization design. It is just credential forwarding with better branding.
The operating rule
Use audience-bound tokens by default. Use resource metadata and token exchange when a relay must exist. Keep local MCP servers on a short leash because localhost is still a process with authority. If the protocol path cannot prove where the token belongs, do not forward the token.
That rule is stricter than a product demo but cheaper than a credential incident. It preserves the useful part of MCP—typed tools, discoverable resources and structured orchestration—without letting a convenience relay become a latent authorization proxy.
Copy-ready MCP token-boundary decision record
Complete this AccessAllGPT template for one MCP connection and one downstream resource. Replace assumptions with dated evidence. Any unresolved mandatory gate means reject, not trial.
Entries stay in this browser tab and are not submitted to AccessAllGPT. Blank responses are copied as [Unresolved].
Pass through, broker, trial or reject; exact MCP server; downstream resource; owner; users; consequence; expiry.
Bearer token, audience-restricted token, sender-constrained token, refresh token or token exchange output; issuer; lifetime; rotation.
Which resource requested the token, which resource validates it, how the server proves intended audience and how that proof is tested.
Which hop sees the raw credential, whether the relay rewrites, stores or logs it, and whether any hop can fan out to a second audience.
Protected-resource metadata, authorization server metadata, canonical resource URI and discovery flow used by the client.
Process identity, filesystem access, egress allowlist, plugin surface, downstream reach, local socket exposure and secret boundaries.
Headers, traces, crash reports, retention window, redaction, secret scanning and whether token material can land in support artifacts.
Compromised relay test, expired token test, alternate-audience test, log review and SSRF or metadata-probe test.
Who can revoke, how quickly, how fallout is contained and which fallback path avoids forwarding the token again.
Pass through, broker, bounded trial or reject; residual uncertainty; owner; re-evaluation trigger.
Primary sources
Browse the publication-wide evidence index →
- Security Best Practices (version 2026-07-28)Model Context Protocol · Reviewed: Token passthrough risks, local MCP server compromise, SSRF risks and common mistakes · Retrieved · Supports: The MCP security guidance explicitly frames token passthrough as risky, warns about local server compromise, and treats SSRF and token handling as security concerns for MCP deployments.
- Authorization (version 2026-07-28)Model Context Protocol Specification · Reviewed: Resource parameter implementation, canonical server URI, access token usage and token handling · Retrieved · Supports: The authorization spec requires servers to validate that access tokens were issued specifically for them as the intended audience and describes the resource-oriented discovery flow that anchors the authorization relationship.
- Tools (version 2026-07-28)Model Context Protocol Specification · Reviewed: Security considerations and user interaction model for tool exposure · Retrieved · Supports: The tools specification emphasizes that tool exposure and invocation are security-sensitive, which matters when a server can forward user credentials to another service or trigger privileged actions on a user’s behalf.
- Resource Indicators for OAuth 2.0 (RFC 8707)RFC Editor · Reviewed: Resource parameter, audience restriction and threat model · Retrieved · Supports: RFC 8707 defines resource indicators so the client can ask for a token for a specific protected resource instead of receiving a bearer token that is broadly reusable across a service fleet.
- OAuth 2.0 Protected Resource Metadata (RFC 9728)RFC Editor · Reviewed: Protected resource metadata and security considerations · Retrieved · Supports: RFC 9728 standardizes resource metadata discovery so clients can learn which authorization server and token endpoints belong to a protected resource instead of inventing token-routing rules ad hoc.
- Best Current Practice for OAuth 2.0 Security (RFC 9700)RFC Editor · Reviewed: Audience-restricted access tokens, token leakage and metadata attacks · Retrieved · Supports: RFC 9700 elevates audience-restricted tokens and related countermeasures as best current practice because bearer tokens are dangerous when they can be replayed or forwarded beyond their intended recipient.
Limitations
This article is a desk review plus a synthetic local relay demonstration, not an audit of a real MCP implementation, authorization server or production identity stack. The loopback test proves only that a relay can forward a synthetic bearer token unchanged on one machine; it does not prove a defect in MCP, a prevalence rate, a vendor bug or a remote exploit. We did not test sender-constrained tokens, refresh-token rotation, a cloud auth server, a third-party MCP client, or an actual deployed server. RFCs and MCP docs may evolve; re-check the cited pages and re-run the relay on any new runtime or architecture.
Disclosures
AccessAllGPT did not receive access, payment, private data or review from the MCP project, Anthropic, the IETF or any vendor. The local experiment used only synthetic headers and loopback networking. No vendor supplied data, paid for placement or received an endorsement. AccessAllGPT Research is operated by NeuralArc, is independent, and is not affiliated with OpenAI. Publication-wide relationships are listed on the disclosures page.
Further AccessAllGPT guidance
Continue the research
Get evidence-led updates for teams making production AI decisions.