Guide

MCP security tools: how to scan and protect Model Context Protocol servers

  • By AI Defense Stack team
  • Published
  • Last reviewed

Executive summary

What it is
MCP security tools control the Model Context Protocol servers that give AI agents their tools. They come as scanners that vet a server before approval, gateways that police live calls, sandboxes that contain server code and detectors that watch agent sessions.
The risk
Hidden instructions in a tool description, a server that changes after you approve it, or a local server running with your privileges can make an agent leak files, keys or tokens to an attacker.
What to buy or do
Scan and pin a short list of approved servers, route calls through a gateway with least-privilege scopes, sandbox local servers, keep human approval for sensitive tools, and log every tool call so you can investigate.

Short answer

One poisoned tool description or one compromised local MCP server can make an agent send your SSH keys, files or OAuth tokens to an attacker, because an MCP server is both code the agent runs and text the model reads. Four kinds of tool address this: scanners vet a server before you connect it, gateways enforce policy on live calls, sandboxes contain server code, and detection tools watch what agents do. The MCP specification says there should always be a human in the loop with the ability to deny tool invocations, so keep approval and pinning in place whichever tools you buy.

How MCP changes the attack surface

The Model Context Protocol lets an application expose tools to a language model, and the specification describes those tools as model-controlled: the model can discover and invoke them on its own. An MCP server can therefore be attacked as code and as text.

The specification’s security best practices page covers the code and authorization side: confused deputy proxies, token passthrough, server-side request forgery, local server compromise and over-broad scopes. Invariant Labs described the text side in a post dated April 1, 2025: tool poisoning, rug pulls and tool shadowing. The last column below is our analysis.

RiskWhat it isWhere it is documentedControl that helps (our analysis)
Tool poisoningMalicious instructions hidden in a tool description that the model reads and the user usually does not seeInvariant Labs post, April 1, 2025Scanner before approval, and a client that shows the full description
Rug pullA server changes a tool description after the client has approved itInvariant Labs post, April 1, 2025Gateway or wrapper that pins the approved configuration and blocks calls when it changes
Tool shadowingOne server’s description changes how the agent uses a trusted tool from another serverInvariant Labs post, April 1, 2025Gateway rules over sequences of tool calls, and boundaries between servers
Local server compromiseA downloaded or configured local server runs commands with the client’s privilegesMCP specification, security best practicesShow the exact command before approval, and run the server in a sandbox
Token passthroughA server accepts tokens that were not issued to it and forwards them downstreamMCP specification, security best practicesServer code that rejects every token not issued for it
Confused deputyAn MCP proxy with a static client ID lets a malicious client obtain an authorization code without the user’s consentMCP specification, security best practicesPer-client consent in the proxy, a design fix that no scanner provides
Over-broad scopesA stolen token with wildcard scopes exposes unrelated tools and dataMCP specification, security best practicesMinimal starting scopes, raised step by step

OWASP files the agent side under excessive agency, whose prevention list starts with minimizing the extensions an agent can reach and requiring user approval. Poisoned tool text behaves like prompt injection, and a malicious package behind a server is a supply chain problem. In our AI Security Layers model these tools sit in the agent and tool access layer, which limits what agents can reach; MCP scanners also count toward the model and supply chain layer.

How we picked

We include tools from our agent security category that document an MCP or agent tool control on a page we could open. We compile from public repositories and vendor pages and do not run the products, so nothing here measures detection quality. Every fact chip links its source and check date, and our methodology explains the Coverage Score.

MCP scanners, gateways, sandboxes, detection tools and platforms compared by type, deployment, pricing model, OWASP risks and Coverage Score
Tool Type Deployment Pricing model OWASP risks Coverage Score
MCP-Scan Snyk (Invariant Labs) Now Snyk Agent Scan Open sourceApache-2.0
  • CLI
  • SaaS
Not published
  • LLM01 Prompt Injection
  • LLM06 Excessive Agency
Coverage Score 63 out of 100
Cisco MCP Scanner Cisco Open sourceApache-2.0
  • CLI
  • Library
  • API
Free
  • LLM01 Prompt Injection
  • LLM03 Supply Chain
Coverage Score 61 out of 100
Cisco Skill Scanner Cisco Open sourceApache-2.0
  • CLI
  • Library
  • API
Free
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
Coverage Score 60 out of 100
Lasso MCP Gateway Lasso Security Open sourceMIT
  • Self-hosted
  • CLI
Free
  • LLM01 Prompt Injection
  • LLM03 Supply Chain
Coverage Score 57 out of 100
mcp-context-protector Trail of Bits Open sourceApache-2.0
  • CLI
Free
  • LLM01 Prompt Injection
Coverage Score 53 out of 100
Invariant Guardrails Snyk (Invariant Labs) Open sourceApache-2.0
  • Library
Free
  • LLM01 Prompt Injection
  • LLM06 Excessive Agency
Coverage Score 54 out of 100
Docker MCP Gateway Docker Open sourceMIT
  • CLI
  • Self-hosted
Free
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 72 out of 100
ContextForge IBM Open sourceApache-2.0
  • Self-hosted
Free
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 64 out of 100
agentgateway agentgateway (a Series of LF Projects, LLC) Open sourceApache-2.0
  • CLI
  • Self-hosted
  • Cloud-native
Free
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 69 out of 100
OpenShell NVIDIA Open sourceApache-2.0
  • CLI
  • Self-hosted
  • Cloud-native
Free
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 64 out of 100
Uber ADR Uber Open sourceApache-2.0
  • CLI
  • Library
  • Self-hosted
Free
  • LLM01 Prompt Injection
  • LLM06 Excessive Agency
Coverage Score 59 out of 100
DefenseClaw Cisco Open sourceApache-2.0
  • CLI
  • Self-hosted
Free
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 76 out of 100
Operant AI Operant AI Commercial
  • Cloud-native
Not published
  • LLM01 Prompt Injection
  • LLM06 Excessive Agency
Coverage Score 39 out of 100
Straiker Straiker Commercial
  • SaaS
  • On-prem
Not published
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 49 out of 100
Pillar Security Pillar Security Commercial
  • SaaS
  • Self-hosted
Not published
  • LLM01 Prompt Injection
  • LLM02 Sensitive Information Disclosure
  • LLM06 Excessive Agency
Coverage Score 48 out of 100

Coverage Score measures what each vendor documents publicly, within one category. What this measures. Pricing models are as stated on each vendor's page; check the vendor for current pricing.

Scanners: vet a server before you connect it

A scanner reads a server’s tool definitions, and in some products its code and packages, and reports risky patterns. Run it before approval and again on every update, because of the rug pull case above.

A clean scan is not proof of safety

A scanner reports what its rules and models can find. A server that passes today can change tomorrow, and no scan finds weak authorization in the server’s own design. Keep approval and pinning in place.

MCP-Scan (Snyk Agent Scan)

Snyk (Invariant Labs) · MCP server and agent skill security scanner

Open sourceApache-2.0 Now Snyk Agent Scan

MCP-Scan, now published as Snyk Agent Scan, scans MCP servers, including their tools, prompts and resources Source, checked October 21, 2026: github.com (opens in a new tab) , and it looks for tool poisoning and tool shadowing in MCP tool definitions Source, checked October 21, 2026: github.com (opens in a new tab) . It also auto-discovers agent configurations for Claude Code, Cursor, VS Code, GitHub Copilot, Windsurf and Gemini CLI Source, checked October 21, 2026: github.com (opens in a new tab) . On ownership, Snyk announced on June 24, 2025 that it has acquired Invariant Labs, the company that published MCP-Scan. Source, checked October 21, 2026: labs.snyk.io (opens in a new tab) The scan calls Snyk’s API, so read the tool page before you run it on private configurations. Best for developers checking the MCP servers and skills in their coding agents.

Cisco MCP Scanner

Cisco · open-source MCP server scanner

Open sourceApache-2.0

Cisco MCP Scanner scans MCP server tools, prompts, resources and server instructions, on remote or stdio servers and from client config files Source, checked October 21, 2026: github.com (opens in a new tab) . Its threat taxonomy lists tool poisoning and tool shadowing among the threats its analyzers detect Source, checked October 21, 2026: github.com (opens in a new tab) . The tool page lists its offline mode for CI and the latest release October 20, 2026 Source, checked October 21, 2026: api.github.com (opens in a new tab) . Best for security and platform teams that vet servers in CI before approval.

Cisco Skill Scanner

Cisco · open-source scanner for AI agent skills

Open sourceApache-2.0

Agent skills are the newer attack path: a skill file and its scripts load straight into the agent. Cisco Skill Scanner scans agent skills for prompt injection, data exfiltration and malicious code patterns before they run Source, checked October 21, 2026: github.com (opens in a new tab) , and an LLM analyzer reviews SKILL.md and scripts for semantic risks such as injected instructions, and needs an API key Source, checked October 21, 2026: github.com (opens in a new tab) . Best for teams that let developers install agent skills and want a check in GitHub or a pre-commit hook.

Gateways and wrappers: enforce policy on live calls

A gateway or wrapper sits between client and server, so it can pin, block, mask, log or quarantine what passes. It only sees traffic routed through it, so block direct connections around it.

Lasso MCP Gateway

Lasso Security · open-source plugin gateway for MCP servers

Open sourceMIT

Lasso MCP Gateway acts as a proxy between an LLM agent and other MCP servers, intercepting requests and responses Source, checked October 21, 2026: github.com (opens in a new tab) . Its scan option checks MCP server reputation and tool descriptions before loading and can block risky servers Source, checked October 21, 2026: github.com (opens in a new tab) . Note that the lasso plugin sends content to Lasso's API to check for prompt injection, among other risks, and needs a Lasso API key Source, checked October 21, 2026: github.com (opens in a new tab) . Best for developers who want one self-hosted gateway with swappable plugins.

mcp-context-protector

Trail of Bits · MCP security wrapper with server pinning

Open sourceApache-2.0

mcp-context-protector runs as a wrapper between an MCP client and a downstream server, so it works with any MCP app Source, checked October 21, 2026: github.com (opens in a new tab) . It pins an approved server configuration and blocks downstream tool calls when it changes until the user approves it again Source, checked October 21, 2026: github.com (opens in a new tab) , and with a guardrail provider such as LlamaFirewall, scans tool responses for prompt injection and quarantines flagged ones Source, checked October 21, 2026: github.com (opens in a new tab) . Best for developers running third-party servers in a desktop MCP client who want changes held until they approve them.

Invariant Guardrails

Snyk (Invariant Labs) · rule-based guardrail layer for agents and MCP

Open sourceApache-2.0

Invariant Guardrails evaluates rules on each LLM and MCP request, before and after, through the Invariant Gateway Source, checked October 21, 2026: github.com (opens in a new tab) . It intercepts tool calls and applies rules to them, such as blocking an external email after an inbox is read Source, checked October 21, 2026: github.com (opens in a new tab) . On ownership, Snyk announced on June 24, 2025 that it has acquired Invariant Labs, the company behind Invariant Guardrails. Source, checked October 21, 2026: labs.snyk.io (opens in a new tab) Check maintenance first: the tool page shows the latest release July 28, 2025 Source, checked October 21, 2026: pypi.org (opens in a new tab) . Best for teams that want to write their own rules over chains of tool calls.

Docker MCP Gateway

Docker · open-source container gateway for MCP servers

Open sourceMIT

Docker MCP Gateway acts as a central proxy between AI clients and MCP servers, starting a server when a tool is requested Source, checked October 21, 2026: docs.docker.com (opens in a new tab) . It lets you choose which servers and tools a client can use, with the --servers and --tools options and per-profile tool lists Source, checked October 21, 2026: github.com (opens in a new tab) , and its gateway options can block secret-like values in tool-call arguments and responses, and can block network access for tools Source, checked October 21, 2026: github.com (opens in a new tab) . It logs tool calls and traces them; the call log records tool names and argument shape metadata, not raw argument values Source, checked October 21, 2026: github.com (opens in a new tab) . Best for developers who already run Docker and want each MCP server in its own container behind one entry point.

IBM ContextForge

IBM · open-source MCP and A2A gateway and registry

Open sourceApache-2.0

IBM ContextForge federates MCP servers, A2A agents and REST or gRPC APIs behind one gateway endpoint Source, checked October 21, 2026: ibm.github.io (opens in a new tab) . It documents role-based access control and authorizing tools in virtual servers, with JWT, OAuth and SSO sign-in Source, checked October 21, 2026: ibm.github.io (opens in a new tab) , and it has a plugin framework with hooks before and after tool, prompt, resource, HTTP and agent calls, including a PII filter plugin Source, checked October 21, 2026: ibm.github.io (opens in a new tab) . Best for platform teams that need one registry and endpoint for many MCP servers, A2A agents and APIs.

agentgateway

agentgateway (a Series of LF Projects, LLC) · open-source proxy for agent, MCP and LLM traffic

Open sourceApache-2.0

agentgateway connects agents to MCP servers through one gateway, with tool federation, OpenAPI integration and OAuth Source, checked October 21, 2026: github.com (opens in a new tab) . Its tool page lists the MCP authorization rules, guardrail hooks and tool call logging it documents. Best for teams that want one open-source proxy for agent, MCP and LLM traffic.

Sandboxes: contain the server and the agent

The MCP specification says clients should run MCP server commands in a sandboxed environment with minimal default privileges, with restricted access to the file system, network and other system resources, using containers, chroot or application sandboxes. A sandbox limits what a compromised server can touch even after a scanner and a gateway miss it.

NVIDIA OpenShell

NVIDIA · open-source runtime for sandboxed AI agents

Open sourceApache-2.0

NVIDIA OpenShell runs each agent in an isolated sandbox, with Landlock limiting file access and seccomp limiting system calls Source, checked October 21, 2026: docs.nvidia.com (opens in a new tab) . Its declarative YAML policies cover filesystem, process, network and provider credentials, and outbound traffic is allowed only to approved destinations Source, checked October 21, 2026: docs.nvidia.com (opens in a new tab) , and it adds credentials only to requests bound for approved endpoints, so the agent never sees the real credential Source, checked October 21, 2026: github.com (opens in a new tab) . Best for teams that want file, network and credential limits for each agent set in policy files.

Teams that host agent workloads on Kubernetes can compare Kubernetes Agent Sandbox, and our guide to securing AI agents covers Strands Box.

Detection and response: see what agents actually did

Scanners and gateways act on servers you know about. Detection tools look at the endpoint, find MCP servers and agents nobody registered, and record tool calls for investigation. In our model this is the monitoring and response band that runs across every layer.

Uber ADR

Uber · open-source agent detection and response toolkit

Open sourceApache-2.0

Uber ADR discovery inventories AI apps, CLI agents, IDE extensions, local model runtimes and MCP servers on endpoints and flags unknown surfaces for review Source, checked October 21, 2026: github.com (opens in a new tab) . Its sensor sensor collects user and assistant text, tool calls with arguments and results, and session context from 11 listed coding agents Source, checked October 21, 2026: github.com (opens in a new tab) . Note how it exports: it exports session records as JSON files, or over OTLP/HTTP to an OpenTelemetry endpoint (off by default, with no redaction) Source, checked October 21, 2026: github.com (opens in a new tab) . Best for security teams that want open-source visibility into coding agents on developer machines.

Cisco DefenseClaw

Cisco · open-source governance layer for coding agents

Open sourceApache-2.0

Cisco DefenseClaw scans skills and MCP servers before an agent loads them, wrapping Cisco's skill and MCP scanners; critical and high findings quarantine a skill by default Source, checked October 21, 2026: cisco-ai-defense.github.io (opens in a new tab) . Its inspection engine checks LLM prompts, completions and tool invocations for injection attacks, data exfiltration and command-and-control patterns Source, checked October 21, 2026: blogs.cisco.com (opens in a new tab) , and it records every decision in a local audit database and exports to OTLP, Splunk HEC, Prometheus and JSONL destinations Source, checked October 21, 2026: cisco-ai-defense.github.io (opens in a new tab) . Best for teams that want scanning, inspection and logging for coding agents in one open-source layer.

Platforms: discovery, policy and monitoring from one vendor

These commercial platforms publish MCP features on their own pages and no prices. The claims are vendor statements, so ask each vendor to show the MCP features in each plan.

Operant AI

Operant AI · runtime security platform for AI, agents and MCP

Commercial

Operant AI offers an MCP Gateway for enterprise MCP security Source, checked October 21, 2026: operant.ai (opens in a new tab) . It also applies registries, allow and deny lists and access controls to MCP Source, checked October 21, 2026: operant.ai (opens in a new tab) . Best for platform teams running agents and MCP servers on Kubernetes.

Straiker

Straiker · agent discovery, testing and defense platform

Commercial

Straiker checks MCP servers and tool connections against its own MCP Threat Database of local and remote MCP risks Source, checked October 21, 2026: straiker.ai (opens in a new tab) . It also blocks or revokes risky MCP and tool access Source, checked October 21, 2026: straiker.ai (opens in a new tab) . Best for teams that want discovery, adversarial testing and runtime blocking for MCP-connected agents from one vendor.

Pillar Security

Pillar Security · AI agent security platform

Commercial

Pillar Security catalogs agents, models, tools, MCP servers and skills, including shadow AI Source, checked October 21, 2026: pillar.security (opens in a new tab) . It also scans agent configurations, permissions and identities for excessive permissions Source, checked October 21, 2026: pillar.security (opens in a new tab) . Best for security teams that want agent discovery and runtime guardrails with the option to keep data in their own VPC.

Limits

  • Weak authorization in the server itself. Token passthrough, confused deputy flaws and over-broad scopes are fixed in server or proxy code, which the specification spells out. No scanner replaces those fixes.
  • Approval screens that hide arguments. Invariant Labs reports that in its Cursor experiments the confirmation dialog showed only a summarized tool name, not the full tool input. Check what your client shows before you rely on approval.
  • Wider agent risk. Over-powered tools and unchecked autonomy are covered in our guide to securing AI agents.

Deployment checklist

Items 2, 4, 5 and 7 follow the MCP specification’s security guidance; the rest is our analysis.

  1. List every MCP server, skill and client in use, including ones developers added themselves. A detection tool on endpoints finds the ones nobody registered.
  2. Treat each server as untrusted code. Show the exact command before a local server is approved, and run it in a sandbox with minimal privileges.
  3. Scan before approval and on every update, then pin the approved configuration so a change needs a new approval.
  4. Keep a human in the loop for sensitive operations, with tool inputs visible before the call.
  5. Use least-privilege scopes, and accept only tokens issued for the server.
  6. Route servers that need central policy through a gateway, and block connections around it.
  7. Log tool usage and send it where your security team investigates incidents.
  8. Attack the result. Our guide to open-source AI red teaming tools lists tools that probe agents and their tool use.

Choose a scanner if

Our analysis
  • You want servers and skills vetted before anyone approves them.
  • You want a check that runs in CI or offline.
  • You want agent configurations found on developer machines.

Choose a gateway or wrapper if

Our analysis
  • You want policy and logs in the live path between client and server.
  • You want changes to an approved server held until a person reviews them.
  • You need per-tool allow lists for each client or team.

Choose a sandbox if

Our analysis
  • You run local or third-party servers whose code you have not read.
  • You want file, network and credential limits that hold even when a scan misses something.

Choose detection and response if

Our analysis
  • You do not know which agents and MCP servers run on your endpoints.
  • Your security team needs tool call records to investigate incidents.

For prompt-level screening of the text that reaches the model, see prompt injection detection tools.

Frequently asked questions

What is tool poisoning in MCP?

Invariant Labs, which named the attack in a post dated April 1, 2025, defines it as malicious instructions embedded in MCP tool descriptions that are invisible to users but visible to AI models. It is a specialized form of indirect prompt injection. Scanners and approval screens that show the full description are the usual defenses.

What is an MCP rug pull?

It is a case where a malicious server changes a tool description after the client has already approved it, so a server you trusted earlier can turn hostile later. Pinning an approved configuration and blocking calls when it changes, as mcp-context-protector does, targets this case.

What is the difference between an MCP scanner and an MCP gateway?

A scanner reviews a server, and sometimes its code and packages, before you connect it. A gateway or wrapper sits in the live connection and can block, mask, log or quarantine traffic. Scanners find known problems early, and gateways limit damage while the server runs. Many teams use both.

Does the MCP specification require a human to approve tool calls?

The current draft of the Tools page says that for trust and safety there should always be a human in the loop with the ability to deny tool invocations, and it lists confirmation prompts as something applications should present. That wording is advice to implementers, so check what your own MCP client actually enforces.

What is token passthrough, and why does the MCP specification forbid it?

Token passthrough is an anti-pattern where an MCP server accepts tokens from a client without checking that they were issued to the server, then passes them to a downstream API. The specification says servers must not accept tokens that were not explicitly issued for them, because it breaks audit trails and security controls.

Key facts you can cite

Sources & last reviewed

Last reviewed . We compile from the vendors' own public pages and repositories and we do not run the products. Source links open in a new tab. Found a mistake? Report a correction.

Drafted with AI assistance; facts checked against primary sources on October 21, 2026.

Standards and references (4 sources)
MCP-Scan (Snyk Agent Scan) (9 sources)
Cisco MCP Scanner (10 sources)
Cisco Skill Scanner (5 sources)
Lasso MCP Gateway (4 sources)
mcp-context-protector (6 sources)
Invariant Guardrails (7 sources)
Docker MCP Gateway (8 sources)
IBM ContextForge (6 sources)
agentgateway (12 sources)
NVIDIA OpenShell (6 sources)
Uber ADR (5 sources)
Cisco DefenseClaw (14 sources)
Operant AI (2 sources)
Straiker (4 sources)
Pillar Security (2 sources)