—— 当90%的人都在追MCP时,有人选择了另一条路
MCP(Model Context Protocol)火遍全网。
Anthropic开源、Cursor/Claude官方支持、社区Server爆发式增长...看起来,MCP就是AI工具调用的"标准答案"。
但今天,我想说一句可能得罪人的话:
90%的人踩坑了。
不是MCP不好,而是很多人用错了场景。
为了让Agent调一个工具,你需要:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Agent │────▶│ MCP Client │────▶│ MCP Server │
│ (LLM) │ │ (stdio/SSE)│ │ (工具实现) │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐
│ Schema │
│ (JSON定义) │
└─────────────┘
问题:
这是那个CI/CD案例的核心痛点。
MCP方案:
| 方案 | Token消耗 | 开发时间 |
|---|---|---|
| MCP | 25,000+ | 1-2周 |
| CLI+Skill | 50 | 1天 |
| 效率提升 | 500倍 | 10倍 |
很多工具根本不需要MCP的复杂度:
工具调用的本质是什么?
告诉AI:"有一个命令叫就这么简单。xxx,参数是yyy,输出是zzz"
SKILL.md 示例:
# Git操作工具
## git_status
查看当前仓库状态
**用法:**
**输出格式:**
- `M` = 修改
- `A` = 新增
- `D` = 删除
- `??` = 未跟踪
## git_commit
提交更改
**用法:**
**参数:**
- `message`: 提交信息(简洁描述更改内容)
Agent调用:
用户:看看仓库状态
AI:我来查看一下 → 执行 `git status --short`
用户:提交这些更改
AI:我来提交 → 执行 `git commit -m "更新文档"`
| 维度 | MCP | CLI+Markdown |
|---|---|---|
| Token消耗 | Schema JSON(冗长) | 自然语言描述(精简) |
| 开发时间 | 1-2周 | 几小时 |
| 调试难度 | 高(多层架构) | 低(直接执行) |
| 部署复杂度 | 高(Server管理) | 低(本地命令) |
| 学习成本 | 高(协议+SDK) | 低(写文档) |
1. 复杂的多工具生态
1. 简单工具调用
OpenClaw作为Agent运行时,采用了务实的混合策略:
# tools.yaml
- name: read
description: 读取文件内容
command: "cat {{file_path}}"
- name: exec
description: 执行shell命令
command: "{{command}}"
优势:
# mcp_servers.yaml
- name: filesystem
transport: stdio
command: npx -y @modelcontextprotocol/server-filesystem
args: ["/home/user"]
- name: fetch
transport: stdio
command: uvx mcp-server-fetch
优势:
skills/
├── git/
│ └── SKILL.md # Git操作文档
├── docker/
│ └── SKILL.md # Docker操作文档
└── deploy/
└── SKILL.md # 部署流程文档
Agent加载Skill:
[[skill:git]]
用户:部署最新版本
AI:
1. git pull origin main
2. docker build -t app:latest .
3. docker-compose up -d
典型MCP Server Schema:
{
"name": "deploy",
"description": "部署应用到生产环境",
"parameters": {
"type": "object",
"properties": {
"environment": {
"type": "string",
"enum": ["staging", "production"],
"description": "部署环境"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$",
"description": "版本号,格式x.y.z"
},
"rollback": {
"type": "boolean",
"default": false,
"description": "是否回滚"
}
},
"required": ["environment", "version"]
}
}
几十个这样的Schema = 几万token
SKILL.md:
# CI/CD部署
## deploy
部署应用到指定环境
**用法:**
**示例:**```
**Agent看到的:**
几十行描述 = 50 token
MCP是趋势,但不是银弹。
问自己:
阶段1:CLI+Markdown
像OpenClaw一样:
MCP和CLI+Markdown,不是对立关系。
它们只是不同抽象层级的工具调用方式。
不要被"全网都在用"绑架,也不要为了技术而技术。
最简单的方案,往往就是最好的方案。
"不要为了用锤子而找钉子,而是为了钉钉子而选工具。"
还没有人回复