# Trentina

Security gateway that quarantines agent traffic and blocks prompt injections across three defense stages. It trims token usage and guards tool calls.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 11
- Author: crunchtools
- License: AGPL-3.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/crunchtools/trentina
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/trentina

## What it 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.

## Requirements
- Needs: Python and uv (commands run via uvx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add trentina -- uvx mcp-trentina-crunchtools
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>

### Codex

**Platform CLI**
```bash
codex mcp add trentina -- uvx mcp-trentina-crunchtools
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add trentina uvx mcp-trentina-crunchtools
```
uvx runs the command named after the package; if the README names another one, use uvx --from mcp-trentina-crunchtools <command>

## When to use it
- 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
- 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

## Similar
- [healthcheck](https://affpapa.org/en/nevibecode/skills/healthcheck.md) — skill · 5500 installs
- [redis-security](https://affpapa.org/en/nevibecode/skills/redis-security.md) — skill · 2400 installs
- [palisade-security-nexus-bitdefender](https://affpapa.org/en/nevibecode/skills/palisade-security-nexus-bitdefender.md) — skill · 1100 installs
- [linux-hardening](https://affpapa.org/en/nevibecode/skills/linux-hardening.md) — skill · 769 installs
- [skill-scanner](https://affpapa.org/en/nevibecode/skills/skill-scanner.md) — skill · 3800 installs
- [firewall-config](https://affpapa.org/en/nevibecode/skills/firewall-config.md) — skill · 458 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
