Black FridayGet a quick pentest for $1.99. Black Friday deal, this weekend only.Claim it →
← All cybersecurity posts

MCP Servers Are the New Attack Surface Nobody Is Testing

Every week another team ships an MCP server that wires an LLM agent straight into their database, their ticketing system, or their cloud console. The Model Context Protocol (MCP) has become the default way agents call tools, and almost nobody treats these servers as what they actually are: a new network-facing attack surface with privileged credentials behind it.

We've started seeing MCP servers in client environments the same way we saw unmanaged APIs a decade ago — spun up fast, trusted implicitly, and never pentested. That gap is exactly where the next wave of agentic AI breaches will come from.

Why MCP changes the threat model

A traditional API has a fixed, documented set of operations. An MCP server exposes "tools" — natural-language-described functions — to an LLM that decides at runtime which ones to call, with what arguments, and in what order. The attacker doesn't need to find a bug in your code; they need to find a way to persuade the model.

That shifts the primary attack vector from memory corruption and injection bugs to prompt-mediated authorization bypass. If an MCP tool can delete a record, send an email, or run a shell command, the question isn't "is this input sanitized" — it's "can anything the model reads, anywhere in its context, talk it into calling this tool when it shouldn't."

And "anything the model reads" is a much bigger surface than most teams realize: a support ticket, a PDF attachment, a webpage the agent fetched, a Slack message, a field in a CRM record. If an MCP-connected agent ever ingests untrusted content and later has tool access, you have an indirect prompt injection pathway.

The five vulnerability classes we keep finding

1. Tool-scope creep. MCP servers are often built by exposing whatever internal client library already exists — so a "read customer email" tool quietly also has write, delete, and admin methods reachable through the same endpoint because nobody trimmed the schema. We've pentested servers where a tool named get_user_profile accepted an action parameter that, undocumented, also supported delete.

2. Missing per-call authorization. Many MCP servers authenticate once at session start and then trust every subsequent tool call from that session, even if the task shifted from "summarize my calendar" to "transfer funds." There's no re-check that the specific tool call is appropriate for the current task or the current user's actual permission level — the server assumes the model is a trusted intermediary, which it isn't.

3. Indirect prompt injection via tool outputs. A tool that fetches a webpage, reads a file, or queries a ticketing system returns content the model will treat as instructions-adjacent context. We've demonstrated payloads embedded in a support ticket's body field that, once read back into context by a "fetch_ticket" tool, instructed the agent to call an unrelated "export_database" tool later in the same session.

4. No audit trail tied to intent. Logs show "tool X called with arguments Y" but almost never capture why — which upstream prompt or document triggered the call. When something goes wrong, teams can't reconstruct the injection chain because the MCP server logs the symptom, not the cause.

5. Overprivileged service accounts. Because MCP servers are often stood up quickly, they're frequently handed a single service-account credential with broad scope "to make the demo work," and that scope is never revisited before the integration goes to production.

How we test an MCP server

A proper pentest of an MCP integration borrows from both classic API security testing and newer LLM red-teaming, because the attack chain spans both layers.

  • Enumerate the real tool surface, not the documented one. Call tools/list directly against the server (bypass the model entirely) and diff it against what the product documentation claims exists. Undocumented or deprecated-but-still-live tools are common.
  • Fuzz each tool's parameters directly, treating the MCP server as an API. Authorization and injection bugs at this layer are found the same way you'd find them in a REST endpoint — parameter tampering, IDOR-style object reference swaps, boundary values.
  • Build indirect injection payloads and place them in every data source the agent might read during normal operation — ticket bodies, file contents, scraped pages, chat history — then observe whether a later, unrelated tool call gets triggered.
  • Test cross-session and cross-tenant isolation. If the MCP server is multi-tenant, confirm that a tool call scoped to tenant A can never, under any crafted argument, touch tenant B's data.
  • Review credential scope against least privilege. Pull the service account's actual IAM policy or database grants and compare it to what the exposed tools need. It's almost always wider.
  • Trace the audit log back to intent. Deliberately trigger an injected tool call and confirm whether the resulting log entry gives a responder enough information to find the injection source without replaying the entire session transcript.

What to fix first

If you run an MCP server in production today, the highest-leverage fixes are the cheapest ones: trim every tool's parameter schema to exactly the operations it needs (no generic action fields), add per-call authorization checks instead of session-level trust, and separate "read" and "write" tools onto distinct credentials so a prompt injection that only has read-tool access can't escalate to a write-tool call. After that, invest in structured logging that captures the triggering context alongside every tool call — it's the difference between a five-minute incident review and a two-day forensic reconstruction.

Agentic AI is moving fast enough that "we'll secure it later" isn't a viable plan — the tool-calling layer is becoming the new perimeter, and perimeters get probed the moment they exist.

Frequently asked questions

Is MCP itself insecure, or is this an implementation problem? The protocol is implementation-agnostic about authorization — it doesn't mandate per-call checks or scope limiting, so the security posture of any given MCP server depends entirely on how its author implemented tool permissions. Most teams ship the minimum needed for the demo to work, which is where the gaps come from.

Can traditional WAFs or API gateways catch MCP attacks? Partially. They can enforce schema validation and rate limiting on the transport layer, but they can't detect prompt-mediated authorization bypass, because the "attack" is a syntactically valid tool call — it's the reasoning that led to the call that's malicious, and that reasoning happens inside the model, not on the wire.

What's the fastest way to find out if our MCP server has tool-scope creep? Call tools/list directly against the server with a raw MCP client, independent of any LLM, and manually read every parameter in every tool schema. Any optional action, mode, or type parameter not covered in your product docs is a candidate for review.

Do we need to pentest every MCP server we stand up, even internal ones? Yes, especially internal ones — they're usually granted the broadest service-account scope under the assumption that "it's just for employees," which is precisely the assumption attackers exploit once they've compromised any single employee session or injected content into any internal data source the agent reads.

How does this relate to OWASP's LLM Top 10? It maps most directly to LLM01 (prompt injection) and LLM08 (excessive agency), but MCP servers add a concrete, testable API surface to what used to be a more abstract risk — which is good news, because it means these risks can now be scoped and pentested like any other integration.

Find what attackers can see, before they do.

AI pentesting agents test your web app, API and cloud, and every finding comes with evidence and a fix. First report in about 10 minutes.

Stay ahead of attackers.

New vulnerabilities, breach write-ups and practical fixes. A few emails a month.