MCP servers are external dependencies that provide tools to your AI agent. Each MCP server you connect is a supply chain link. If a server is compromised, your agent inherits the compromise. Supply chain security for MCP servers means verifying what you connect to, monitoring for changes, and isolating the impact of a compromise.
When you connect an MCP server, you trust it to:
Any of these assumptions can be violated by a compromised server.
Before connecting an MCP server:
Source verification: Is the server from a known, trusted publisher? Check the package registry, repository, and maintainer reputation.
Code review: For critical tools, review the server's source code. Check what data it accesses, what network connections it makes, and what the tools actually do.
Signature verification: If the publisher signs releases, verify the signature before deploying.
After initial verification, snapshot the tool descriptions:
# expected-tools.yaml
servers:
filesystem:
version: "1.2.0"
tools:
file_read:
description_hash: "sha256:abc123..."
file_write:
description_hash: "sha256:def456..."
On each startup, verify that the descriptions match. If they change, block the server and investigate.
Run each MCP server in its own isolated environment:
If one server is compromised, the isolation prevents the compromise from reaching other servers or the host system.
Watch for behavioral changes in MCP servers:
Pin MCP server versions and update deliberately:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["@modelcontextprotocol/server-filesystem@1.2.0"]
}
}
}
Do not use latest tags in production. Test updates in staging before deploying to production.
Route all MCP traffic through the Authensor MCP gateway. The gateway provides a single enforcement point where you can:
The gateway cannot make an untrusted server trustworthy, but it can limit the damage a compromised server can cause.
If you discover a compromised MCP server:
Explore more guides on AI agent safety, prompt injection, and building secure systems.
View All Guides