
Mcp Slim Guard
io.github.lennney由 GitHub 帳號 lennney 發布v0.1.1-alpha.1更新於 Oct 24, 2026
76% fewer MCP tokens in our standard benchmark. Same upstream call. Exact recovery.
概覽
本機 MCP 代理:以精簡目錄向助理暴露已授權的上游工具,呼叫前驗證參數,並可依參照精確取回過大結果。
- 可以做什麼
- 以 Native、Compact 或 Extreme 模式向宿主暴露已授權的上游 MCP 工具,所有模式都套用同一套允許/拒絕規則。在 Compact 與 Extreme 模式下依名稱尋找工具,最多回傳三個相符項目及其完整原始 schema。在聯絡上游伺服器之前依原始 schema 驗證呼叫參數,不符時回傳結構化錯誤。透過結果參照精確取回大結果,可依查詢讀取有限的本機片段,或依游標繼續讀取,且不會再次呼叫上游工具。檢視並套用針對 Codex 與 Claude Code 的宿主安裝方案,並驗證已設定的執行環境。
- 適用情境
- 當助理連接大量上游 MCP 工具、工具目錄或大結果佔用過多上下文時適用。也適合希望在特權上游工具前設置單一入口、允許/拒絕規則、schema 驗證與稽核日誌的情境。
- 執行需求
- 以本機 Node.js 程序執行,從 npm 套件安裝;README 說明目前版本為 alpha 原始碼候選,尚未發佈到 npm,需從審閱過的程式碼檢出建置。需要由 init 指令產生的專案設定檔來列出上游伺服器,並需要 Codex 或 Claude Code 的宿主設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mcp Slim Guard,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP Slim Guard
MCP Slim Guard gives a host one deliberate way to reach authorized upstream tools. It keeps input schemas intact, validates calls before the upstream is invoked, and can recover an oversized result exactly without repeating that invocation.
Choose a mode
Compact is the default for start. Native is the default installation plan for
Codex. Compact is the default for Claude Code; Claude Code supports Compact and
Extreme installation plans, not Native.
All modes apply the same allow/deny authorization. Compact and Extreme return at most three discovery matches, each with the original required fields, enums, and nested schema. A call is validated against that original schema before the upstream server is contacted.
find_tool rejects unknown fields and queries longer than 256 Unicode code
points locally. It searches only the current authorized catalog and never falls
back to an unauthorized entry.
Quick start
0.1.1-alpha.2 is a source candidate and is not published to npm yet. From a
reviewed checkout of this candidate:
init writes mcp-slim-guard.yml with version 2. The file contains upstream
and security settings only. Select a mode in the host command, not in YAML.
Host entries
For Codex, use Native when you want the normal authorized MCP catalog:
For Claude Code, use Compact by default:
See host setup for the full configuration and verification steps.
Configuration
Version 1 configuration is intentionally unsupported. The removed compressor
section is rejected rather than migrated automatically.
Repair an invalid call
If arguments do not match an authorized tool's original schema, Slim Guard
returns a normal MCP tool error with structuredContent that identifies the
schema failure and confirms that the upstream tool was not invoked. Correct the
arguments and retry; submitted argument values are not echoed in that error.
Result recovery
When a response needs recoverable delivery, the first response includes a
result_ref. Use read_result with query to locate up to three bounded local
fragments, or omit query and follow next_cursor to recover the exact snapshot.
Both paths use the same immutable capture and never invoke the upstream tool again.
Do not combine query with cursor. Native and Compact use the standard delivery
boundary. Extreme uses a smaller boundary only when the initial delivered response
is at least half the size of the exact response; otherwise it passes the exact
response through unchanged.
Evidence and checks
The repository includes a 24-task mode comparison, result-recovery fixtures, and a 100-tool / 8,000-row stress fixture. Run the current artifacts with:
Their reports are mode-specific and are generated locally; do not treat older alpha benchmark figures as claims for this product line.
Development
This project is an alpha. Review authorization patterns and upstream settings before using it with privileged tools.
來源:README.md,提交 a5596a0
工具
0版本歷史
1- v0.1.1-alpha.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分