MCP 协议详解:为何 AI 智能体需要标准接口?
Hermes Agent:58K+ Stars 的 AI 智能体框架
Hermes Agent 是 Nous Research 构建的 AI 能力框架,支持通过 MCP 与外部工具生态连接。
| 指标 | 数据 |
|---|---|
| GitHub Stars | 58K+ |
| 核心贡献者 | 63+ 人 |
| MCP 服务器注册量 | 10,000+ |
| 月下载量 | 9700 万次 |
| 内置技能 | 70+ 个 |
| 测试规模 | 3,289+ 单元测试 |
| 支持消息平台 | 8+ (Telegram、Discord、Slack 等) |
LLM 应用 (Hermes Agent)
│
┌──────┴──────┐
│ │
STDIO HTTP (Streamable HTTP)
│ │
▼ ▼
┌──────────────────────────┐
│ MCP Server │
│ GitHub | Filesystem | DB │
└──────────────────────────┘
tools/list - 列出可用工具tools/call - 调用工具resources/list - 列出可读资源resources/read - 读取资源prompts/list - 列出提示模板prompts/get - 获取提示experimental.tasks - 异步任务(实验性)截至2026年初:
call_llm() API| 平台 | 特性 |
|---|---|
| Telegram | 文件附件、PDF/Office 文档 |
| Discord | 频道标题、Bot 过滤 |
| Slack | App mention、结构化日志 |
| 原生媒体发送、多用户隔离 | |
| Signal | 完整网关、媒体 URL |
| Email (IMAP/SMTP) | 新支持 |
| Home Assistant | REST + WebSocket |
# stdio 服务器(本地)
mcp_servers:
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
# HTTP 服务器(远程)
mcp_servers:
remote_api:
url: "https://mcp.example.com/mcp"
headers:
Authorization: "Bearer ***"
| MCP 工具 | 注册名称 |
|---|---|
read_file |
mcp_filesystem_read_file |
create-issue |
mcp_github_create_issue |
query data |
mcp_my_api_query_data |
github:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-github"]
env:
GITHUB_PERSONAL_ACCESS_TOKEN: "***"
tools:
include: [create_issue, list_issues, search_code] # 只暴露这些
exclude: []
providers:
openai:
api_key: ${OPENAI_API_KEY}
base_url: https://api.openai.com/v1
mcp_servers:
filesystem:
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
# GitHub - 只创建和列出问题
github:
tools:
include: [create_issue, list_issues, update_issue]
# Stripe - 删除操作黑名单
stripe:
tools:
exclude: [delete_customer, refund_payment]
# 内部 API - 侧重只读
internal_api:
tools:
include: [list_customers, get_customer]
/reload-mcp
修改配置后,在会话中运行此指令重新加载 MCP 工具。
git:
command: "uvx"
args: ["mcp-server-git", "--repository", "/home/user/project"]
# 用法:
Confirm the repository structure and explain the directory layout.
github:
tools:
include: [create_issue, list_issues, update_issue]
# 用法:
Summarize the common bug patterns in GitHub issues.
internal_api:
tools:
include: [list_customers, get_customer]
resources: false
# 用法:
Check customer ACME Corp's recent invoice activity.
# 文件系统 + GitHub 结合
# 用法:
List the files in my project, then create a GitHub issue summarizing what you found.
# 标准安装
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
# 手动安装
cd ~/.hermes/hermes-agent
uv pip install -e ".[all]"
| 服务器 | 包名 | 功能 |
|---|---|---|
| Filesystem | @modelcontextprotocol/server-filesystem | 读写指定目录 |
| GitHub | @modelcontextprotocol/server-github | 仓库访问、问题、PR |
| Postgres | @modelcontextprotocol/server-postgres | PostgreSQL 查询 |
| Brave Search | @modelcontextprotocol/server-brave-search | Web 搜索 |
# 启动 MCP 服务器模式
hermes mcp serve
# 配置到 Claude Desktop
{
"mcpServers": {
"hermes": {
"command": "hermes",
"args": ["mcp", "serve"]
}
}
}
# 可用工具:
# conversations_list, conversation_get, messages_read,
# attachments_fetch, events_poll, events_wait,
# messages_send (), channels_list, permissions_list_open, permissions_respond
# 使用 npx 运行 Node.js MCP 服务器
command: "npx"
args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
# 使用 uvx 运行 Python MCP 服务器
command: "uvx"
args: ["mcp-server-git", "--repository", "/home/user/project"]
# HTTP 端点
url: "https://mcp.example.com/mcp"
headers:
Authorization: "Bearer ***"
# .env 文件
OPENAI_API_KEY=sk-...
OPENROUTER_API_KEY=sk-...
GITHUB_TOKEN=ghp_...
BRAVE_API_KEY=bsr_...
INTERNAL_API_TOKEN=***