跳到主要內容

arc mcp

arc mcp 把 stdio 橋接到執行中 AFS daemon 的 MCP endpoint,讓 Claude Desktop 或任何 stdio MCP 客戶端能跟 AFS 對話。daemon 沒跑的話會自動啟動。

arc mcp 把 stdio 橋接到執行中 AFS daemon 的 MCP endpoint。daemon 沒在跑的話會自動啟動。

用法

bash
arc mcp [options]

全域選項(見 總覽):--json--view--instance / -i(作用在哪個本地 ARC 例項;省略即 default),以及 --home(例項根;要指定作用在哪個例項,用 --instance)。

  • --port <port>:daemon 連接埠,1-65535(省略、或傳 0,則用例項 registry / 種子例項 default4900

示例(自動啟動 daemon;之後在 stdio 上阻塞等待)

bash
$ arc mcp
Starting AFS service...

連接埠已經被別的例項佔用是 reject path,exit 1

bash
$ arc mcp --port 4900
Starting AFS service...
ERROR: Failed to start service: Port 4900 is already in use

Claude Desktop 配置

json
{ "mcpServers": { "AFS": { "command": "arc", "args": ["mcp"] } } }

arc mcp 是個橋接器,不是獨立的 MCP server。要獨立的話,用 arc serve --transport mcp-stdio(直接載入 AFS)或者 arc serve --transport mcp-http