Does MCP security cover the attacks the spec documents?
The MCP security best practices page documents the attacks covered here and the mitigations it requires for each, including confused deputy attacks on proxy servers, token passthrough, SSRF during metadata discovery, state handle hijacking, local server compromise, malicious authorization URLs and over-broad scopes. No paid edition adds these protections. They are obligations on the implementor, whether that is a client, a server or a proxy you run. The specification itself states that MCP cannot enforce its security principles at the protocol level, so consent flows, access controls and data protections must be built into the applications that use it. A vendor's enterprise plan may add administration features, but it does not turn an unmitigated proxy or server into a compliant one. The current revision is dated 2026-07-28, and reviewers should check the revision their clients and servers actually implement, since mitigations added later may not appear in older builds.
The approval decision therefore rests on two inventories rather than on the vendor's marketing. First, list every MCP client your staff use and every MCP server they connect to, including local stdio servers that run with the user's privileges. Second, for each component, ask the vendor or maintainer to confirm in writing which mitigations it implements, such as per-client consent in front of third-party authorization, HTTPS enforcement and blocking of private and link-local addresses during discovery, binding of state handles to the authenticated user, and rejection of javascript:, data:, file: and vbscript: authorization URLs. Ask for scope configuration evidence too, because publishing every entry in scopes_supported or granting wildcard scopes works against the minimization guidance. Components that cannot answer these questions should be restricted to read-only, non-sensitive use until they can, and the answers should be recorded before any rollout.
Some mitigations are also deployment choices that your own team controls. For server-side deployments, the best practices page suggests considering an egress proxy to limit where discovery requests can reach, and your network team should confirm that such a proxy exists and is enforced. Your security team should also review how proxies and servers you host store and bind session state, since handle hijacking is an application defect rather than something the protocol prevents. Record which checks are owned by the vendor, which are owned by your platform team, and which remain open. An open item should block production use for any server that touches sensitive data, and it should be re-verified when the client or server version changes.
Which documented MCP attacks have required mitigations
This table maps each attack the MCP security best practices page documents to the mitigation it requires and the party that must implement it: client, proxy server, resource server or deployer. Every row is an obligation of the software or the deployment, not a feature of a product edition, so confirm each one against the MCP clients and servers your organization runs. Use the owner column to assign follow-up questions to the right team.
| Documented attack | Required mitigation | Party that must implement it |
|---|---|---|
| Confused deputy in MCP proxy servers using a static client ID | Per-client consent before the proxy forwards a request to third-party authorization | Proxy server |
| Token passthrough | Servers must not accept or forward tokens that were not issued to them, so each token is used only for its intended audience | Resource server and proxy server |
| SSRF during OAuth metadata discovery | Require HTTPS and block private, loopback and link-local ranges, including 169.254.169.254; consider an egress proxy for server-side deployments | Client, and deployer for egress controls |
| State handle hijacking | Do not treat possession of a state handle as authentication; bind handles to the authenticated user, since MCP has no protocol-level sessions | Server |
| Malicious authorization URLs | Reject javascript:, data:, file: and vbscript: URLs and do not open authorization URLs through shell commands | Client |
| Local server compromise | Guard against arbitrary code execution with client privileges, command obfuscation, data exfiltration and data loss from local servers | Client and deployer |
| Over-broad scopes | Do not publish every entry in scopes_supported and avoid wildcard or full-access scopes | Authorization server and resource server |
How the spec's mitigations split across client, proxy and server
The mitigations the MCP security best practices page describes do not sit in one place. Each control belongs to a specific component, and a reviewer has to confirm that the component responsible for it is the one the organization actually runs. The spec itself states that MCP cannot enforce its security principles at the protocol level, so the burden falls on the implementers of the host, client, proxy and server. For each deployment, map every control below to a named owner before approval, whether that owner is a vendor, an internal platform team or a partner.
In the proxy, the key control is per-client consent. A proxy that uses a static client ID to reach a third-party authorization server must collect consent for each MCP client before forwarding the user to that server, or it becomes a confused deputy. In the client, the controls are HTTPS enforcement and blocking of private, loopback and link-local address ranges during OAuth metadata discovery, plus rejection of javascript:, data:, file: and vbscript: authorization URLs. Ask the client vendor to show where these checks run and whether they apply to every transport. On the server, the control is binding state handles to the authenticated user, since MCP has no protocol-level sessions and a handle alone is not proof of identity. Scope restraint is shared: the authorization server and the server's metadata should avoid publishing every entry in scopes_supported and should never grant wildcard scopes such as * or full-access.
Stdio servers change the picture. They do not use the HTTP authorization flow and instead take credentials from the environment, so no OAuth control is protecting them. The risk moves to the host machine and the privileges of the process that launches the server, which the spec lists as arbitrary code execution with client privileges, command obfuscation, data exfiltration and data loss. Confirm which servers run locally over stdio, which user account they inherit, and whether the client restricts what they can launch. Those answers determine how much the proxy and server controls above actually protect your environment.
Where each control sits in an MCP authorization flow
The flow starts at the MCP client, which asks an MCP proxy server for access. The proxy holds a static client ID and must obtain per-client consent before it forwards the request to a third-party authorization server. Metadata discovery is the second risk point: the client checks that the URL uses HTTPS and blocks private, loopback and link-local addresses, and a server-side deployment can route that traffic through an egress proxy. Before you approve a proxy, confirm that consent is recorded per client, that discovery is restricted, that state handles are bound to the authenticated user, and that the scopes requested are limited to what each tool needs.
Where consent, HTTPS and range checks, state binding and scope limits apply in an MCP proxy flow.
Design decisions that determine MCP exposure
Several MCP risks are set by choices the organization makes before any employee connects a server, not by the protocol itself. The spec says MCP cannot enforce its security principles at the protocol level, so consent, client registration, network routing, token handling and scope design fall to the implementer. Each card below names one decision, what it changes, and what to check.
Proxy in front of third-party authorization
If your MCP server acts as a proxy to a third-party authorization server and uses a static client ID, every user who signs in may share one client identity at that provider. The spec's security guidance documents confused deputy attacks in this setup and requires per-client consent before the proxy forwards a request to the third party. Ask whether consent is recorded per client and whether the proxy can be reached by clients you have not approved. Consent coverage depends on this decision.
Security best practicesClient registration model
Decide whether each MCP client registers with the authorization server individually, or whether all clients share a single static client ID. A shared ID makes it hard to tell which application requested access and weakens the consent record that the proxy must keep. Check how registrations are created, who approves them, and whether a revoked client can be removed from the authorization server without affecting others.
Egress proxy for metadata discovery
Server-side deployments fetch OAuth metadata from URLs that can be influenced by a server operator or a malicious authorization URL. The spec asks clients to require HTTPS and to block private, loopback and link-local ranges, including the cloud instance metadata address 169.254.169.254. The spec also suggests considering an egress proxy for server-side deployments. Decide whether discovery traffic leaves the network through a controlled path, and test whether the server can reach internal addresses from its runtime.
Keeping tokens out of downstream calls
Decide whether the MCP server forwards the access token it received to the upstream APIs it calls. A forwarded token lets any compromised component or downstream service use the same credential, which increases the blast radius of a leak. Ask the implementer to confirm that tokens are issued for the MCP server as audience and that the server exchanges or re-authorizes for upstream calls rather than passing the original token through.
Published scopes and wildcard grants
The scope minimization guidance warns against listing every scope in scopes_supported and against wildcard scopes such as * or full-access. Each published scope defines what a token can reach, so a broad list or a wildcard grant expands the damage possible from one stolen token. Decide which scopes the server publishes, map each to a specific tool or resource, and confirm with the implementer that the consent screen shows users what each scope allows.
How the risk changes by deployment pattern
A remote HTTP MCP server fronted by a proxy typically exchanges tokens with a third-party authorization server on behalf of clients. The proxy is the place where the spec's OAuth-specific attacks concentrate. The security best practices page documents confused deputy attacks on proxies that use a static client ID, and it requires per-client consent before the proxy forwards a request to third-party authorization. Token passthrough and state handling also sit in this path, because the proxy holds credentials and session handles that belong to the user.
- Confused deputy: Confirm the proxy obtains per-client consent and does not reuse one static client ID for every MCP client.
- Token passthrough: Confirm the proxy does not forward tokens issued to other audiences to the upstream API.
- State handles: Confirm state handles are bound to the authenticated user and are not accepted as proof of identity.
- Scope selection: Confirm the proxy does not publish every entry in scopes_supported and does not grant wildcard scopes such as * or full-access.
- Authorization URLs: Confirm clients reject javascript:, data:, file: and vbscript: URLs.
Ask the implementation team to show the consent screen flow, the token audience check and the scope list the proxy advertises, and to point to the test cases that cover each point.
A remote HTTP MCP server that the client reaches directly has no intermediary holding a shared client ID, so the confused deputy pattern is less direct. Its exposure moves toward discovery, token audience handling and the server's own authorization checks. Authorization is optional in MCP, so a server that skips it is a server that accepts requests from anyone who can reach the endpoint, and reviewers should treat that as a finding for any server holding internal data.
- Metadata discovery SSRF: Confirm clients require HTTPS and block private, loopback and link-local ranges, including 169.254.169.254, when they fetch OAuth metadata.
- Optional authorization: Confirm that any HTTP server reachable by staff enforces the authorization spec, not just network reachability.
- Audience binding: Confirm the server accepts only tokens issued for its own resource, following the token audience rules in the authorization spec.
- Scope minimization: Confirm the server does not advertise wildcard or full-access scopes to clients.
- Network placement: Confirm the endpoint is reachable only from the networks where approved clients run.
Request the server's authorization configuration, its metadata discovery logs and a test showing that a request with a token for another service is rejected.
When an agent runs on a company-hosted service with outbound network access, the server is the one making requests. That changes the SSRF picture: a metadata fetch or redirect can reach cloud instance metadata, internal admin panels or other services on the same network. The spec suggests that server-side deployments consider an egress proxy, which gives the organization one place to allow and log outbound destinations. Credentials held by the host also become a high-value target, because any compromised tool call can use them.
- Outbound SSRF: Confirm the host blocks private, loopback and link-local destinations at the network layer, not only in client code.
- Egress proxy: Confirm outbound MCP traffic passes through a proxy with an allowlist of destinations.
- Credential storage: Confirm long-lived tokens are scoped to individual tools and rotated, and are not visible to the agent process.
- Logging: Confirm outbound requests and tool invocations are logged with the user identity that triggered them.
- Isolation: Confirm each agent run has a separate runtime, so one run cannot read another run's tokens.
Ask for the egress policy, a sample log entry for one tool call and the list of credentials the host can reach.
A local stdio MCP server runs as a process on the developer's machine with the client's privileges. The spec's guidance for this pattern is that credentials come from the environment instead of an OAuth flow. The spec lists the local risks as arbitrary code execution with client privileges, command obfuscation, data exfiltration and data loss. Because the process inherits the user's file system and environment variables, a malicious or compromised package can read secrets, change files or send data out without any network-level control.
- Code execution: Confirm servers are installed from an approved source with pinned versions, not from arbitrary package names.
- Command obfuscation: Confirm reviewers can see the exact command line the client launches, including arguments and environment.
- Secrets in the environment: Confirm credentials are scoped to the server and not the whole shell environment.
- Exfiltration: Confirm egress from developer machines is restricted or monitored for MCP processes.
- Central control: Confirm a managed allowlist decides which local servers can load.
Ask how the organization inventories local servers across developer machines and whether a managed configuration can block servers that are not approved.
Gaps the spec leaves for the deployer to cover
The MCP specification states that the protocol cannot enforce its security principles on its own, so consent, access control and data protection fall to the organization and the applications it deploys. The cards below cover the gaps that remain after the spec is implemented, with the usual control for each one.
Enforcement across clients and servers
The spec says MCP cannot enforce its security principles at the protocol level, so a rule set in one client does not bind another client or server. Each employee may run a different host, and each host may load servers the security team has never reviewed. Check which clients your staff use, and rely on a vetted server inventory combined with managed client settings that restrict which servers load. Confirm with each vendor which controls apply to which edition.
Trust in published scopes
The scope minimization guidance warns against publishing every scope in scopes_supported and against wildcard scopes such as * or full-access. A server controls what it advertises, so the scopes it lists may be broader than the tools it needs. Review the metadata of each server before approval, request the narrowest scopes the workflow requires, and record which scope each approved server holds.
Security best practicesTrust in local server code
A local MCP server runs with client privileges, and the spec lists arbitrary code execution, command obfuscation, data exfiltration and data loss as its risks. Approving a server means approving the code, its dependencies and the commands it may run. Pin versions from a source you control, review the code path for shell execution, and run local servers in an isolated environment with no access to credentials they do not need.
Egress from server-side deployments
The spec advises that server-side deployments consider an egress proxy, because metadata discovery can be steered toward internal addresses. Clients are expected to block private, loopback and link-local ranges, but network policy is the control that holds for the whole fleet. Ask your platform team to route outbound calls from MCP servers through a proxy with an allowlist, and log denied destinations.
Session state without protocol sessions
MCP has no protocol-level sessions, so the server must bind any state handle to the authenticated user, and possessing a handle is not authentication. The spec gives the rule but not the implementation, so each server team must build the binding. Ask vendors and internal developers how handles are issued, expire and tie to the user, and test that a handle taken from one user fails for another.
Consent for proxied third-party access
A proxy server that uses a static client ID can let one user's consent carry over to other clients, which is the confused deputy pattern the spec documents. The spec requires per-client consent before the proxy forwards to a third-party authorization server. Verify that each proxy your organization runs performs this step, and test the consent screen with a second client before go-live.
Order of work before an MCP server reaches production
This sequence turns the attacks and controls in the MCP security best practices into a checked, ordered review, so each server is approved against known failure modes before any employee connects to it.
Inventory every client and server
Start by listing each MCP client employees use and each MCP server they would connect to, including the owner, the data each server can read, and the actions each can take. Security and platform engineering own this list, and it is done when every server has a named owner and a stated purpose. Without this inventory, the later checks have no fixed target, and unapproved servers tend to appear in developer configurations unnoticed.
Classify each server as remote or local
Mark every server as remote (HTTP-based, reached over the network) or local (stdio, running on the employee's device or a shared host). Remote servers fall under the authorization spec, while local servers depend on credentials from the environment and on the client's sandboxing. The spec lists local server risks such as arbitrary code execution with client privileges, command obfuscation, data exfiltration and data loss, so local servers need their own review path. The output is a classification sheet that routes each server to the right checks.
Confirm the proxy consent and client registration model
For any server that proxies to a third-party authorization server, confirm it uses a static client ID only if it also enforces per-client consent before forwarding the user to the third party. The spec documents confused deputy attacks against proxies in this setup. Ask the vendor or internal team to show the consent screen, the registration method for each client, and how a previously approved client is prevented from inheriting consent granted to another. Done means you can demonstrate that a new client cannot pass through an existing consent.
Verify HTTPS and private address blocking in discovery
Check that clients require HTTPS during OAuth metadata discovery and block private, loopback and link-local ranges, including the cloud metadata address 169.254.169.254. For server-side deployments, confirm whether an egress proxy restricts outbound destinations. Test this against a sample metadata document that points to an internal address, and record whether the request is refused. The check is complete when the attempt is blocked and the refusal is logged.
Check state binding and authorization URL handling
Confirm that the server does not treat possession of a state handle as authentication, since MCP has no protocol-level sessions, and that each handle is bound to the authenticated user. Then check that clients reject javascript:, data:, file: and vbscript: authorization URLs and never open URLs through shell commands. Use a crafted handle from one user against another user's session, and a malicious authorization URL, to confirm both are refused. Record the results as pass or fail for each case.
Review published scopes and token handling
Compare the server's scopes_supported list against what each tool actually needs, and remove any scope that no tool uses. Reject wildcard scopes such as * or full-access. Confirm the server does not pass through tokens issued for other services (the token passthrough pattern the spec documents) and that tokens are scoped to the server as their audience. The output is a scope matrix mapping each tool to its minimum scopes, signed off by the server owner and the identity team.
Test against the documented attacks before go-live
Run a pre-production test pass that covers each attack in the spec: confused deputy through a proxy, token passthrough, SSRF during discovery, state handle hijacking, malicious authorization URLs, over-broad scopes and local server compromise. Testing can be done by the internal security team or by a specialist tester with written scope. Go-live is approved only when every case has a recorded result, every failure has an owner and a fix, and the fixes are retested. Re-run the pass after material server or client upgrades.
Evidence a security reviewer asks for on MCP attack controls
This table lists the artifacts a reviewer should request for each documented MCP attack control, with the place each artifact usually comes from. Use it to turn the spec's mitigations into records you can inspect in the client codebase, the proxy configuration, the server configuration or the test archive. A control with no artifact from its listed source is one you have not yet verified.
| Control | Artifact to request | Where it comes from |
|---|---|---|
| Confused deputy in MCP proxies | Per-client consent screen captures and the client registration records showing whether a static client ID is still in use | Proxy server code, its consent flow configuration and the third-party authorization server's client registry |
| Token passthrough | Test records showing that tokens issued for the MCP server are not forwarded to downstream APIs | Server request handling code, integration test logs and outbound request traces |
| SSRF during metadata discovery | Egress configuration showing HTTPS enforcement and blocked private, loopback and link-local ranges, including 169.254.169.254 | Client or server HTTP client configuration, the egress proxy rules and firewall policy exports |
| State handle binding | Tests showing that a state handle presented by a different authenticated user is rejected | Server session store design, automated authorization tests and the code that binds handles to user identity |
| Authorization URL scheme validation | Results showing javascript:, data:, file: and vbscript: URLs are rejected and that no shell is used to open URLs | Client source code, unit test output and the browser or OS launch code path |
| Local server compromise | Documented sandbox settings, the exact command each local server runs and the credentials it reads from the environment | Client configuration files, server launch definitions and the endpoint or container policy in use |
| Scope minimization | The published scope list, the justification for each scope and confirmation that wildcard or full-access scopes are absent | Authorization server metadata, the server's scopes_supported value and the design record for each scope |
| Independent or internal test reports | Penetration test or internal red team reports covering the controls above, with findings and retest results | Security testing vendor or internal security team, with the report date and the MCP version tested |
Questions buyers ask before approving MCP attack controls
Is there a paid MCP edition that adds these attack controls?
No. The MCP specification is an open protocol, and the controls described in the security best practices are implementation obligations rather than features of a licensed tier. The MCP specification says the protocol itself cannot enforce its security principles, so the consent flows, authorization checks, token handling and egress rules must be built into the clients, proxies and servers your organization runs. Some vendors sell managed clients or gateways that include parts of this work, so confirm in writing which specific controls a product implements, which version it applies to, and which remain your responsibility. Ask for that mapping against the spec before any purchase decision.
What drives the effort to secure MCP against these attacks?
Effort scales with the number of MCP servers, whether you run an OAuth proxy in front of third-party authorization, and whether servers are remote or local. Each proxy that uses a static client ID needs per-client consent before it forwards to a third-party authorization server. Each remote server needs HTTPS enforcement, blocking of private, loopback and link-local ranges during metadata discovery, and possibly an egress proxy. Each local server needs review for arbitrary code execution with client privileges, command obfuscation, exfiltration and data loss. Scope definitions and token audiences also multiply with every server you add. Ask a partner to size the work by listing servers, proxy paths and deployment models first.
Can our team verify these MCP controls without an outside firm?
Yes, in most organizations, provided the team has engineers who can read the MCP authorization and security best practices pages and test the results. Verification combines a review of each client and proxy against the documented mitigations with active testing, such as attempting SSRF to metadata addresses, replaying a state handle from another user, submitting javascript: or file: authorization URLs, and checking whether a broad scope is granted. Independent testing adds a second view, and DeployOpen runs security testing that includes AI systems and agents. Note that DeployOpen prepares evidence for compliance assessments but does not issue audit reports or certifications, so an independent auditor still makes that judgment.
What do our internal teams need to provide for this work?
Your teams need to supply the inventory and the decisions that only your organization can make. Typical inputs include a list of every MCP client and server in use, which identity provider issues tokens, which resources each server exposes, which scopes your policy allows, and where servers run, including cloud accounts or workstations. Security should own the consent and approval rules for tools, and platform engineering should own the egress path and secrets handling for stdio servers, which should read credentials from the environment. Name a technical owner who can approve changes, because MCP security issues are reported through GitHub Security Advisories on the affected repository, and someone must track those for each SDK you depend on.
How is the cost of a fixed-scope MCP security engagement structured?
Most DeployOpen engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts, and the quote follows from that written scope. DeployOpen does not publish a price list. The main cost components are the assessment and design work, implementation of controls in your environment, testing and documentation of results, and any follow-on support. Some of these are one-time, such as the initial review and hardening. Others recur, such as updates after SDK advisories and changes to servers or scopes, which are available as retainers. Ask for a quote that separates one-time work from recurring support, lists the servers and proxies in scope, and states what is excluded.
What should we ask for in an MCP security scope document?
Ask for a written scope that names each MCP server, client and proxy, the authorization flow each one uses, and the attack categories being addressed. The document should state which mitigations from the MCP security best practices are in scope, how each will be verified, and which environments are covered. Request explicit deliverables, such as a control-by-control results list, configuration changes made in your environment, and a retest plan after fixes. Confirm the timeline, the access the team needs to your cloud accounts or identity provider, and how new advisories for the SDKs in use will be handled after the engagement ends.
Which MCP attacks should we test first if time is limited?
Start with the attacks that reach credentials and internal networks. Confused deputy risk in static-client-ID proxies and token passthrough can let a server act with rights it should not hold, and SSRF during OAuth metadata discovery can reach internal services and cloud metadata endpoints. State handle hijacking can let one user act as another, and malicious authorization URLs can lead to script or file execution on the client. Local server compromise carries arbitrary code execution with client privileges. Over-broad scopes, including wildcard values or publishing every entry in scopes_supported, widen the blast radius of all of these, so reviewing scope configuration is a fast first step.
How DeployOpen tests and hardens MCP deployments
DeployOpen works on MCP security risks and controls inside the client's own infrastructure, starting from the attacks the MCP security best practices page documents. The work covers scoping, security testing of MCP servers and the clients that call them, hardening, and documented handover, with ongoing support available as a retainer.
How we scope
- Agree in writing which MCP servers, clients and OAuth proxies fall inside the engagement before work starts
- Map each MCP server to its authorization model, scopes and where its credentials are stored
- Confirm which deployments are HTTP-based and which run locally over stdio, since the controls differ
How we build
- Test OAuth proxies for confused deputy exposure, including per-client consent before forwarding to third-party authorization
- Check metadata discovery for SSRF, HTTPS enforcement and blocking of private, loopback and link-local ranges
- Review state handle binding, authorization URL handling and scope minimization against the documented guidance
How we hand over
- Deliver a written findings report that maps each issue to the relevant section of the MCP security best practices
- Document the configuration, egress and consent controls implemented in the client's environment
- Provide remediation steps and retest results so the client's own team can operate and verify the controls
How we support
- Offer ongoing support, upgrades and continuous testing as a retainer after the fixed-scope work ends
- Review changes when the MCP specification revision or SDK versions the client runs are updated
- Track published MCP security advisories against the client's deployed server and client versions

