文件 v1.1.2

MCP Server

·

透過 stdio pipe 啟動時,agen 會作為 MCP server 執行。任何相容 MCP 的 agent(Claude Code、Codex、OpenCode 等)都可連線並使用 Agenvoy 的工具 — 包含即時建立新工具。

外部 agent 能獲得什麼

快速設定

TUI 沒有安裝精靈(/mcp 沒有 install 動作);請手動把設定寫入你的 agent 設定檔。

各 agent 的配置:

Claude Code — ~/.claude.json

{ "mcpServers": { "agenvoy": { "command": "agen" } } }

Codex — ~/.codex/config.toml

[mcp_servers.agenvoy]
command = "agen"

OpenCode — ~/.config/opencode/opencode.jsonc

{ "mcp": { "agenvoy": { "type": "local", "command": ["agen"] } } }

通用 MCP client 設定

對於上方未列出的任何 MCP client,唯一的要求是:

Server 使用 MCP 協定版本 2024-11-05,支援 tools/list(含 listChanged 通知)與 tools/call。無需驗證 — server 以目前使用者身分在本地端執行。

各 MCP client 常見的配置模式:

{
  "<servers_key>": {
    "agenvoy": {
      "command": "agen"
    }
  }
}

其中 <servers_key> 依 client 而異(mcpServers、mcp_servers、mcp 等)。部分 client 需要明確的 "type": "stdio" 或 "type": "local" 欄位。請查閱你的 client 文件。

EN