词元之母TOK.MOM - 平台充值汇率 1:1 即 1 人民币充值到账 1 美元,支持一个 Key 调用近 600+ 海内外模型,限时特价模型低至 1 折,欢迎上岸!
~/.hermes/config.yaml 中添加一个 MCP 服务器:List the files in /home/user/projects and summarize the repo structure.command、args 和 env~/.hermes/config.yaml 的 mcp_servers 下读取 MCP 配置。| 字段 | 类型 | 含义 |
|---|---|---|
command | string | stdio MCP 服务器的可执行文件 |
args | list | stdio 服务器的参数 |
env | mapping | 传递给 stdio 服务器的环境变量 |
url | string | HTTP MCP 端点 |
headers | mapping | 远程服务器的 HTTP 头 |
timeout | number | 工具调用超时时间 |
connect_timeout | number | 初始连接超时时间 |
enabled | bool | 若为 false,Hermes 完全跳过该服务器 |
supports_parallel_tool_calls | bool | 若为 true,该服务器的工具可并发运行 |
tools | mapping | 按服务器过滤工具及实用工具策略 |
hermes mcp add 接受 --preset 标志,自动填写传输层细节,无需手动查找命令和参数。预设只提供默认值——你在同一命令行传入的其他内容(环境变量、头信息、过滤规则)仍然优先生效。| 预设 | 配置内容 |
|---|---|
codex | Codex CLI 的 MCP 服务器(通过 stdio 运行 codex mcp-server)。需要 PATH 中存在 codex CLI。 |
hermes mcp add my-codex --preset codex 完全可以);预设只提供 command/args 默认值。mcp_<server_name>_<tool_name>| 服务器 | MCP 工具 | 注册名称 |
|---|---|---|
filesystem | read_file | mcp_filesystem_read_file |
github | create-issue | mcp_github_create_issue |
my-api | query.data | mcp_my_api_query_data |
list_resourcesread_resourcelist_promptsget_promptmcp_github_list_resourcesmcp_github_get_promptenabled: false,Hermes 完全跳过该服务器,甚至不尝试连接。include 优先生效。tools.resources: false 禁用 list_resources 和 read_resourcetools.prompts: false 禁用 list_prompts 和 get_promptnotifications/tools/list_changed 通知,告知 Hermes 其可用工具发生了变化。Hermes 收到该通知后,会自动重新获取服务器的工具列表并更新注册表——无需手动执行 /reload-mcp。prompts/list_changed、resources/list_changed)会被接收,但暂未处理。/reload-mcpmcp-<server>