Model Context Protocol (MCP) is how LLMs reach your data, databases, and tools. That's powerful — and it's also a confused-deputy attack surface your traditional pen test won't see. Here's what an MCP security assessment actually tests, the four real attack paths, and how to audit yours before a breach.
An MCP security assessment is a specialized review of the servers that connect your LLM to external systems — databases, APIs, local runtimes, and SaaS tools — over the Model Context Protocol. Where a standard pen test checks web apps, an MCP assessment evaluates the three layers that make MCP uniquely dangerous: the transport and authentication between client and server, the tool schema the model can invoke, and the context boundary that separates instructions from untrusted data.
It matters because MCP is now the standard bridge in production AI. As Google DeepMind's Simon Willison put it when MCP shipped, the risk is structural: "The model is an authenticated agent acting with the service credentials of whatever server it connects to."
Here's the uncomfortable truth about MCP. When you connect an LLM to an MCP server, the model inherits that server's credentials — including high-privilege database connections, API keys, and tool access. And because an LLM can't reliably tell instructions from data in the same context window, an untrusted input (a customer ticket, a scraped webpage, an ingested PDF) can instruct the model to invoke a high-privilege tool you never intended it to touch.
In 2026 the biggest exposure isn't the MCP server you deliberately deployed. It's the ones you don't know about. Engineering teams spin up stdio or SSE-based MCP servers to "just connect the agent to the DB" — often with an embedded API key hardcoded in a config file that gets committed to a public repo. These shadow deployments bypass your API gateway, your secrets manager, and your security posture management entirely. You're auditing a fleet you don't have an inventory of.
That's why the first question in any real assessment is: what MCP servers exist, and who can reach them?
An attacker plants a hidden payload inside a data source the MCP server reads — a public GitHub issue, a shared Google Doc, a database record. When a user asks the model to process that resource, the returned payload contains something like:
The model interprets the injected data as system instructions and invokes a secondary MCP tool to exfiltrate data or change state — with no human in the loop.
An MCP server exposes a tool with loose parameter validation — execute_query(sql: string) or render_template(body: string). A prompt injection forces the model to pass a malicious payload into those arguments: SQL injection, command chaining (| curl evil.com), or path traversal (../../etc/passwd). Result: remote code execution or arbitrary DB manipulation on the server, past the LLM's front-end safety filters.
A remote MCP server uses SSE/HTTP without mutual TLS or token verification — or a developer leaves mcp_config.json in a public repo. Locally, malware reads plaintext API keys and connection strings from ~/.config/ or the project root. Remotely, a man-in-the-middle sniffs unauthenticated JSON-RPC and issues tool requests to internal endpoints. The credentials ride in plaintext and nobody is watching.
No mTLS, no OAuth token scoping, a generic bearer token that authorizes everything instead of tool-level scopes. If your MCP server accepts one token for all tools, a single leaked credential grants the full blast radius.
| Assessment layer | What a consultant tests |
|---|---|
| Transport & auth | Auth headers on SSE/WebSocket; token scoping; unencrypted DB URIs, PATs, and keys in config; mTLS enforcement. |
| Tool schema & params | Input-validation fuzzing (path traversal, shell metacharacters, SQL payloads); least-privilege check (exec_command vs fetch_by_id); mandatory human-in-the-loop on destructive tools. |
| Context boundary | Indirect-injection resistance; whether the client delimits system context from untrusted tool output. |
| Sandbox & blast radius | Container isolation for stdio/Docker servers; egress limits; can an exploited server reach the host or cross tenants? |
mcp_config.json and any committed config; move to a secrets manager.fetch_user_by_id) over open-ended ones (run_bash, execute_sql).delete_*, write_*, deploy_*, and anything that sends or pays should confirm first.Related: Prompt Injection: LLM's #1 Risk · What Is an AI Security Audit? · AI Guardrail Setup