
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 分