
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 分