Security Risks in MCP Servers Exposed to Agents
Poisoned tool descriptions, open endpoints, and injected content threaten agents.

With MCP server access, an AI agent can fetch web data, including pages, documents, and API responses, through a standard tool interface. That ease of access also leaves room for poisoned instructions, unauthorized calls, stolen credentials, and more access than is needed. Securing MCP servers means controlling both what the server can do and what the agent can be persuaded to ask it to do.
What MCP servers actually do and why agents trust them without question
Anthropic released the Model Context Protocol in November 2024 to give AI agents a standard way to connect to external tools, data sources, and APIs. Its architecture has three layers. Hosts are AI applications such as Claude Code and Cursor, clients manage connections, and servers expose tools, resources, and prompts. When a user asks an agent to act, the model reads the available tools and their natural-language descriptions, chooses a tool, and sends a call.
The server then executes that call with its own credentials, which may include database passwords, OAuth tokens, or cloud access. Its response becomes input for the model’s next decision. The trust boundary is easy to miss. Metadata returned through tools/list passes into the model’s context without built-in validation, where descriptions can be interpreted as instructions.
Traditional APIs generally have deterministic callers with known code, endpoints, and parameters. MCP instead delegates tool selection and invocation to a model whose choices depend on its context. Security also depends on whether someone can manipulate the model into requesting a harmful action, which firewalls, rate limits, and static CORS rules were not designed to judge.
How fast MCP adoption has outrun the security practices meant to govern it
MCP lowers the cost of connecting an agent to another system, so adding tools can outpace reviewing them. Developers and non-developers can add servers to application configurations without security review. Installation becomes routine before governance catches up. What looks like a small change to help get work done may add another privileged service.
Trend Micro’s independent scanning found 492 publicly reachable MCP servers with neither client authentication nor traffic encryption. The Valyu CVE dataset, tracking through October 2026, records 1,075 MCP ecosystem entries across 431 distinct server projects. Public exposure and flaws spread across many projects make this a production infrastructure issue.
The July 2026 MCP specification adds stricter authorization checks and removes the session-ID mechanism, primarily for scalability reasons, though that mechanism had also appeared in disclosed vulnerabilities. Servers built on older versions remain exposed until rebuilt and redeployed, while unreviewed additions make it harder to know which installations need attention.
Tool poisoning: how a malicious server description becomes an instruction the agent obeys
A tool description helps the model decide when and how to use a server. That makes it a runtime input. A malicious description can tell the model to override earlier directives, hide its actions, or collect sensitive information. Text invisible to a human reviewer can still be visible to the model. The instruction manual now wants to be the boss.
A server can behave harmlessly during review, then change its instructions after trust has formed. Pillar Security documented this pattern in the August 2026 Deadbugz campaign. The malicious “productivity-suite” server spread through public GitHub pull requests and behaved normally for its first three tool calls. It then instructed the agent to collect SSH keys, AWS credentials, shell history, and Kubernetes configuration while concealing the activity from the user.
OWASP catalogues this attack class as MCP03:2025 Tool Poisoning. A related attack, schema poisoning, tampers with input definitions so that a benign-sounding operation can map to a destructive action. Both use the gap between what a tool seems to do and what it actually does. A server-name allowlist cannot close that gap if versions and runtime instructions can change after approval.

Unauthenticated endpoints: what happens when the server takes calls from anyone
Attackers do not always need to persuade a model. An unauthenticated MCP endpoint lets any network-reachable caller invoke tools using the server’s credentials. The attacker need not obtain the database password or cloud token directly. The server can exercise that authority on the attacker’s behalf. Tool poisoning is unnecessary when the door is already open.
The Grafana MCP server accepted any well-formed caller-generated session ID, allowing unauthenticated callers to list and invoke tools with its Grafana service account. The issue was fixed in mcp-grafana 1.1.0. At a broader scale, the January 2026 OpenClaw mass-exposure incident left more than 42,000 agent instances reachable through unauthenticated MCP endpoints, leaking API keys, Slack credentials, and chat histories.
Even an authentication error can offer false reassurance. The Dolt case showed that returning an error code is not the same as stopping execution. A rejected call must stop being processed. The July 2026 specification removes the session-ID mechanism abused in the Dolt and Grafana flaws, but servers built before that change still require auditing and rebuilding.

Indirect prompt injection through tool results: how the web poisons the agent’s context
A legitimate server can return malicious content even if the server itself has not been compromised. An agent may fetch a web page, read a document, or query a database that holds text an attacker controls. That text enters the same context the model uses to decide its next action. Data can then masquerade as an instruction. This is indirect prompt injection through a tool result.
A page or API response can contain invisible or visually disguised instructions to transmit context, call another endpoint, or alter the next tool call’s parameters. The model has no native, reliable boundary separating such instructions from the data it was meant to read. A successful injection can also persist across subsequent turns. One poisoned result may therefore influence more than the immediate response.
Invariant Labs showed a related cross-server attack that worked against production servers. A malicious server sharing context with a legitimate WhatsApp MCP server instructed the agent to read message history and forward it to an attacker-controlled number. No user prompt was required, and the poisoned description appeared benign during tool review. The example shows how untrusted instructions from one integration can redirect access available through another.
Scraping tools add a particularly important wrinkle. The URL parameter is filled in by the model, and the protocol does not distinguish a URL supplied by the user from one planted through earlier content. Inspecting only the original prompt therefore misses the route by which the request was redirected.
SSRF through scraping tools: when the agent’s URL becomes the attacker’s pointer
Server-side request forgery, or SSRF, turns a fetch tool against destinations reachable from the server. An attacker who influences the agent’s context can steer its URL parameter toward cloud metadata, a private API, or an internal database. The server then makes the request with its own network access and credentials. A public-web tool becomes a pointer into private infrastructure.
CVE-2026-65056 documents this chain in mcp-webresearch version 0.1.7. Published on 21 July 2026 with a CVSS score of 8.3 HIGH, it concerns a URL-taking tool that fetched content server-side without restricting the destination. The flaw does not require a malicious scraping server. A legitimate fetch capability is enough when the destination is uncontrolled.
Microsoft’s Azure MCP Server also had an SSRF vulnerability, CVE-2026-26118, rated CVSS 8.8 HIGH and fixed in versions 1.0.2 and 2.0.0-beta.17. The vulnerability in an official, reviewed server makes destination validation a separate requirement from deciding whether a package comes from a reputable source. Where a fetch can go matters alongside who shipped the tool.
Supply-chain compromise: malicious packages, credential sprawl, and the rug pull at the registry level
A correctly configured, authenticated server can still arrive compromised. Its package may have been tampered with, abandoned, or transferred to a new owner with different intentions. In MCP, this familiar dependency risk combines with access to credentials and the ability to change instructions presented to the agent.
GitGuardian’s State of Secrets Sprawl 2026 and Pillar’s research document tens of thousands of secrets embedded in MCP configuration files committed to public GitHub repositories. These include API keys, OAuth tokens, and cloud credentials. Broad personal access tokens can also end up in container environments or source code. The package may inherit organization-wide read/write access provisioned during development.
The Deadbugz campaign joins the distribution and instruction risks together. Public pull requests provided the delivery route, while delayed poisoning helped the server evade initial review. At the transport layer, the “Mother of All AI Supply Chains” design flaw allowed direct configuration-to-command execution through insufficiently sanitized input in Anthropic’s core MCP STDIO transport. It affected LangChain MCP adapters and other consumers, resulting in over 30 disclosures and 10+ CVEs.
Version N+1 can have descriptions, destinations, or behavior that differ from those in the approved version N. A trusted name is not an immutable artifact. Name-only allowlists give false assurance when the code and instructions behind the name can change.
Over-broad permissions and missing audit trails: the blast radius problem
Permissions set the limits on how far a successful attack can reach. Reusing a broad personal access token across servers gives each integration more authority than its declared purpose requires. Multi-agent systems can amplify that reach through prompt-injection chains that cross between agents. One compromised integration can become a bridge. The initial weakness and the final damage need not sit in the same system.
The AWS Kiro configuration rewrite, CVE-2026-10591 in July 2026, involved an agent being led to rewrite its own MCP configuration, resulting in code execution. The agent could alter the configuration governing its own capabilities.
Missing logs make the resulting damage harder to reconstruct. Without records of agent identity, tool calls, parameters, and returned data, a deployment may provide no clear account of customer records read and sent elsewhere. SOC 2, HIPAA, and GDPR audit requirements make that an operational and compliance problem as well as a detection gap. Silence is not evidence that nothing happened.
MCP sampling creates another route for abuse. A server can ask the client model to generate a completion, potentially consuming its compute quota, extracting context, or poisoning reasoning with fabricated tool results. Such abuse can leave no traditional network log entry. Observability must therefore track what agents and tools do as well as their connections.
A practical controls checklist for MCP server builders before agents operate at scale
For builders, the first step is inventory. Enumerate servers across developer machines and repositories, recording the client application, launch command or URL, version, and source package. Approve each tool as well as each server, allowing the read operations it needs while blocking write or destructive tools unless there is a reason to allow them. Pin versions and re-check every update.
Next, close unauthenticated access before refining model defenses. Require authentication on every remote server, implement OAuth 2.1 with PKCE, and test that rejected requests actually stop processing. Audit older installations against the July 2026 authorization changes. Check for the NeighborJack misconfiguration, where a server binds to 0.0.0.0 rather than 127.0.0.1 and becomes reachable by other workloads on the same cloud host segment.
Then reduce the authority available to each server. Issue separate, scoped credentials rather than reusing organization-wide personal tokens. Keep secrets out of MCP configuration files, use environment variables or a secret manager, and scan configurations and repositories for hardcoded tokens. Rotate any credential exposed in a public configuration immediately. Moving a secret does not narrow its permissions.
Runtime controls must check descriptions, call parameters, and results. Validate URLs and destination hosts before fetching them, and disable auto-approval at least for write and destructive actions through managed settings users cannot override. Log each call’s agent identity, server, tool name, arguments, and result to a SIEM. Set baselines for how agents and tools behave, and look into unexpected destinations or access to files outside their stated scope.
When agents use live web data, the scraping layer needs a boundary of its own. A managed, production-grade web data API that enforces content schema and sanitizes the payloads it returns leaves less room for injection than a raw URL fetch tool that the model controls. It does not replace the preceding controls. Their purpose is to keep one deceptive instruction or one failed check from becoming unrestricted access across the agent’s tools.


