CapHost
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
CapHost
让 AI 改你电脑上的项目时,走固定流程、改完还能验收——而不是东写西写、说完就算。
适合:用 Cursor、xCodex、DeepSeek Harness 等带 AI 的工具写代码的人。
不适合:想找「把 AI 关进虚拟机里」那种安全沙箱的人(我们不是那个,说明见 定位)。
它到底干什么?
平常 AI 可以直接改文件、跑命令,做完了也没人核对。
CapHost 多加三道规矩:
只能动你指定的文件夹(叫安全根)
改文件 / 跑命令要经过登记过的能力(不是聊天里随口一说)
做完跑一次验收(
verify):过了才算完
你可以把它想成:给 AI 配的「工牌 + 打卡机」,不是给它建的监狱。
Related MCP server: MCP ToolHub
开始之前你要有
电脑上已安装 Node.js 20 或更新
包管理器用 pnpm(没有就:
npm install -g pnpm)一个空文件夹当「安全根」,例如:
C:\work\cap-safe(路径换成你的)
五步跑起来(复制即可)
把下面的 <本仓库路径> 和安全根路径换成你自己的。
① 下载并安装
git clone https://github.com/Sadako-Girlfriend/caphost.git
cd caphost
pnpm install
pnpm gen && pnpm check && pnpm test可选自检(不依赖你的安全根):
pnpm demo② 告诉 CapHost:只能动哪个文件夹
Windows(命令提示符):
set CAPHOST_SAFE_ROOTS=C:\work\cap-safe也可以复制仓库里的 caphost.local.json.example,改名成 caphost.local.json,把里面的路径改成你的。
③ 接到你的 AI 工具(四选一)
你用的工具 | 怎么接 |
Cursor | 复制 |
xCodex | 按 |
DeepSeek Harness | 按 |
先不接 AI | 只用命令行也行,见下一步 |
更细的说明:examples/mcp · MCP 说明
④ 给 AI 一份「规矩」(很重要)
打开 agent/INSTRUCTIONS.md,整份贴进你 AI 工具的系统提示 / Rules。
否则工具挂上了,AI 仍可能用手写文件绕开 CapHost。
Cursor 还可以把 agent/rules/、agent/skills/ 拷进自己的 .cursor/。
⑤ 建一个小项目并验收
pnpm scaffold -- --name hello-cap --template tool
pnpm verify -- --workspace C:\work\cap-safe\hello-cap看到验收通过,就算通了。
常见问题(先看这)
Q:我要会写契约 / TypeScript 吗?
不用。先会「安装 → 配路径 → 接工具 → 贴规矩 → scaffold / verify」就够。
Q:安全根是什么?
就是你允许 AI 动的文件夹。没写进安全根的路径,CapHost 不会帮它改。
Q:PHP / Java / Go 行不行?
可以,但要按语言「打开开关」,见 工具链说明。别自己猜命令名。
Q:和 Docker / 云沙箱比呢?
不是一类东西。我们管的是「在你本机当前项目里怎么改、怎么验收」,不是把整个环境隔离起来。
还想看什么
许可证
MIT · 见 LICENSE
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Machine-verifiable authorization checks for autonomous AI agents.
Runtime permission, approval, and audit layer for AI agent tool execution.
Authorize AI agent tool calls before they run: policy-as-code, human approval, signed receipts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform advanced file editing operations with enhanced security, automatic backups, and undo functionality.MIT
- FlicenseAqualityBmaintenanceEnables coding agents to perform workspace-confined file operations, read-only Git inspection, and structured shell commands, while requiring out-of-band human approval for mutations and external executions and maintaining an audit trail.143-
- AlicenseAqualityBmaintenanceEnables AI assistants to execute shell commands safely within registered project roots, with blocking of dangerous operations, output filtering, and log inspection.17GPL 3.0
- AlicenseAqualityBmaintenanceEnables coding agents to safely inspect and modify project files within explicitly allowed workspace roots, with controls for file operations, git status/diff, and optionally allowlisted command execution.11Apache 2.0