Skip to content

Command Palette

Search for a command to run...

BLOG / MCPAdvanced

MCP Server Security Checklist for the 2026-07-28 Specification

A practical MCP security checklist drawn from the official security best practices: confused deputy, token passthrough, SSRF, local servers and scopes.

Learn AI Engineering Editorial October 17, 2026 10 min readLast reviewed

Topics:MCP and tool use

An MCP server is code that an AI application can call, often with a token that reaches your email, your repositories or your database. Connecting one is closer to installing a dependency with credentials than to adding a plugin. The protocol's own security documentation says so plainly, and it lists the specific attacks to design against.

TL;DR

As of October 2026 the current MCP specification revision is 2026-07-28, and its security best practices page names attacks including confused deputy, token passthrough, server-side request forgery (SSRF), local server compromise, state handle hijacking and over-broad scopes. The controls are concrete: per-client consent, audience-checked tokens, blocked private IP ranges, sandboxed local servers, and a progressive least-privilege scope model. This article turns them into a checklist. It covers the protocol's guidance, not every vulnerability in every server.

The trust model in the spec

MCP does not enforce safety in the protocol, and it says so. The overview of the specification sets out three principles: user consent and control, data privacy, and tool safety. It states that hosts must obtain explicit user consent before invoking any tool, and that descriptions of tool behaviour, such as annotations, should be considered untrusted unless obtained from a trusted server. It also says that MCP itself cannot enforce these principles at the protocol level, so implementors should build consent flows, access controls and clear documentation.

Read that as a division of labour. The protocol gives you the plumbing; the host application and the server operator own the controls. If you run an agent that connects to third-party servers, you are the host.

The attacks the official guidance names

The security best practices page is written for developers implementing authorization flows, server operators and security reviewers. These are the attacks it describes, with the control it prescribes.

  • Confused deputy

    Good: Proxy servers keep a per-user registry of approved client IDs, show their own consent page, and match redirect URIs exactly

    Red flag: A proxy that uses a static client ID, allows dynamic registration and relies on a third party's consent cookie

  • Token passthrough

    Good: The server accepts only tokens issued for it and validates the audience

    Red flag: Forwarding a client's token unchanged to a downstream API

  • SSRF

    Good: HTTPS only, block private and link-local ranges, validate redirect targets, use an egress proxy

    Red flag: The client follows any URL a server supplies, including cloud metadata addresses

  • Local server compromise

    Good: Show the full startup command, require consent, sandbox with minimal privileges

    Red flag: One-click install that runs an unseen command with the user's privileges

  • State handle hijacking

    Good: Verify every request, bind handles to the authenticated user, use random handles

    Red flag: Treating possession of a handle as proof of identity

  • Scope inflation

    Good: Start with minimal scopes and elevate through targeted challenges

    Red flag: Publishing wildcard scopes and requesting all of them

Attack and control, from the MCP security best practices

Confused deputy and token passthrough

These two are about who a token is for. In the confused deputy case, the spec describes an MCP proxy that fronts a third-party API with a fixed client ID. If the third party has already set a consent cookie in the user's browser, an attacker who registers a malicious client can send the user a crafted link, skip the consent screen and receive an authorization code at their own address. The required mitigation is that the proxy keeps its own per-client consent, shows the requesting client's name, the scopes and the redirect URI, and validates redirect_uri by exact string match.

Token passthrough is simpler. The spec says MCP servers must not accept any tokens that were not explicitly issued for the MCP server. Accepting a token meant for another service breaks the audience boundary, lets callers bypass rate limits and monitoring on the downstream API, and muddies your audit trail, because logs show the wrong caller.

SSRF through discovery

During OAuth discovery, a client fetches URLs supplied by the server. A hostile server can point those at internal addresses, including cloud metadata endpoints such as 169.254.169.254, which the spec names as a risk for credential exposure. The guidance is to require HTTPS in production, block private, loopback and link-local ranges, validate every redirect hop and, for server-side deployments, route requests through an egress proxy. It also warns against hand-written IP validation, because encoding tricks defeat custom parsers, and notes that DNS rebinding can make a check pass and the request fail.

Local servers

A local MCP server is a program you download and run. The spec lists arbitrary code execution, no visibility into the executed command, and data loss as risks. For clients that offer one-click setup, it requires showing the exact command without truncation, flagging it as potentially dangerous, and requiring explicit approval. It recommends running servers in a sandbox with restricted file system and network access, and using the stdio transport or restricted local sockets so other processes on the machine cannot reach the server.

An audit you can run on one server

Use this sequence on any server you operate or plan to connect. It takes an hour for a small server.

  1. Step 1: Inventory

    List every tool, what it can read or change, and which credentials it holds

  2. Step 2: Check tokens

    Confirm the server validates the audience on every token and never forwards client tokens downstream

  3. Step 3: Check scopes

    Compare requested scopes with what the tools actually need, and remove wildcards

  4. Step 4: Check egress

    Confirm outbound fetches use HTTPS, block private ranges and sit behind an egress policy

  5. Step 5: Check execution

    For local servers, confirm sandboxing and that the full command is shown before first run

  6. Step 6: Log and test

    Log tool calls and scope elevations, then test with a hostile tool description and a hostile redirect URI

Audit one MCP server

Scope design in practice

The scope minimization section is the one teams most often skip, and the spec is direct about the cost. A token carrying broad scopes such as files:* or admin:* turns any log leak into lateral access. The recommended pattern is a minimal initial scope covering low-risk discovery and read operations, with targeted WWW-Authenticate challenges to elevate when a privileged operation is first attempted. The listed mistakes include publishing every scope in scopes_supported, using omnibus scopes like all or full-access, and bundling unrelated privileges to avoid future prompts.

Before

  • One scope named full-access granted at first connection
  • A leaked token can read, write and delete across every tool
  • Audit logs cannot tell a read from a deletion

After

  • A read-only baseline scope, with write scopes requested when a write tool is first used
  • A leaked token is limited to what the user has already needed
  • Each elevation is logged with the scope requested and granted
Scope design

What the protocol cannot do for you

Tool poisoning, where hostile instructions hide in a tool description or a tool result, is a model-level problem that the spec handles by telling hosts to treat descriptions as untrusted. Defence in depth still falls to you: approvals for risky calls, output filtering, and least-privilege credentials. Prompt Injection, Explained covers the attack side, and AI agent identity covers giving each agent its own narrow credentials.

Security researchers and vendors have published further MCP vulnerability findings in 2026. We did not verify the specific CVEs or counts reported in secondary write-ups for this article, so check the CVE records and the relevant vendor advisories directly before citing them.

Production warning

Never connect a server you have not read to an agent that holds production credentials. Start in a sandbox account, with read-only scopes, and widen access only after you have logs showing what the agent actually calls.

What to do next

Run the audit above on your most-used server, and write the findings down. Then fold the approval question into your agent design, because the controls that matter most are the ones that put a human in front of risky calls. If you are new to the protocol, start with What is MCP?.

Frequently asked questions

What is the current MCP specification version? As of October 2026 the specification site publishes revision 2026-07-28 as the latest. Check the MCP specification for newer revisions.

What is the confused deputy problem in MCP? It is an attack on MCP proxy servers that use a static client ID with a third-party authorization server. A consent cookie from an earlier approval lets an attacker skip the consent screen and capture an authorization code. The fix is per-client consent held by the proxy.

What is token passthrough and why is it forbidden? It is when an MCP server accepts a token not issued for it and forwards it to a downstream API. The spec forbids it because it bypasses security controls, breaks audit trails and creates trust boundary problems.

How should I secure a local MCP server? Show the full command before the first run, require explicit approval, run the server in a sandbox with minimal privileges, and prefer the stdio transport or restricted sockets so other local processes cannot connect.

Does the protocol stop tool poisoning? No. The spec says tool descriptions should be treated as untrusted unless they come from a trusted server, and that MCP cannot enforce safety at the protocol level. Approvals, filtering and least-privilege credentials are your controls.

How many scopes should an MCP server request? As few as possible. The spec recommends a minimal initial set and incremental elevation when a privileged operation is first attempted.

MCP and tool use

Your next step

Reading is the start. Turn it into skill: read the chapter, practise on something real, check the numbers, then follow a path.

  1. Read · ChapterModel Context Protocol (MCP)
  2. Practise · Debug challengeTool Error Cascade
  3. Use a free toolModel Explorer
  4. Follow a roadmapAgentic AI Engineer roadmap
All articles on MCP and tool use
#MCP#MCP security#OAuth#SSRF#least privilege#AI agents

Discuss this article

Got a question, a counter-example or a correction? Bring it to the community.

Join the discussion

Email updates

Enjoyed this? Get the next guide by email.

One email when something substantial is published. No digests, no daily drip. Unsubscribe in one click.

We will email you a confirmation link first, then send an occasional email when a substantial guide is published. Unsubscribe in one click. Stored on our own servers, never sold or shared. See the privacy policy.

Prefer a feed reader? Follow by RSS.