
Osmcp
io.github.KrushnaVardhanReddy由 GitHub 账号 KrushnaVardhanReddy 发布v1.0.5更新于 Oct 24, 2026
A typed, policy-controlled OS capability layer for AI agents.
概览
一个本地 MCP 服务器,在策略约束下为 AI 助手提供文件系统、git 和文本处理工具,并记录审计日志。
- 可以做什么
- 在允许的根目录内搜索和查看文件:grep、find、ls、cat、stat、wc、head、tail、tree、du。读取 git 状态:status、diff、log。处理文本与数据:jq、sed、diff。启用变更后写入、追加、建目录、删除、移动、复制和打补丁文件。启用变更后执行 git 暂存、提交、切换、分支、拉取和推送。每次调用返回统一类型化响应并写入仅追加的审计日志。
- 适用场景
- 适合让助手读取和修改你机器上某个项目目录中的代码或文件,或查看并提交 git 变更,同时把操作限制在设定的路径边界和工具白名单内。
- 运行要求
- 以本地进程通过 stdio 运行,可通过 Homebrew 安装、从源码构建或使用容器镜像。需要通过 --policy 参数提供 TOML 策略文件,设置 allowed_root、allowed_tools、变更开关和各项限制。未声明账号、API 密钥或环境变量。
安装
在 SourceWeft 中
- 打开 控制台中的 Osmcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
osmcp — OS Capabilities for AI Agents
A typed, policy-controlled OS capability layer for AI agents via the Model Context Protocol (MCP).
osmcp exposes a curated set of safe filesystem, git, and text-processing tools to AI agents — all governed by a strict Policy Engine that enforces path boundaries, tool allowlists, output limits, mutation controls, and an immutable audit trail.
📖 Read the comprehensive Architecture & Design Document for a deep dive into the philosophy, safety boundaries, and design decisions behind osmcp.
[LiteLLM Compatible] [Smithery Verified]
Features
Architecture
Demo
[osmcp Demo Action] A demonstration of Claude Desktop securely editing code via osmcp, safely bounded by a TOML policy engine.
Quick Start
1. Install via Homebrew
Alternatively, build from source:
2. Configure a Policy
3. Run
The binary communicates over stdio using MCP JSON-RPC. Connect any MCP-compatible client.
Client Integrations
Claude Desktop
Add the following to your claude_desktop_config.json:
Smithery (npx)
To install osmcp for Claude Desktop automatically via Smithery:
LiteLLM
Integrate osmcp into your enterprise LLM proxy using the LiteLLM MCP Gateway.
5. Test
Policy Security Model
allowed_root— All filesystem paths are validated to be inside this root. Traversal outside is blocked withPOLICY_DENIED.allowed_tools— Only tools in this list are visible to the MCP client. Unlisted tools do not appear intools/list.allow_mutation— Whenfalse, mutating tools (write, delete, git commit) are globally blocked.- Limits — Per-invocation timeout, output byte cap, and match count cap prevent runaway operations.
Envelope Response Format
All tool responses follow a consistent typed envelope:
License
MIT
Acknowledgements
osmcp would not be possible without the incredible open-source libraries it is built upon:
来源:README.md,提交 3e5c928
工具
0版本历史
1- v1.0.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分