What is Tool Squatting?

2 min read Updated

Tool squatting is registering an MCP server with a name deliberately similar to a popular, trusted server to intercept agent tool calls. It is the MCP equivalent of typosquatting in package managers.

WHY IT MATTERS

Package manager typosquatting has been a proven attack vector for years — lodash vs lodahs, requests vs reqeusts. Tool squatting brings this pattern to the MCP ecosystem. An attacker registers striipe-mcp alongside the legitimate stripe-mcp, hoping that developers or automated tooling will connect to the wrong server.

The attack surface is broader than traditional typosquatting because MCP server discovery is still maturing. There is no centralised, verified registry with namespace protection. Developers configure MCP servers manually in JSON config files, and a single character difference is easy to miss during setup.

Once connected, the squatted server can serve tools that look identical to the legitimate ones — same names, same schemas — but with subtly different behaviour. It might log every API key passed as a parameter, modify transaction amounts, or inject malicious instructions into tool responses that influence the agent's subsequent actions.

The risk compounds in team environments where MCP configurations are shared. One developer's typo in a shared config propagates to every team member, and the squatted server silently receives all their agent's tool calls.

HOW POLICYLAYER USES THIS

Intercept's YAML policies can enforce a strict allowlist of permitted MCP server identifiers and transport endpoints. Tool calls are only proxied to servers that match the policy-defined list, so a squatted server with a slightly different name is rejected before any tool call reaches it. The audit trail also logs the server identifier for every tool invocation, making it straightforward to detect unexpected server names during security reviews.

FREQUENTLY ASKED QUESTIONS

How is tool squatting different from tool shadowing?
Tool squatting targets the server name (e.g., a typo in the MCP server identifier), while tool shadowing targets the tool name within a server (exposing a tool with the same name as another server's tool). Both aim to intercept calls, but at different layers.
Is there a verified MCP server registry?
As of early 2026, there is no centralised, verified MCP server registry with namespace protection. This makes tool squatting easier and server allowlists at the proxy layer more important.
Can automated tooling detect tool squatting?
Yes. A proxy like Intercept can validate server identifiers against an allowlist and flag or block connections to unrecognised servers. Levenshtein distance checks against known server names can also surface likely squatting attempts.

FURTHER READING

Enforce policies on every tool call

Intercept is the open-source MCP proxy that enforces YAML policies on AI agent tool calls. No code changes needed.

npx -y @policylayer/intercept
github.com/policylayer/intercept →
// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.