
Trentina
io.github.crunchtoolsPublished by GitHub account crunchtoolsv0.5.0Updated Nov 10, 2026
Secure MCP gateway and quarantine for AI agent traffic — three-layer prompt injection defense
Overview
A local MCP gateway that sits between AI agents and their backends, screening traffic for prompt injection and enforcing operator policy.
- What you can do
- Route agent calls to multiple MCP backends through one endpoint per profile, with tool allowlists, denylists and pinning
- Screen untrusted content at ingress with layered checks, a local classifier and a quarantined LLM, plus literal and semantic request and response guards
- Fetch, read, list and search web content through built-in content tools with egress guarding and file confinement
- Compress tool descriptions and schemas and minify responses to cut token use
- Authenticate web clients via OAuth or static bearer tokens, and keep LLM provider keys inside the gateway
- Record calls in an audit log and let an operator agent propose grants for a person to approve
- When to use it
- Use it when an assistant connects to untrusted MCP servers, web content or messaging channels and you want injection defense, tool filtering and an audit trail in front of them. It also suits setups that need per-agent profiles with separate backends and credentials.
- Requirements
- Runs as a container image (podman) with a profiles YAML mounted and environment variables for the gateway, profile path and per-profile bearer tokens. L3 defense needs an API key for one LLM provider (Gemini, OpenRouter, OpenAI, Anthropic or Ollama). Clients connect over streamable HTTP with an Authorization bearer header.
Installation
In SourceWeft
- Open Trentina in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Trentina
Trentina sits between your AI agents and everything they touch: MCP servers, the web, Matrix, LLM providers and alerts. It stops prompt injection at every ingress — or at a trusted boundary you declare — shrinks what reaches the context window, and enforces a policy the agent cannot talk its way past. It is named after the 1377 trentino of Ragusa, where ships anchored offshore for thirty days before anyone came ashore: commerce keeps flowing, and nothing dangerous gets in.
Why Trentina
-
Security. Untrusted content crosses three independent layers at every ingress to the trust boundary, which can be federated with other instances: L1 deterministic checks, L2 a local classifier, L3 a quarantined LLM with no tools. Semantic request guards judge what goes out against a rule you write in English. What is and is not defended is in Coverage. Defense Pipeline · Benchmark · OWASP mapping
-
Token savings. Hidden tools, short names, compacted schemas, compressed descriptions and minified responses: 52% fewer response bytes on production traffic. Compression · Tool Filtering
-
Determinism. Literal request guards, literal response guards and allowlists are evaluated by the gateway, so an agent that ignores its instructions is stopped before the backend sees the call. Literal Request Guards · Literal Response Guards
-
Authentication. Trentina is the OAuth authorization server for web clients such as claude.ai: dynamic client registration, a provisioned client, external issuers or a static bearer, chosen per profile. Authentication
-
Architectural flexibility. A personal assistant, a coding agent and a swarm each get their own profile, with their own backends, defense mode and credentials — and an operator agent configures all of it through tools, with no shell; the five grants only a person should agree to, it proposes and you approve. Profiles · Operator · Approvals
Quick Start
L3 needs a key for one LLM provider. Any of Gemini, OpenRouter, OpenAI,
Anthropic or Ollama works. A minimal profiles.yaml:
Then point Claude Code at it:
Documentation
Development
CONTRIBUTING.md is the page for a person: the three
commands, what each costs, and what an exit code means. The host needs only
git, podman, pre-commit and gh — every check runs from
python-sdlc, the same image CI
runs. The demo is recorded by demo.yml;
its fixtures are in docs/demo/.
License
AGPL-3.0-or-later
Source: README.md at commit 8aa0b36
Tools
0Version history
1- v0.5.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts