Model Context Protocol & Agentic ArchitecturePlaybook3 min readUpdated September 2026

Scanning Your Agent Stack for the Vulnerabilities That Matter

A standard vulnerability scanner will happily check your servers, containers, and dependencies for known CVEs, and it should. What it typically won't check is whether one of your MCP tools can be manipulated through its inputs into doing something it wasn't meant to do, a category of exposure that looks nothing like a traditional CVE but can be just as damaging.

Vendors Covered in this Article

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

Standard scanning still matters, and it's the easier half

Keep your usual dependency and container scanning running against everything your agent stack is built on, the MCP server hosts, the libraries the tools depend on, the model client SDKs. Federal guidance sets an expectation of remediating critical, internet-accessible vulnerabilities within about 15 days of detection1, and that's a reasonable bar to hold your own agent infrastructure to, since these servers are often newer and less battle-tested than the rest of your stack.

What exposure does a standard vulnerability scanner miss?

A tool that constructs a database query or a file path from a value the model provided, without strict validation, can potentially be steered into unintended behavior by a cleverly crafted input, whether that input comes from a user or from content the agent read during a tool call. This is closer to an injection vulnerability than a traditional CVE, and it needs its own review process, reading the tool's implementation with an adversarial eye, not just scanning its dependencies.

Review tool inputs the way you'd review any other untrusted input

Any value a tool receives from the model should be validated and sanitized before it's used to build a query, a file path, or a command, exactly as you would for input coming directly from an end user, because in practice it can be influenced by content the model read from anywhere in its context, not only by what the person typing to it intended.

For example, if a tool accepts a file name from the model, resolve it against an allowed directory and reject anything that points outside it, instead of trusting the string. If a tool accepts an identifier, check that it belongs to the acting user before running the lookup. Validation rules like these belong in the tool, not in the prompt, because a prompt instruction can be overridden by content the model reads, while a check in code cannot.

How often should you review MCP tools for vulnerabilities?

New MCP tools get added over time, and each one needs the same adversarial review the first batch got. Fold this review into your regular tool-shipping process rather than treating it as a separate audit that happens occasionally, since a tool that skips it is the one most likely to be the actual gap when something eventually goes wrong.

A short, written checklist for this review, does this tool build a query, path, or command from a model-provided value, and if so, is that value validated, is enough to catch most of the risk without requiring a dedicated security engineer to personally review every tool before it ships.

Ask these questions in every MCP tool review:

  • Does the tool build a query, file path or command from a value the model provided?
  • If so, is that value validated and sanitized before it is used, exactly as you would treat input from an end user?
  • Is the query built through a parameterized call instead of simple string concatenation?
  • Could content the agent read elsewhere, not just the person typing, influence that value?
  • Was this review done before the tool shipped, as part of the regular tool-shipping process?

A worked example: an exposure that no CVE scanner would have found

Say a tool built to search internal documentation constructs its search query by directly inserting whatever text the model decides is relevant, pulled from the user's conversation. A standard vulnerability scan of the server this tool runs on comes back completely clean, no outdated dependencies, no known CVEs anywhere in the stack.

An adversarial review of the tool's actual code finds the real issue: because the query is built through simple string concatenation rather than a parameterized search call, a user, or content the agent read elsewhere and treated as an instruction, could potentially craft input that broadens the search far beyond what the tool's stated purpose intended. Nothing about this shows up in dependency scanning, because the vulnerability isn't in a library, it's in how the tool itself was written, which is exactly the category of risk that a code-level review catches and an automated scanner does not. The fix, switching to a parameterized query builder, took less than an hour once the review had actually named the problem, which is typical: the review is the expensive part, and the fix, once found, is usually straightforward. Budget time for the review accordingly rather than assuming it can be squeezed in alongside a tool's normal functional testing, since the two require a genuinely different way of reading the same code.

Executive Capability Standard

What Good Looks Like

Thorough security scanning for an agent stack combines standard dependency and container scanning with a dedicated, adversarial review of how each MCP tool handles model-provided input, run as a standing part of shipping any new tool.

Building The Capability (5-Stage Skill Ladder)

1. Learn:Read through your three most-used MCP tools looking specifically for any place a model-provided value builds a query, path, or command.
2. Do Manually:Manually add input validation to any tool you find that's missing it, starting with your highest-traffic one.
3. Delegate:Assign a security-minded engineer to own the adversarial review step for every new tool before it ships.
4. Automate:Add automated input-validation checks and standard dependency scanning to CI so both run on every tool change.
5. Buy:Bring in endpoint and vulnerability management platforms such as CrowdStrike and Tenable to cover the infrastructure layer continuously.

How to Get Started

Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.

Frequently Asked Questions

Does normal vulnerability scanning cover MCP tool risk?

Only partially. It covers known CVEs in the servers, containers, and libraries your tools run on, which still matters, but it doesn't catch a tool that's vulnerable to manipulation through the values a model passes into it, which needs a separate, adversarial code review.

What does an adversarial review of an MCP tool actually look for?

Whether any value the tool receives from the model gets used to build a query, file path, or command without validation first. If so, a cleverly crafted input, potentially even one the agent read from external content rather than typed by a user, could steer that tool into unintended behavior.

Should every new MCP tool go through this review before shipping?

Yes, as a standing part of the tool-shipping process rather than an occasional separate audit. Tools that skip it are consistently the ones that turn out to have the gap when something eventually goes wrong, simply because nobody looked at them with that specific risk in mind.

Sources

Where we quote a benchmark, we show its source. Other figures in this guide are estimates or general guidance, so check them against your own numbers.

  1. Security patch remediation SLAs (CISA federal mandates, used as industry norm). CISA Binding Operational Directives 19-02 and 22-01 (CISA briefing hosted at NIST CSRC), 2022.

Related Guides