What is MCP security testing?
MCP security testing is a penetration test of the Model Context Protocol server that gives an AI agent its tools. Grapefruit attacks the server, its tool definitions and the auth in front of it, then hands you the exact request that proves each successful attack. The focus is the server and its tools, not the model that calls them.
An MCP server hands an AI real power: it can read a record, send a message, move money, delete a file. If the server trusts the model or the caller too much, those tools become the attack. The test checks whether anyone, or anything the agent reads, can make your tools run for them. The more a tool can do, the more an attacker wants to reach it through your server.
Why does an MCP server need its own test?
An MCP server needs its own test because it sits between an unpredictable model and your real systems, and it is the only place that can say no. The agent will pass whatever arguments the model chooses. The server decides whether to run the call, for whom, and with what scope. That decision is where MCP servers break.
The usual mistake is trust in the wrong direction. The server assumes the model is well behaved and the caller is who they claim, so it runs a tool with the ID it was handed, against the tenant it was told, with scopes far wider than the task needs. Each of those assumptions is a way in, and each is testable. Narrow the scopes and enforce ownership on the arguments a tool receives, and most of these holes close at once.
Which attacks do you run against an MCP server?
Grapefruit runs the attacks that land on real MCP servers: the ones that abuse trust in the model's arguments, in the tool descriptions, and in whoever is calling. Each is run against your deployed server with the test accounts you supply, and each successful one ends in an action your server performed for the attacker.
- Tool arguments trusted blindly. A tool reads a record by the ID the model passes. Supply another tenant's ID and the server returns their data, because it never checked who the call was for.
- Tool poisoning. A tool description carries hidden instructions. The agent reads the description as part of its setup and follows the planted orders, steering it toward tools and data it should leave alone.
- Weak or missing auth on the endpoint. The MCP endpoint answers calls with no token, a shared token, or one that is never scoped, so reaching the server is the same as owning every tool on it.
- Confused deputy. One server is tricked into using another server's capability or credentials on the attacker's behalf, so a call that should have been refused runs with borrowed authority.
- Over-broad tool scopes. A tool built for one small job holds permissions for many, so a single misused call reaches far past what the feature ever needed.
- Verbose error and debug output. A tool returns errors that leak internal paths, connection strings or another caller's data, handing an attacker the map for the next call.
How does it map to the OWASP Top 10 for Agentic Applications?
Grapefruit maps MCP server testing to the OWASP Top 10 for Agentic Applications for 2026. The four risks below are where MCP servers fail most, and the table shows what we attack on your server under each one. Findings in the portal carry the captured request and response, so a category name always comes with proof.
| ASI id | Risk | What we attack on your MCP server |
|---|---|---|
| ASI02 | Tool Misuse | Tool arguments the model fills in: IDs, URLs, amounts, recipients, run against data the caller should not reach |
| ASI07 | Insecure Inter-Agent Communication | Messages and calls between servers and agents, including one server tricked into acting as another's deputy |
| ASI03 | Identity & Privilege Abuse | Auth on the endpoint and the scopes each tool holds, tested for missing checks and permissions wider than the task |
| ASI01 | Agent Goal Hijack | Tool descriptions and tool output that carry hidden instructions to steer the agent (tool poisoning) |
How do you prove an MCP finding is real?
Every Grapefruit finding arrives with the exact request and response that proves it. Your engineer pastes the request, runs it against the MCP server, and watches the tool make the call it should have refused: another tenant's record returned, an action run with no valid token. After the fix, run it again and watch it fail.
That matters most for AI, where findings are easy to dispute. In a Pentest-Tools survey of 158 respondents in June 2026, 87.8% hit AI pentest findings that needed significant manual validation, and 53% ranked proof of exploit as a top buying factor. A request you can replay answers both, and doubles as the regression test for the fix.
How is this different from testing the whole agent?
This test stays on the server. AI agent security testing covers the whole agent: its reasoning, its memory, the content it reads, every tool it can reach. MCP security testing narrows to the MCP server and its tools: the endpoint, the auth, the tool definitions, the scopes, and whether the server enforces ownership on the arguments it is handed.
The two fit together. If your product ships agents, you want the broad agent test. If you build, host or expose an MCP server, to your own agents or to someone else's, this is the test that attacks that server directly. Grapefruit can run both in one engagement and report them in one place, so a chain that starts in the model and ends in a tool call shows up as one finding.
How do you start MCP security testing?
You can start today. Point Grapefruit at the MCP server, verify the domain, sign the testing authorization online, and supply test accounts so the tools are attacked as a real caller. The first results land within hours of kickoff. There is no demo call and no scheduling step between signing and the first finding. A full test is a fixed quote, and maintenance plans re-test your verified domains every week or month as your tools change.
- Add the hostname where your MCP server lives.
- Publish one DNS TXT record to verify the domain.
- Sign the testing authorization online.
- Supply test accounts and any tokens a real caller would use.
- Watch findings arrive in the portal, each with its replayable request.
Questions
- What is the difference between MCP security testing and AI agent security testing?
- AI agent security testing covers the whole agent: its goals, memory, the content it reads and every tool it can reach. MCP security testing focuses on the MCP server and its tools: the endpoint, the auth, the tool definitions and the scopes. If you build or host an MCP server, this is the test that attacks it directly. Grapefruit runs both in one engagement.
- Do you test MCP servers we built and ones we only connect to?
- The test targets the MCP server and tools reachable through your deployed product. A server you built and host is attacked directly: its endpoint, auth, tool arguments and scopes. For a third-party server your product connects to, Grapefruit tests how your side trusts it, including whether its tool descriptions or output can steer your agent. Point us at what you expose.
- What is tool poisoning?
- Tool poisoning is when a tool description, or the data a tool returns, carries hidden instructions that the agent reads and follows. Because an agent treats tool definitions as trusted setup, planted text can steer it toward tools and data it should leave alone. Grapefruit tests whether your server's tool descriptions and tool output can carry instructions that change the agent's behavior.
- Will the test trigger real tool calls in my product?
- Yes, and that is how a finding gets proven. The test uses real exploitation through the test accounts you supply, so tool calls land on data you control. Point us at staging or a dedicated test tenant and every action a tool takes stays there. You choose the target before anything runs.
- What do I get for each finding?
- Each finding has a severity of critical, high, medium or low, a plain description of what the server was talked into doing, and the captured request and response that prove it. Your engineer replays the request to see the tool run the call it should have refused, then replays it after the fix to confirm it fails. Everything sits in the portal with a downloadable report.
- How often should an MCP server be tested?
- Test whenever the server changes: a new tool, a wider scope, a new auth flow, a new caller. A weekly or monthly maintenance plan re-tests your verified domains on a schedule, keeps each dated run in the portal, and shows what is new and what got fixed. A tool you add this week is attacked on the next run.