
Trentina
io.github.crunchtools由 GitHub 账号 crunchtools 发布v0.5.0更新于 Nov 10, 2026
Secure MCP gateway and quarantine for AI agent traffic — three-layer prompt injection defense
概览
本地 MCP 网关,位于 AI 代理与其后端之间,对流量做提示注入防护并执行运维方策略。
- 可以做什么
- 按配置文件将代理调用路由到多个 MCP 后端,支持工具白名单、黑名单与工具固定
- 在入口处用多层检查、本地分类器与无工具的隔离 LLM 筛查不可信内容,并提供字面与语义的请求和响应守卫
- 通过内置内容工具抓取、读取、列目录与搜索网页内容,带出站守卫与文件限制
- 压缩工具描述与 schema、精简响应以降低 token 消耗
- 为网页客户端提供 OAuth 或静态 bearer 认证,并把 LLM 供应商密钥留在网关内
- 记录调用审计日志,并允许运维代理提出授权请求由人工批准
- 适用场景
- 当助手要连接不可信的 MCP 服务器、网页内容或消息渠道,而你需要在其前面加一层注入防护、工具过滤与审计时使用。也适合需要为不同代理配置独立后端与凭据的场景。
- 运行要求
- 以容器镜像(podman)运行,需挂载 profiles YAML,并设置网关、配置路径及各配置文件 bearer 令牌等环境变量。L3 防护需要一个 LLM 供应商的 API 密钥(Gemini、OpenRouter、OpenAI、Anthropic 或 Ollama)。客户端通过 streamable HTTP 并携带 Authorization bearer 头连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Trentina,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
来源:README.md,提交 8aa0b36
工具
0版本历史
1- v0.5.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分