@adhdev/mcp-server

中文文档
1.0.81发布于 2026/10/10AGPL-3.0-or-laterCommonJS近 30 天下载 2283

ADHDev MCP server — expose IDE agents as MCP tools

原始使用文档
文档目录12 节
  1. Install
  2. Connecting a client
  3. Transports
  4. Toolsets
  5. Standard (default) — 19 tools
  6. Repo Mesh ( --repo-mesh <id> ) — 40 tools
  7. Worker ( --worker ) — 6 tools
  8. Tool annotations
  9. Security notes
  10. Client Configuration
  11. Development
  12. License

@adhdev/mcp-server

An MCP stdio server that exposes running ADHDev agent sessions as tools.

ADHDev supervises AI coding agents — CLI agents (Claude Code, Codex CLI, and others) and IDE copilots — on your machines. This package lets an MCP client drive that supervision: list live sessions, read what an agent is doing, answer an approval prompt it is blocked on, and inspect the workspace it is working in.

It talks to an ADHDev daemon already running on your machine. It is a client of that daemon, not a standalone service — start the daemon first.

Install

The server is wrapped by the main CLI:

adhdev mcp

Direct package entrypoint (compatibility bin, same server):

npx @adhdev/mcp-server

Or install the package globally; the binary is adhdev-mcp:

npm install -g @adhdev/mcp-server

It speaks MCP over stdio, so it is normally launched by an MCP client rather than run by hand.

Connecting a client

Point your MCP client at the wrapper or the binary. For example:

{
  "mcpServers": {
    "adhdev": {
      "command": "adhdev",
      "args": ["mcp", "--mode", "local"]
    }
  }
}

Register it with Codex:

codex mcp add adhdev -- adhdev mcp

Run adhdev mcp --help (or adhdev-mcp --help) for the full flag list.

Transports

The --mode flag selects which daemon to talk to. It is a transport choice, independent of which toolset is published.

ModeTalks toDefault port
localStandalone daemon (adhdev standalone)3847
ipcCloud daemon's local IPC (adhdev daemon)19222 (stable) / 19223 (preview)

The IPC port is derived from the daemon's release track, so a preview coordinator does not have to be told which port its own daemon is on.

Defaults to local. Override the port with --port, and supply a standalone password with --password or ADHDEV_PASSWORD. ADHDEV_MCP_TRANSPORT sets the mode from the environment.

If the daemon is unreachable, the server exits at startup with a message naming which daemon it expected — it does not come up with a dead transport.

Toolsets

Which tools are published depends on how the server is started. The three sets are disjoint by design, not merely by convention.

Standard (default) — 19 tools

Direct supervision of agent sessions on one machine.

  • Inspect — list_daemons, list_sessions, check_pending, read_chat, read_chat_debug, spec_debug, screenshot (local mode only)
  • Control — launch_session, stop_session, send_chat, approve
  • Git — git_status, git_log, git_diff, git_checkpoint, git_push
  • Mesh bootstrap — mesh_create (its mode: "plan" is the read-only onboarding planner) and mesh_add_node. Exposed here precisely because this is the no-mesh-yet context: mesh mode refuses to start without an existing mesh id.

Repo Mesh (--repo-mesh <id>) — 40 tools

The coordinator surface for Repo Mesh, where work is delegated across multiple machines and agents. Also exposes the coordinator system prompt as an MCP resource at coordinator://system-prompt.

Broadly: mesh and node status (mesh_status, mesh_list_nodes, mesh_route_preview), task dispatch and queue management (mesh_enqueue_task, mesh_enqueue_batch, mesh_send_task, mesh_view_queue, mesh_queue_cancel), reading delegated sessions (mesh_read_chat, mesh_read_terminal, mesh_read_node_logs), approvals (mesh_approve, mesh_answer_question), node lifecycle (mesh_clone_node, mesh_remove_node), git convergence via the Refinery (mesh_refine_node, mesh_fast_forward_node), missions, and the durable task ledger.

Tools that act on the same object are one tool selected by an argument — mesh_node_slots (action: list / propose / set), mesh_note (action: record / forget), mesh_config (kind: refine / change_impact / mesh_json), mesh_init (mode: init / reinit), mesh_create (mode: create / plan) and mesh_cleanup_sessions (mode, including prune_stale_direct). Each action accepts only its own arguments. The names these replaced on 2026-09-26 (mesh_record_note, mesh_plan_onboarding, …) answer with an error naming the replacement tool and argument. The graph orchestration tools (mesh_graph_view, mesh_graph_gate, mesh_graph_node_patch) were removed on 2026-09-30; chain tasks with depends_on instead. mesh_refine_plan was removed on 2026-10-08 (call mesh_refine_node without execute; its default dry-run is the same plan), mesh_coordinator_prompt_append was removed the same day with the per-machine coordinator-prompts/ files (put a standing instruction in the repo's .adhdev/mesh.json coordinator.systemPromptAppend instead), and mesh_ledger_query is a deprecated alias of mesh_task_history — which now takes its kind / since / node filters — for one release.

The mesh id also comes from ADHDEV_MESH_ID.

When ADHDEV_WORKER_MCP is enabled on the target daemon (the default), the coordinator also gets a 41st tool, mesh_notify_worker, to drop an urgent memo into a busy delegated worker's mailbox — delivered on the worker's next MCP tool response rather than interrupting its turn.

Worker (--worker) — 6 tools

The minimal surface for a delegated agent: report_completion, progress_update, peer_context_pull, plus read-only git_status / git_log / git_diff.

Worker mode publishes no mesh tools and no coordinator prompt resource. A worker therefore cannot delegate work of its own — that restriction is a tool that does not exist rather than an instruction it might not follow. --worker deliberately overrides --repo-mesh, so a repo whose committed config carries a mesh id cannot hand a worker the coordinator surface.

Worker mode requires a daemon-issued credential (ADHDEV_WORKER_SESSION_BIND or ADHDEV_WORKER_TASK_TOKEN) in its environment and exits at startup without one.

Tool annotations

Every published tool carries the four MCP behavior hints — readOnlyHint, destructiveHint, idempotentHint, openWorldHint — so a client can decide what to auto-run and what to confirm first.

They describe what a tool can do, not what it does by default. Several tools (mesh_refine_node, mesh_fast_forward_node, mesh_cleanup_sessions with mode: "prune_stale_direct") return a plan unless explicitly told to execute, and are still annotated destructive: a hint that described only the safe default would be the kind of hint that gets someone hurt.

The hints are advisory. Actual enforcement stays in the daemon — dry-run defaults, explicit execute flags, and ownership checks.

Security notes

  • The server runs locally and connects to a local daemon. It opens no listening socket of its own; MCP traffic is stdio.
  • Standalone (local) connections authenticate with the daemon password when one is configured.
  • Tools reach only what the daemon already exposes — the sessions, workspaces, and mesh nodes it manages.

Client Configuration

Claude-style clients auto-import a repo-local .mcp.json. See Self-hosted configuration for the exact snippets.

Development

npm run build -w packages/mcp-server
npm test -w packages/mcp-server

License

AGPL-3.0-or-later. See LICENSE.

版本与发布记录

@adhdev/mcp-server 共发布 96 个版本,首次发布于 2026/05/02;过去 12 个月发布了 96 个版本。

版本发布日期距今
1.0.81latest2026/10/1029 天前
1.0.802026/10/0929 天前
1.0.792026/10/0929 天前
1.0.782026/10/0930 天前
1.0.772026/10/0830 天前
1.0.762026/10/071 个月前

关于 @adhdev/mcp-server 的常见问题

@adhdev/mcp-server 是什么?

ADHDev MCP server — expose IDE agents as MCP tools

如何安装 @adhdev/mcp-server?

在项目目录运行 npm install @adhdev/mcp-server,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 adhdev-mcp,可以用 npx adhdev-mcp 直接运行。

@adhdev/mcp-server 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/adhdev__mcp-server 是否存在。

@adhdev/mcp-server 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@adhdev/mcp-server 可以商用吗?

@adhdev/mcp-server 使用 AGPL-3.0-or-later 许可。最严格的 Copyleft:除分发外,通过网络向用户提供基于它的服务也需要开源对应源码。闭源 SaaS 使用前务必评估。以上为概括,不构成法律意见,请以许可原文为准。

@adhdev/mcp-server 的下载量有多少?

根据 npm 官方下载统计,@adhdev/mcp-server 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,283 次,日均约 76 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adhdev/mcp-server 还在维护吗?

最新版本 1.0.81 发布于 2026/10/10(29 天前);至今共发布 96 个版本,其中过去 12 个月发布了 96 个;首次发布于 2026/05/02。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。