Trentina — Claude Code MCP server: what it does, how to install
Security gateway that quarantines agent traffic and blocks prompt injections across three defense stages. It trims token usage and guards tool calls.
claude mcp add trentina -- uvx mcp-trentina-crunchtoolsWhat Trentina does
Trentina serves as an intercepting gateway between autonomous agents and external tools. Inbound traffic crosses three defense stages: L1 deterministic checks, an L2 local classifier, and an L3 quarantined evaluator. It stops malicious prompts early. Dangerous inputs never reach the context window.
The gateway also compacts tool schemas and minifies payloads. Production benchmarks show a 52% decrease in response bytes. Outbound calls follow plain-English policies and argument allowlists defined in agent profiles.
Running the L3 stage requires an API key from providers such as OpenAI, Anthropic, or Gemini. Without a configured container and profiles.yaml, the gateway cannot process traffic.
What it helps with
- intercept prompt injection payloads in untrusted external data
- cut context consumption by compacting tool schemas and responses
- restrict agent permissions via per-profile backend allowlists
- evaluate outgoing tool executions against plain-text security policies
Example prompts for the agent
- Fetch the documentation page through Trentina quarantine and extract the guide
- Inspect recent messages through the guarded gateway and draft a reply
- Check whether the requested tool call complies with the active security profile
How to install Trentina
Platform CLI
claude mcp add trentina -- uvx mcp-trentina-crunchtoolsuvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>
Platform CLI
codex mcp add trentina -- uvx mcp-trentina-crunchtoolsuvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>
Config file
{
"mcpServers": {
"trentina": {
"command": "uvx",
"args": [
"mcp-trentina-crunchtools"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>
Config file
{
"servers": {
"trentina": {
"type": "stdio",
"command": "uvx",
"args": [
"mcp-trentina-crunchtools"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>
Platform CLI
gemini mcp add trentina uvx mcp-trentina-crunchtoolsuvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>
Step 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 Trentina
How do I install Trentina in Claude Code?
Run the command: claude mcp add trentina -- uvx mcp-trentina-crunchtools.
What does the Trentina MCP server do?
It quarantines inbound agent traffic, scanning it through rule-based filters, a local classifier, and an isolated evaluator model. Beyond blocking injections, it compacts schemas and payloads to conserve context tokens.
What is required for the L3 defense stage?
The L3 layer needs an API key from a supported provider such as OpenAI, Anthropic, Gemini, OpenRouter, or a local Ollama instance. This evaluator assesses content in isolation without tool access.