@guyghost/swarm-dao-mcp
v0.9.3
Published
Swarm DAO Model Context Protocol server — exposes DAO governance tools to any MCP-compatible host (Copilot, Claude, Codex, …)
Maintainers
Readme
@guyghost/swarm-dao-mcp
Swarm DAO governance as an MCP (Model Context Protocol) stdio server. Exposes the full Swarm DAO toolset — propose, deliberate, control, execute, ship, rollback, audit — as MCP tools that any MCP-compatible host can call.
Integrating a host? Read
docs/MCP_INTEGRATION.md— the canonical workflow, spawn patterns, and operating rules shared by all adapters (Copilot, Claude Code, Codex, and this server).
Install
npm install @guyghost/swarm-dao-mcpRun
# Boots the stdio MCP server, using $DAO_ROOT (or cwd) as the DAO root.
swarm-dao-mcpConfigure in a host
Any MCP host can register this server. Example (VS Code / Claude / generic):
{
"mcpServers": {
"swarm-dao": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@guyghost/swarm-dao-mcp"],
"env": { "DAO_ROOT": "." }
}
}
}For ready-made host packages (native config + instructions + slash commands), see the sibling adapters:
@guyghost/swarm-dao-copilot-adapter@guyghost/swarm-dao-claude-adapter@guyghost/swarm-dao-codex-adapter
Tools
32 tools covering the full governance lifecycle:
| Group | Tools |
| --- | --- |
| Onboarding | dao_help, dao_setup |
| Proposals | dao_propose, dao_update_proposal, dao_propose_amendment, dao_list |
| Deliberation | dao_deliberate, dao_record_outputs, dao_roundtable |
| Delivery | dao_plan, dao_artefacts, dao_dry_run, dao_control, dao_execute, dao_ship, dao_rollback |
| Tracking | dao_dashboard, dao_audit, dao_rate, dao_attention |
| Agents | dao_agents |
| GitHub | dao_config_github, dao_github_create_branch, dao_github_open_pr |
| Workflow runs | dao_graph_status, dao_graph_submit, dao_product_status, dao_product_submit, dao_improve_status, dao_improve_once |
Workflow-run tools expose Graph Engineering and product-loop runs to AI
agents with a hard authority boundary: the host sets source: "ai" on every
submitted signal, and only AI-artifact event types are accepted. Human events
(approvals, rejections, retries, cancellations) never pass through MCP — they
belong to the swarm-dao CLI human channel.
Programmatic API
import { createSwarmDaoMcpServer, ensureDaoStorage, createMcpHostAdapter } from "@guyghost/swarm-dao-mcp";
await ensureDaoStorage("/path/to/repo");
const server = createSwarmDaoMcpServer("/path/to/repo");
await server.connect(yourTransport);How deliberation works over MCP
MCP hosts cannot have the server spawn sub-agents, so Swarm DAO uses manual deliberation here:
dao_deliberatereturns a dispatch plan (agents + models).- The host spawns one sub-agent per plan entry itself.
dao_record_outputsfeeds the sub-agent outputs back into the DAO.
License
MIT
Long-running tools
dao_improve_once executes real worker agents (herdr) during the sampling and
auditing phases — a single call routinely takes one to several minutes. MCP
clients default to a 60-second request timeout, which kills the call mid-flight
(leaving the series state untouched, but orphaning the spawned herdr workspace;
the next call cleans it up). Hosts driving improvement series should raise
their request timeout:
// per call
const result = await client.callTool(
{ name: "dao_improve_once", arguments: { seriesId: "…" } },
undefined,
{ timeout: 15 * 60_000 },
);
// or globally
const client = new Client(info, { defaultRequestTimeout: 15 * 60_000 });