跳到主要内容

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