docs/features/security-quarantine.md
MCPProxy includes an automatic quarantine system to protect against Tool Poisoning Attacks (TPA).
Tool Poisoning Attacks occur when malicious MCP servers:
When a new server is added via an AI client (using the upstream_servers tool):
Quarantined servers are completely isolated from the tool discovery and search system:
| Feature | Quarantined Server | Approved Server |
|---|---|---|
| Tools indexed | ❌ No | ✅ Yes |
Tools searchable via retrieve_tools | ❌ No | ✅ Yes |
| Tools appear in HTTP API search | ❌ No | ✅ Yes |
| Tool calls allowed | ❌ No (returns security analysis) | ✅ Yes |
This isolation prevents Tool Poisoning Attacks from:
When a server is quarantined:
retrieve_tools queries will never return tools from that serverWhen a server is unquarantined (approved):
changed, i.e. rug-pull) are not affected and
stay blocked until you re-approve them explicitly.When a quarantined server's tool is called, MCPProxy returns:
{
"status": "quarantined",
"server": "suspicious-server",
"analysis": {
"tool_count": 15,
"suspicious_patterns": [
"Tool 'fetch_data' description contains external URL",
"Tool 'execute' has overly broad permissions"
],
"risk_level": "medium",
"recommendation": "Review tool descriptions before approving"
}
}
Web UI:
CLI:
mcpproxy upstream list
# Shows quarantine status for each server
Web UI:
API:
curl -X POST \
-H "X-API-Key: your-key" \
http://127.0.0.1:8080/api/v1/servers/server-name/unquarantine
Config File:
Edit ~/.mcpproxy/mcp_config.json and add "quarantined": false:
{
"mcpServers": [
{
"name": "reviewed-server",
"command": "npx",
"args": ["@example/mcp-server"],
"quarantined": false,
"enabled": true
}
]
}
If you need to quarantine a previously approved server:
curl -X POST \
-H "X-API-Key: your-key" \
http://127.0.0.1:8080/api/v1/servers/server-name/quarantine
Before approving a server, verify:
MCPProxy checks for these suspicious patterns:
| Pattern | Risk Level | Description |
|---|---|---|
| External URLs in descriptions | Medium | May indicate data exfiltration |
| Credential keywords | High | Mentions of "password", "token", "key" |
| Execution commands | High | Shell execution capabilities |
| Hidden instructions | Critical | Base64 encoded or obfuscated content |
| Overly broad permissions | Medium | Access to all files or network |
network_mode: "none" for untrusted serversIn addition to server-level quarantine, MCPProxy provides tool-level quarantine that detects changes to individual tool descriptions and schemas using SHA256 hashing. This protects against "rug pull" attacks where a previously trusted server silently modifies tool behavior.
See Tool Quarantine for complete documentation on:
mcpproxy upstream inspect and mcpproxy upstream approvequarantine_enabled and skip_quarantineWhen reviewing a pending or changed tool you may want to acknowledge it but keep it hidden from MCP clients — for example, dismissing a noisy "changed" flag for a tool you never intend to use. The block operation does this atomically: it approves the tool (clearing the quarantine flag) and disables it in a single, all-or-nothing server-side write, so a tool is never left in the approved+enabled state.
POST /api/v1/servers/{id}/tools/block with {"tools":[...]} or
{"block_all": true}.quarantine_security operations block_tool (with name +
tool_name) and block_all_tools (with name).A blocked tool can be re-exposed later with the normal enable operation
(POST /api/v1/servers/{id}/tools/{tool}/enabled with {"enabled": true}).
Not recommended, but you can opt out of quarantine globally by setting a
single top-level flag in ~/.mcpproxy/mcp_config.json:
{
"quarantine_enabled": false
}
When quarantine_enabled is false:
upstream_servers MCP tool or the
POST /api/v1/servers REST endpoint default to not quarantined.An explicit quarantined field in an add-server request still wins over
the default, so client code can always override on a per-server basis.
Per-server skip_quarantine: true continues to apply at the tool level.
Warning: Disabling quarantine exposes your system to Tool Poisoning Attacks. Only do this on machines where every MCP server you connect to is already trusted.