mcp-armor — Claude Code MCP server: what it does, how to install
Intercepts MCP client traffic to block prompt injections, poisoned tool schemas, and tampered manifests.
claude mcp add mcp-armor -- docker run -i --rm ghcr.io/studiomeyer-io/mcp-armor:0.8.1What mcp-armor does
The server runs as an inline security proxy between an MCP client and upstream processes. All JSON-RPC communication flows through a four-stage pipeline. It executes Aho-Corasick matching, regex evaluation, zero-width character stripping, and homoglyph normalization. Before spawning child servers, it unsets loader environment variables such as LD_PRELOAD and NODE_OPTIONS.
The sidecar inspects tool catalogs to catch prompt injections embedded directly inside parameter descriptions. It flags directory traversal patterns and checks Ed25519 manifest signatures against a local TOFU keystore. An internal control server provides 11 read-only tools so the client can inspect blocked payloads stored in memory.
Compiling from source demands Rust 1.89 or later because modern dependency crates fail on older toolchains. Running the official Docker container removes any need to manage local compiler versions.
What it helps with
- block prompt injection payloads hidden in tool arguments and schemas
- strip dangerous loader environment variables before spawning processes
- detect homoglyph evasion and ANSI escape sequences in JSON-RPC calls
- verify server manifest integrity using Ed25519 signatures and Sigstore
Example prompts for the agent
- Inspect the recent security blocks using armor_scan_payload.
- Check the registered tools for prompt injections hidden in their parameter schemas.
How to install mcp-armor
Platform CLI
claude mcp add mcp-armor -- docker run -i --rm ghcr.io/studiomeyer-io/mcp-armor:0.8.1Platform CLI
codex mcp add mcp-armor -- docker run -i --rm ghcr.io/studiomeyer-io/mcp-armor:0.8.1Config file
{
"mcpServers": {
"mcp-armor": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/studiomeyer-io/mcp-armor:0.8.1"
]
}
}
}Config file
{
"servers": {
"mcp-armor": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/studiomeyer-io/mcp-armor:0.8.1"
]
}
}
}Platform CLI
gemini mcp add mcp-armor docker run -i --rm ghcr.io/studiomeyer-io/mcp-armor:0.8.1Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-armor
How do I install mcp-armor in Claude Code?
Run claude mcp add mcp-armor -- docker run -i --rm ghcr.io/studiomeyer-io/mcp-armor:0.8.1 in your terminal.
What does mcp-armor do?
It wraps upstream MCP servers to inspect traffic, block prompt injection attempts, and verify signatures.
What Rust version is required to compile mcp-armor?
Source builds require Rust 1.89 as the minimum supported Rust version because of dependencies like icu and rmcp.