Skip to main content
A wooden Trojan horse on a wheeled platform in side profile, drawn in dots

MCP security risks for security teams: what to check before connecting an AI agent

The main MCP security risks are prompt injection through tool output, swapped servers, broad tokens, and unlogged calls. How to review a connection.

Guide
Updated 9 min read

Summary

The main MCP security risks are prompt injection through tool output, poisoned or swapped servers, over-broad tokens, local servers that run code with the user's privileges, and connections nobody inventories or logs. Security teams carry more of this risk than most, because a SOC agent reads attacker-written alerts and emails while holding tokens that can isolate hosts or revoke sessions. Agent-native platforms such as Cotool host the MCP server, act with the signed-in user's own role instead of an API key, and record every tool call in an exportable audit log.

Key takeaways

  1. List every tool each agent can call and mark which ones read attacker-controlled text and which can send data out. Any agent that has both, plus private data, needs a human gate on the outbound tools.
  2. Prefer vendor-hosted remote servers with OAuth sign-in over local packages and pasted API keys. Pin any local server to a reviewed version.
  3. Start every connection read-only and add write tools one at a time, each behind an approval that shows the full call and its target.
  4. Send MCP tool-call logs to your SIEM and alert on new tools, token reuse, and outbound calls, so agent actions get the same review as an administrator's.

The short version

Simon Willison's "lethal trifecta" names the combination that turns an AI agent into a data-theft path: access to private data, exposure to content an attacker controls, and a way to communicate externally. An agent with all three can be told, by text it reads, to fetch your data and send it out. Most MCP risk reviews start from the protocol. A security team should start from that combination, because a SOC agent has all three by design.

Its private data is logs, identity records, and case notes. Its untrusted content is the alert itself: an attacker chooses the command line in an EDR detection, the subject and body of a reported phishing email, the user agent string in a sign-in log, and the file names in a cloud storage event. And its outbound channels are the actions that make it useful: posting to Slack, emailing a user, opening a ticket, isolating a host. The Model Context Protocol makes it easy to add each of those pieces from a different server, which is how the trifecta gets assembled without anyone deciding to assemble it.

So review an MCP connection to a security tool the way you would review a new privileged service account, plus one question that service accounts never raised: what happens when the data it reads is written by the adversary?

The risks, and where they show up in security work

The OWASP MCP Top 10 lists ten categories, from token mismanagement (MCP01) to context over-sharing (MCP10). Six of them account for most of what a SOC will meet:

RiskWhere it shows up in a SOCDocumented case
Prompt injection via tool output (MCP06)Alert fields, phishing bodies, ticket commentsGitHub MCP issue leaked private repo data
Tool poisoning and rug pulls (MCP03, MCP04)Community servers for security toolspostmark-mcp 1.0.16 copied every email out
Token and scope sprawl (MCP01, MCP02)EDR and IdP API keys in config filesMCP spec warns against admin:* scopes
Weak authorization (MCP07)Shared proxies acting for many analystsSpec forbids token passthrough
Local server compromise (MCP05)Servers and proxies on analyst laptopsCVE-2025-6514 in mcp-remote, CVSS 9.6
Shadow servers, missing logs (MCP08, MCP09)Engineers wiring assistants to production toolsMicrosoft: approval "cannot be a one-time event"

Three of these cases are worth knowing in detail, because each maps onto a SOC workflow.

Instructions in the data. In May 2025, Invariant Labs showed that a malicious issue in a public GitHub repository could hijack an agent using GitHub's official MCP server. A user asked the agent to look at open issues; the agent read the planted issue, pulled data from the user's private repositories, and published it in a pull request on the public one. Claude Desktop asks before each tool call by default, but Invariant notes that many users switch to "Always Allow." GitHub later added content sanitization and a Lockdown mode that surfaces only content from collaborators with push access. Swap "public issue" for "reported phishing email" and the same prompt injection flow applies to any triage agent that can also send messages.

A trusted server that changes. The npm package postmark-mcp impersonated Postmark's official server. According to Koi Security's analysis, it worked normally for 15 versions, then version 1.0.16 added one line that blind-copied every email the agent sent to an outside address. Postmark says it never published its MCP server on npm. Nothing about the tool calls looked different afterward, which is Microsoft's point when it says approval can't be a one-time event.

Code on the analyst's machine. CVE-2025-6514 let a malicious server run operating system commands through mcp-remote, a popular proxy that connects local-only clients to remote servers, by returning a crafted authorization_endpoint URL. It affects versions 0.0.5 through 0.1.15, is fixed in 0.1.16, and carries a CVSS score of 9.6. The MCP specification says plainly that local servers run with the client's privileges and can be reached by other processes on the machine.

Step by step: reviewing an MCP connection

  1. Inventory what's already connected. Ask which assistants (Claude Code, Cursor, Codex, ChatGPT) your engineers use and which servers each one loads, including community packages. Shadow servers, a form of shadow AI, are OWASP's MCP09 for a reason: you can't revoke what you can't see. Client-side controls such as Claude Code's managed server lists help here; see how to connect security tools to Claude Code for the settings. On the server side, look for a list of connected apps you can revoke. Cotool's MCP settings page shows every connected app, who connected it, and when it was last used, and an admin can turn off "Allow apps to connect," which takes effect immediately for apps already connected.

  2. Establish who publishes the server and where it runs. Prefer a server the vendor hosts over a package that runs on a laptop. If a server must run locally, install it from the vendor's own repository, pin the version you reviewed, and run it with only the file system and network access it needs, as the MCP specification recommends. Check that any copy of mcp-remote is at 0.1.16 or later. Our survey of security MCP servers records which vendors host theirs and which ship unauthenticated local transports.

  3. Read every tool description before approving. Tool poisoning lives in descriptions and parameter schemas the model reads and the user doesn't. Read the full tool list, not the summary, and record it. Microsoft recommends pinning tool definitions and alerting when they drift, so a server that changes after approval trips a wire.

  4. Scope the identity. The authorization specification treats remote MCP servers as OAuth resource servers, and its security guidance says servers must not accept tokens that weren't issued to them. In practice: sign in with OAuth rather than pasting long-lived API keys into a config file, start with read-only scopes, and avoid wildcard scopes such as files:* or admin:*, which the specification lists as a common mistake. Cotool's MCP server is one example of this model: there are no API keys, the app signs in with the user's normal Cotool login, and it acts with that person's role and permissions and nothing more. Apps can't delete anything, and when an integration needs a secret, the app hands the user a link to Cotool's connect form instead of carrying the secret through chat.

  5. Break the trifecta for each agent. For every agent, list which tools read attacker-controlled text and which can send data out or change another system. If an agent has both, gate the outbound and write tools behind an approval that shows the full call and its target, not a friendly summary, and restrict where its runtime can reach on the network. In Cotool, an agent can call only the tools it has been granted, per-action approvals can be reviewed in Cotool or requested through Slack or Microsoft Teams (release v0.79.0), approval cards name the targeted users and devices rather than raw IDs (v0.81.0), and admins set which hosts and ports agent sandboxes can reach, with per-agent overrides.

  6. Verify writes before they land. For changes that matter, have the platform check the result rather than trusting the agent's word. When an app publishes detection code through Cotool's MCP server, Cotool re-runs it; if the new version misses an alert your team labeled a true positive, it becomes a tuning proposal for a person to review, and a new detection is published turned off.

  7. Log every call and send it to your SIEM. OWASP's cheat sheet says to log every tool invocation with full parameters, user context, and timestamps, and to alert on unusual patterns such as newly called tools. Cotool records each MCP tool call as user.calledMcpTool, shows changes as made by the user through that app, and exports audit logs through its API. If an app sends a token that was already used, which can mean the token was stolen, Cotool logs user.reusedMcpToken and disconnects the app.

  8. Re-review on change. Re-run steps 2 to 4 when a server updates, adds tools, or changes owner, and when an agent gains a new outbound tool.

Common mistakes

  • Treating "Always Allow" as an approval policy. The GitHub exploit worked because confirmations were turned off. Keep prompts for outbound and write tools, and make them specific enough that people read them. The Coalition for Secure AI's MCP security paper lists consent and approval fatigue as a threat of its own.
  • Reviewing the server, not the combination. A read-only log search server and a Slack server are each low risk. Connected to the same agent that reads phishing emails, they form all three parts of the trifecta.
  • Installing by package name. postmark-mcp shared its name with the official GitHub repository it copied. Check the publisher, not the name.
  • One omnibus token for every analyst. A proxy that uses one powerful credential for everyone is the confused deputy the specification warns about. Each person's calls should carry their own identity and permissions.
  • Logging chats but not tool calls. The prompt shows what someone asked; the tool call with its parameters shows what the agent did. Investigations need the second.

Checklist

  • Every assistant and MCP server in use is inventoried, with an owner.
  • Each server's publisher, hosting, version, and authentication method is recorded; local servers are pinned and sandboxed.
  • mcp-remote, if present, is 0.1.16 or later.
  • The full tool list for each server was read and saved, with alerts on changes.
  • Tokens are OAuth-issued to the server, scoped read-only at first, and never pasted into chat or shared configs.
  • For each agent, tools that read untrusted content and tools that send data out are listed, and the outbound ones require an approval that shows the full call.
  • Agent runtimes have network egress limited to the hosts they need.
  • Every tool call is logged with parameters and user, exported to the SIEM, and covered by detections for new tools, token reuse, and unusual call volume.
  • An admin can disconnect any app, or turn off all connections, in one step.

FAQ

What are the biggest MCP security risks?
The biggest MCP security risks are prompt injection through content a tool returns, tool poisoning and rug pulls in servers you install, tokens with broader scopes than the job needs, local servers that run with the user's privileges, and servers nobody inventoried or logs. The OWASP MCP Top 10 lists ten categories, from token mismanagement (MCP01) to context over-sharing (MCP10).
Is it safe to connect an MCP server to a SIEM or EDR?
Connecting an MCP server to a SIEM or EDR is safe enough when the connection starts read-only, signs in with OAuth rather than a stored API key, and logs every tool call. The risk rises sharply once the same agent can also take containment actions or send data outside, because the logs and alerts it reads can contain attacker-written instructions.
What is tool poisoning in MCP?
Tool poisoning in MCP is hiding malicious instructions in a tool's description, parameter schema, or output, where the model reads them and the user usually does not. A related form, the rug pull, is a server that behaves while it's reviewed and changes later, as the postmark-mcp npm package did when version 1.0.16 began copying every email to an outside address.
Are remote MCP servers safer than local ones?
Remote MCP servers run by the vendor avoid the main local risks: arbitrary code running with the user's privileges, unpinned packages, and API keys stored in config files. They still need audience-bound OAuth tokens, narrow scopes, and logging. A remote server reached through a local proxy such as mcp-remote inherits the proxy's risks too, as CVE-2025-6514 showed.

Sources

  1. OWASP MCP Top 10 | OWASP Foundation · accessed November 27, 2026
  2. MCP Security - OWASP Cheat Sheet Series · accessed November 27, 2026
  3. Security Best Practices - Model Context Protocol · accessed November 27, 2026
  4. Authorization - Model Context Protocol · accessed November 27, 2026
  5. Model Context Protocol (MCP) Security v2.0 | Coalition for Secure AI · accessed November 27, 2026
  6. The state of MCP security in 2026 | Microsoft Community Hub · accessed November 27, 2026
  7. The lethal trifecta for AI agents: private data, untrusted content, and external communication · accessed November 27, 2026
  8. GitHub MCP Exploited: Accessing private repositories via MCP · accessed November 27, 2026
  9. The GitHub MCP Server adds support for tool-specific configuration, and more - GitHub Changelog · accessed November 27, 2026
  10. First Malicious MCP in the Wild: The Postmark Backdoor That's Stealing Your Emails · accessed November 27, 2026
  11. Security Alert: Malicious 'postmark-mcp' npm Package Impersonating Postmark · accessed November 27, 2026
  12. CVE-2025-6514 - GitHub Advisory Database · accessed November 27, 2026
  13. OS command injection in mcp-remote when connecting to untrusted MCP servers | JFrog Security Research · accessed November 27, 2026
  14. MCP Server - Cotool Documentation · accessed November 27, 2026
  15. Connect an App - Cotool Documentation · accessed November 27, 2026
  16. Tools and Integrations - Cotool Documentation · accessed November 27, 2026
  17. Roles & Permissions Overview - Cotool Documentation · accessed November 27, 2026
  18. Audit Logs - Cotool Documentation · accessed November 27, 2026
  19. Audit Event Reference - Cotool Documentation · accessed November 27, 2026
  20. Cotool Release Notes - Cotool Documentation · accessed November 27, 2026

Keep reading

Attackers are scaling with tokens

Cotool helps defenders operate at machine speed. See how security teams are scaling Detection & Response.

Book a demo