MCP 自动化
自然语言或 Git 链接一键添加 MCP 服务,智能体自动安装、配置、管理 MCP 工具
Crab Claw 深度集成 MCP(Model Context Protocol)协议,让你用自然语言或一个 Git 链接就能为智能体添加全新的工具能力——无需手动配置 JSON、无需编写适配代码,智能体自动完成安装、启动、注册到能力树的全流程。
为什么选择 MCP 自动化
告诉智能体"帮我装一个数据库查询工具",它自动搜索、匹配、安装合适的 MCP 服务。零配置门槛。
给出 GitHub 仓库链接,智能体自动 clone、检测环境、安装依赖、启动 MCP 服务。一个 URL 搞定一切。
一键从 Claude Desktop、Cursor、VS Code 导入已有的 MCP 配置。迁移成本为零。
安装的 MCP 工具自动注册到能力树 dynamic/mcp_* 节点,参与意图路由和权限管理。
Crab Claw 自身也输出 MCP 标准接口——18 个浏览器工具可被任何 MCP 客户端调用。
安装、启动、停止、更新、卸载完整生命周期。状态实时监控,故障自动提示。
三种安装方式
方式一:自然语言安装
在聊天中用自然语言描述你需要的能力,智能体自动完成:
> 帮我安装一个可以查询 PostgreSQL 数据库的 MCP 工具
智能体自动执行:
1. 分析需求 → 识别"数据库查询"意图
2. 搜索匹配 → 找到 @modelcontextprotocol/server-postgres
3. 安装部署 → npm install + 配置连接参数
4. 注册能力 → mcp_query_database 注册到能力树
5. 就绪通知 → "已安装 PostgreSQL MCP 服务,你可以开始查询了"> 帮我安装一个可以查询 PostgreSQL 数据库的 MCP 工具
智能体自动执行:
1. 分析需求 → 识别"数据库查询"意图
2. 搜索匹配 → 找到 @modelcontextprotocol/server-postgres
3. 安装部署 → npm install + 配置连接参数
4. 注册能力 → mcp_query_database 注册到能力树
5. 就绪通知 → "已安装 PostgreSQL MCP 服务,你可以开始查询了"更多示例:
> 我需要一个能操作 GitHub 的工具
> 帮我添加 Slack 消息发送能力
> 安装文件系统搜索的 MCP 服务
> 我想让智能体能查看 Notion 笔记> 我需要一个能操作 GitHub 的工具
> 帮我添加 Slack 消息发送能力
> 安装文件系统搜索的 MCP 服务
> 我想让智能体能查看 Notion 笔记方式二:Git 链接一键部署
给出 MCP 服务的 GitHub 仓库链接,自动完成全流程:
# CLI 安装
crabclaw mcp install https://github.com/modelcontextprotocol/server-filesystem
# 在聊天中
> 安装这个 MCP 服务: https://github.com/user/my-custom-mcp# CLI 安装
crabclaw mcp install https://github.com/modelcontextprotocol/server-filesystem
# 在聊天中
> 安装这个 MCP 服务: https://github.com/user/my-custom-mcp自动化流程:
Git URL → clone 仓库
→ 检测项目类型 (package.json / requirements.txt / go.mod / Cargo.toml)
→ 安装依赖 (npm install / pip install / go build)
→ 解析 MCP manifest
→ 启动 MCP server (stdio 模式)
→ 注册工具到能力树
→ 输出可用工具列表Git URL → clone 仓库
→ 检测项目类型 (package.json / requirements.txt / go.mod / Cargo.toml)
→ 安装依赖 (npm install / pip install / go build)
→ 解析 MCP manifest
→ 启动 MCP server (stdio 模式)
→ 注册工具到能力树
→ 输出可用工具列表方式三:从现有工具导入
一键从其他 AI 工具迁移已有的 MCP 配置:
crabclaw mcp importcrabclaw mcp import支持导入来源:
| 来源 | 配置路径 | 说明 |
|---|---|---|
| Claude Desktop | ~/Library/.../claude_desktop_config.json | Anthropic 官方桌面客户端 |
| Cursor | .cursor/mcp.json | AI 代码编辑器 |
| VS Code | .vscode/mcp.json | 编辑器 MCP 扩展 |
导入后自动注册到 Crab Claw 能力树,无需额外配置。
MCP 服务生命周期管理
CLI 命令
# 安装
crabclaw mcp install <url> # 从 Git URL 安装
crabclaw mcp import # 从其他工具导入
# 查看
crabclaw mcp list # 列出已安装的 MCP 服务
crabclaw mcp status <name> # 查看服务状态
# 管理
crabclaw mcp start <name> # 启动服务
crabclaw mcp stop <name> # 停止服务
crabclaw mcp update <name> # 更新到最新版
crabclaw mcp uninstall <name> # 卸载服务# 安装
crabclaw mcp install <url> # 从 Git URL 安装
crabclaw mcp import # 从其他工具导入
# 查看
crabclaw mcp list # 列出已安装的 MCP 服务
crabclaw mcp status <name> # 查看服务状态
# 管理
crabclaw mcp start <name> # 启动服务
crabclaw mcp stop <name> # 停止服务
crabclaw mcp update <name> # 更新到最新版
crabclaw mcp uninstall <name> # 卸载服务在聊天中管理
> 列出我安装的所有 MCP 服务
> 停止 postgres MCP 服务
> 更新 github MCP 到最新版
> 卸载 notion MCP 服务> 列出我安装的所有 MCP 服务
> 停止 postgres MCP 服务
> 更新 github MCP 到最新版
> 卸载 notion MCP 服务动态能力树注册
安装的 MCP 工具自动注册到能力树的 dynamic/ 分支:
DefaultTree()
└── dynamic/
├── mcp_postgres_query ← PostgreSQL MCP
├── mcp_github_create_issue ← GitHub MCP
├── mcp_notion_search ← Notion MCP
└── remote_* ← 远程 MCP 服务DefaultTree()
└── dynamic/
├── mcp_postgres_query ← PostgreSQL MCP
├── mcp_github_create_issue ← GitHub MCP
├── mcp_notion_search ← Notion MCP
└── remote_* ← 远程 MCP 服务注册后的工具享受完整的能力树服务:
- 意图路由:根据用户意图自动匹配调用
- 权限管理:遵循能力树的审批级别
- 技能绑定:可通过 SKILL.md 为 MCP 工具注入领域知识
- 前端展示:在工具列表中显示元数据
Crab Claw 输出 MCP 接口
Crab Claw 自身也是 MCP 服务提供者——内置 18 个浏览器 MCP 工具,可被任何 MCP 客户端调用:
# 启动独立 MCP 浏览器服务 (stdio 模式)
crabclaw browser mcp# 启动独立 MCP 浏览器服务 (stdio 模式)
crabclaw browser mcp18 个 MCP 工具(Playwright MCP 命名规范):
| 工具 | 说明 |
|---|---|
browser_navigate | 导航到 URL |
browser_screenshot | 页面截图 |
browser_click | 点击元素 |
browser_fill | 填写表单 |
browser_evaluate | 执行 JavaScript |
browser_get_text | 获取页面文本 |
browser_snapshot | ARIA 无障碍快照 |
| ... | 等共 18 个标准工具 |
使用场景:在 Claude Desktop、Cursor 或其他支持 MCP 的工具中配置 Crab Claw 作为浏览器 MCP 提供者。
Argus MCP 桥接
灵瞳视觉子智能体也通过 MCP 协议与 Gateway 通信:
Gateway ←── MCP IPC ──→ Argus (C++/Rust)
│
├─ argus_capture_screen
├─ argus_describe_scene
├─ argus_locate_element
└─ argus_click / argus_type_text ...Gateway ←── MCP IPC ──→ Argus (C++/Rust)
│
├─ argus_capture_screen
├─ argus_describe_scene
├─ argus_locate_element
└─ argus_click / argus_type_text ...MCP 握手超时 5s,失败后保留 bridge 允许 UI 重试。
编程子智能体 MCP
oa-coder 编辑引擎也作为 MCP Server 运行:
# 启动编码子智能体 MCP
crabclaw coder start# 启动编码子智能体 MCP
crabclaw coder start通过 JSON-RPC 2.0 stdio 与 Gateway 通信,提供代码编辑、搜索、重构等工具。
配置
MCP 服务全局配置
{
"mcp": {
"servers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost/mydb"
}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_..."
}
}
}
}
}{
"mcp": {
"servers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost/mydb"
}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "ghp_..."
}
}
}
}
}远程 MCP 服务
{
"mcp": {
"remoteServers": {
"my-api": {
"url": "https://mcp.example.com/v1",
"apiKey": "..."
}
}
}
}{
"mcp": {
"remoteServers": {
"my-api": {
"url": "https://mcp.example.com/v1",
"apiKey": "..."
}
}
}
}安全设计
- 沙箱隔离:MCP 服务在沙箱环境中运行,遵循当前安全级别
- 权限继承:MCP 工具注册到能力树后,受意图路由和审批门控管理
- 环境变量注入:敏感凭证通过
env运行时注入,不落盘明文 - 网络白名单:MCP 服务的网络访问受沙箱网络策略约束