threatdeck
Live 13:45 UTC ·

Learn / Agents, tools and MCP

Lesson 3 of 610 minReviewed

How MCP works, and how MCP servers go wrong

Understand the MCP host, client and server roles, then recognise tool poisoning, shadowing, rug pulls, malicious servers and vulnerable bridges, and the controls that contain them.

The Model Context Protocol connects a host application, such as an IDE, a desktop app or a CLI agent, to servers that expose tools, resources and prompts. The host runs one client per server. Tools are model-controlled: the client fetches each server's tool names, descriptions and schemas with tools/list, places them in the model's context, and calls tools/call when the model chooses one [1].

MCP host, clients and servers with their trust boundaries A host application such as an IDE or CLI agent runs one MCP client per server. A local MCP server launched over stdio is an ordinary child process inside the same trust domain as the user account, inheriting environment variables, files and network access. A remote MCP server is reached over HTTPS with a bearer token that an authorization server issued for that server only. Tool descriptions from every server end up in one shared model context that is sent to the model API. One trust domain: your user account Host application IDE · desktop app · CLI agent MCP client A MCP client B Shared model context: tool descriptions from every server Local MCP server stdio child process pinned? isolated? inherits env, files, network Authorization server issues tokens per resource Remote MCP server accepts only its own tokens Model API reads every description HTTPS + bearer token
A local stdio server shares your user account's trust domain; every server's descriptions share one model context.

Two facts from the project's own security guidance shape everything else. A local server launched over stdio is an ordinary child process: it inherits your environment variables, can read whatever your account can read and can connect anywhere [2]. And the client and a stdio server share one trust domain; neither the protocol nor the SDKs defend one against the other [2].

The threats

How MCP servers become the attack path
ThreatWhat happens
Tool poisoningInstructions hidden in a tool description that the model reads and the user typically does not see, steering it to read and leak files [3]
Tool shadowingOne server's description changes how the agent uses another server's tool, for example redirecting mail sent through a trusted email tool [3]. It works because all configured servers share the model's context [2]
Rug pullA server changes its tool definitions after you approved it, so a one-time consent dialog and version pinning do not cover this surface [2, 3]
Malicious or overcollecting serverTyposquatted names, lookalike repositories or taken-over projects that work as advertised while collecting environment variables or files [2]
Compromised dependencyAn honest server pulls in a package that was compromised upstream [2]
Vulnerable server or bridgeA legitimate component is the way in, often triggered just by connecting to a malicious endpoint or visiting a web page [2]

The last row has concrete cases. CVE-2025-6514 in mcp-remote versions 0.0.5 to 0.1.15 (CVSS 9.6) let a malicious server's OAuth authorization_endpoint value reach the operating system, giving command execution on Windows; 0.1.16 fixed it [4]. CVE-2025-49596 in MCP Inspector before 0.14.1 (CVSS 9.4) let a web page reach the Inspector's local proxy and start commands; the fix added a session token and origin checks [5]. Approval logic can fail too: Check Point showed that Cursor tied trust to an MCP entry's name, so an approved entry's command could later change without a new prompt (CVE-2025-54136, fixed in Cursor 1.3) [6].

Controls that contain a bad server

  1. Inventory and remove. Know every server in every client configuration and delete the ones nobody uses [2].
  2. Prefer the remote version when a server only wraps an internet API; it runs no code on your machine and uses the protocol's authorisation flow [2].
  3. Check provenance and pin. Identifiable publisher, exact package name, a pinned version. A version pinned through npx or uvx fixes only the top-level package; an image digest freezes the whole dependency tree [2].
  4. Isolate. Run third-party servers in a container with nothing mounted except the directory they need, and with --network=none when they need no network [2].
  5. Treat descriptions as input. Read tool descriptions before relying on a server, and prefer clients that record definitions and ask again when they change [2]; Invariant suggests hashing descriptions to detect changes [3].
  6. Patch local plumbing. Binding to 127.0.0.1 is not authentication; bridges and developer tools that listen on a port need real authentication, origin checks and prompt updates [2].

Try it on ThreatDeck

Self-check

4 questions

Pick an answer to see whether it is right and why. Only your score is saved, in this browser.

  1. What is an MCP rug pull?
  2. Why can a malicious MCP server influence how the agent uses a different, trusted server's tools?
  3. You pin an MCP server with npx and an exact version. What does that pin cover?
  4. What is the main lesson of CVE-2025-49596 in MCP Inspector?

References

  1. MCP specification: Tools (2026-07-28). Model Context Protocol, 2026-07-28.
  2. MCP Local Server Security. Model Context Protocol, 2026-07-28.
  3. MCP Security Notification: Tool Poisoning Attacks. Invariant Labs, 2025-04-01.
  4. CVE-2025-6514 Threatens LLM clients (critical mcp-remote RCE). JFrog Security Research, 2025-07-09.
  5. Critical RCE in Anthropic MCP Inspector (CVE-2025-49596) Enables Browser-Based Exploits. Oligo Security, 2025-06-27.
  6. Cursor IDE's MCP Vulnerability (MCPoison, CVE-2025-54136). Check Point Research, 2025-08-05.
Completing the self-check also marks the lesson complete. Saved in this browser only.

Following

Follow the vendors, products, AI tools, techniques and actors you care about. Matching stories, CVEs and exploited bugs are marked, a Following tab appears in the feed, and returning visits show what changed. Saved only in this browser.

Presets

Get updates

A personal RSS feed of new stories on everything you follow. Paste it into any feed reader, Slack or Teams RSS app.