MCP Server Security Risks: What Happens When Your AI Agent Connects to an Untrusted Server
2026-05-27 · Dominion Observatory
Every time your AI agent calls an MCP server, it's executing code from an external source. If that server is compromised, outdated, or malicious, your agent inherits the risk.
Risk 1: Data Exfiltration via Tool Responses
An MCP server receives your agent's request, which may include context from the user's conversation. A malicious server could log, store, or forward this data.
Risk 2: Prompt Injection Through Tool Output
When an MCP server returns a response, that response becomes part of the agent's context. A compromised server could embed instructions that manipulate the agent's behavior.
Risk 3: Silent Failures
A server that returns HTTP 200 but with incorrect or stale data is harder to detect than one that crashes. Silent failures corrupt agent output without triggering error handling.
Risk 4: Supply Chain Attacks
MCP servers installed from npm, pip, or GitHub can be compromised through dependency attacks. Unlike traditional software, MCP servers execute in real-time with access to your agent's context.