MCP server for multi-agent workflow with Beads + Agent Mail
npm install beads-village

Multi-agent MCP server for task coordination and file locking between AI agents.
Combines Beads (issue tracking) + built-in Agent Mail (messaging) to enable multiple agents to work on the same codebase without conflicts.
> š” Note: Messaging is built-in. No external mail server required. Inspired by MCP Agent Mail concept.
- Multi-agent development: Multiple AI agents working on different parts of a codebase
- Task queue management: Agents claim and complete tasks from a shared queue
- File conflict prevention: Lock files before editing to prevent merge conflicts
- Cross-agent communication: Send messages between agents for coordination
---
``bash`
pip install beads # Required: Beads CLI
node --version # Required: Node.js 16+
`bash`
npx beads-village # Recommendedor: npm install -g beads-village
or: pip install beads-village
Claude Desktop
Edit claude_desktop_config.json:%APPDATA%\Claude\claude_desktop_config.json
- Windows: ~/Library/Application Support/Claude/claude_desktop_config.json
- macOS:
`json`
{
"mcpServers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
Claude Code (CLI)
`bash`
claude mcp add beads-village -- npx beads-village
Or create .mcp.json in project root:`json`
{
"mcpServers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
Cursor
Create .cursor/mcp.json:`json`
{
"mcpServers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
GitHub Copilot (VS Code)
Add to VS Code settings.json:`json`
{
"github.copilot.chat.mcp.servers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
More IDEs (OpenCode, Cline, Roo Code, Zed, Continue...)
See š Full Setup Guide for complete configuration instructions for all supported IDEs and agents.
---
``
init() ā claim() ā reserve() ā [work] ā done() ā RESTART
| Step | Description |
|------|-------------|
| init() | Join workspace (call FIRST) |claim()
| | Get next task |reserve()
| | Lock files before editing |done()
| | Complete task, release locks |
| RESTART | New session for next task |
š Detailed Workflow Guide - Patterns, examples, best practices
---
Choose the right documentation for your AI model:
| Document | Best For | Size |
|----------|----------|------|
| AGENTS-LITE.md | High-capability models (Claude 3.5+, GPT-4+, Gemini Pro) with limited context | ~1.5KB |
| AGENTS.md | All models, comprehensive reference with examples | ~16KB |
| docs/SETUP.md | Setup instructions for all IDEs/agents | ~6KB |
| docs/WORKFLOW.md | Workflow patterns and best practices | ~5KB |
``
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Model Capability ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā HIGH (Claude 3.5+, GPT-4o, Gemini 1.5 Pro) ā
ā āāā Use AGENTS-LITE.md (minimal tokens, maximum signal) ā
ā ā
ā MEDIUM (Claude 3 Haiku, GPT-4o-mini, smaller models) ā
ā āāā Use AGENTS.md (detailed examples needed) ā
ā ā
ā LARGE CONTEXT (128K+ tokens available) ā
ā āāā Use AGENTS.md (comprehensive reference) ā
ā ā
ā LIMITED CONTEXT (<32K tokens) ā
ā āāā Use AGENTS-LITE.md (save tokens for code) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
---
| Category | Tools | Description |
|----------|-------|-------------|
| Lifecycle | init, claim, done | Task workflow |add
| Issues | , assign, ls, show | Task management (ls supports status="ready") |reserve
| Files | , release, reservations | Conflict prevention |msg
| Messages | , inbox | Agent communication (msg with global=true for broadcast) |status
| Status | | Team visibility (use include_agents=true for discovery) |sync
| Maintenance | , cleanup, doctor | Housekeeping |bv_insights
| Graph Analysis | , bv_plan, bv_priority, bv_diff | Requires optional bv binary |village_tui
| Dashboard | | Launch visual TUI dashboard |
---
The dashboard works without bv. Install bv only if you need advanced graph analysis.
| Panel | Description |
|-------|-------------|
| Teams | Click to filter agents by team |
| Agents | Shows online/offline status, current task |
| Tasks Board | Kanban view (Open/In Progress/Blocked/Closed) |
| Task Detail | Click any task for full details + activity |
| File Locks | Active file reservations with TTL |
| Messages | Recent broadcasts and done notifications |
| Filter Recipes | Quick filters: All, Actionable, Blocked, High Impact, Stale |
| Feature | Without bv | With bv |
|---------|------------|---------|
| Keystones, Bottlenecks | ā | ā
|
| PageRank, Betweenness | ā | ā
|
| Cycle Detection | ā | ā
|
| Parallel Execution Plan | ā | ā
|
`bashRun dashboard for current directory
python -m beads_village.dashboard
$3
| Key | Action |
|-----|--------|
|
1-8 | Focus different panels |
| Tab | Navigate between panels |
| j/k | Scroll up/down |
| r | Refresh data |
| t | Toggle dark/light theme |
| q | Quit |$3
For advanced graph analysis, install the optional
bv binary:$3
`bash
Option 1: Go install (recommended)
go install github.com/Dicklesworthstone/beads_viewer/cmd/bv@latestOption 2: Download binary from releases
https://github.com/Dicklesworthstone/beads_viewer/releases
`$3
| Tool | Description |
|------|-------------|
|
bv_insights | Graph analysis (PageRank, Betweenness, bottlenecks, cycles) |
| bv_plan | Parallel execution tracks for multi-agent work |
| bv_priority | Priority recommendations based on graph metrics |
| bv_diff | Compare changes between git revisions |> Note:
bv_tui and bv_status have been merged into village_tui and status(include_bv=true)$3
`python
Get graph insights for AI decision making
bv_insights()Get priority recommendations
bv_priority(limit=5)Launch unified TUI dashboard
village_tui()Auto-start TUI when leader inits
init(leader=True, start_tui=True)Check bv availability via status
status(include_bv=True)
`$3
`
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP Beads Village ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā Core Tools ā bv Tools (optional) ā
ā āāāāāāāāāā ā āāāāāāāāāāāāāāāāā ā
ā init, claim, done ā bv_insights (graph metrics) ā
ā reserve, release ā bv_plan (execution tracks) ā
ā msg, inbox, broadcast ā bv_priority (recommendations) ā
ā ls, show, add ā bv_tui (dashboard) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā bv Binary (Go) ā
ā - 9 Graph algorithms: PageRank, Betweenness, HITS, etc. ā
ā - Robot mode: Pre-computed JSON for AI agents ā
ā - TUI mode: Kanban, graph viz, insights dashboard ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
`---
Architecture
`
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Shared via Git ā
ā .beads/ .mail/ .reservations/ ā
ā (tasks) (messages) (file locks) ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā² ā² ā²
ā ā ā
āāāāāā“āāāāā āāāāāāā“āāāāā āāāāāāāā“āāāāāā
ā Agent 1 ā ā Agent 2 ā ā Agent 3 ā
ā (FE) ā ā (BE) ā ā (Mobile) ā
āāāāāāāāāāā āāāāāāāāāāāā āāāāāāāāāāāāāā
`---
Configuration Summary
| Client | Config Location | Config Key |
|--------|-----------------|------------|
| Claude Desktop |
claude_desktop_config.json | mcpServers |
| Claude Code | .mcp.json | mcpServers |
| Cursor | .cursor/mcp.json | mcpServers |
| GitHub Copilot | settings.json | github.copilot.chat.mcp.servers |
| Amp Code | .amp/settings.json | amp.mcpServers |
| Kilo Code | settings.json | kilocode.mcpServers |
| Windsurf | ~/.windsurf/mcp.json | mcpServers |
| OpenCode | opencode.json | mcpServers |
| Cline | Cline settings | mcpServers |
| Roo Code | Roo settings | mcpServers |
| Zed | Zed settings | context_servers |
| Continue | config.yaml | mcpServers |š Complete Setup Instructions
---
Environment Variables
| Variable | Default | Description |
|----------|---------|-------------|
|
BEADS_AGENT | agent-{pid} | Agent name |
| BEADS_WS | Current dir | Workspace path |
| BEADS_TEAM | default | Team name |
| BEADS_USE_DAEMON | 1 | Use daemon if available |---
Troubleshooting
| Issue | Solution |
|-------|----------|
|
bd: command not found | pip install beads |
| MCP server not starting | Check Node.js 16+ |
| Tools not appearing | Restart IDE after config |`bash
Verify installation
bd --version
node --version
npx beads-village --help
`---
Links
- Beads CLI - Git-native issue tracker
- Beads Best Practices
- MCP Agent Mail - Inspiration for messaging concept
- Model Context Protocol
---
Changelog
v1.3.2 - Dashboard Launch Fix (Windows)
Bug Fixes:
- Fixed
village_tui tool not launching dashboard correctly on Windows
- Improved command escaping for paths with spaces
v1.3.1 - CLI Flag Fix
Bug Fixes:
- Fixed
--tag flag error in add tool - now uses correct --labels flag for bd create
- Fixed --tag flag error in assign tool - now uses correct --add-label flag for bd update
- Fixed daemon fallback detection for --labels and --add-label flags
v1.3.0 - Tool Consolidation & Dashboard Enhancements
Tool Consolidation (26 ā 21 tools):
-
broadcast merged into msg(global=true, to="all")
- discover merged into status(include_agents=true)
- ready merged into ls(status="ready")
- bv_status merged into status(include_bv=true)
- bv_tui merged into village_tuiDashboard Enhancements:
- Added Graph Insights panel (Keystones, Influencers, Cycles)
- Added Filter Recipes panel (All, Actionable, Blocked, High Impact, Stale)
- Dashboard works without
bv binary (graph insights require bv)
- Improved scrollbar and alignment
- Status icons for issues (ā open, ā in_progress, ā blocked, ā closed)
v1.2.0 - Textual Dashboard & Optimizations
- Built-in Textual Dashboard -
python -m beads_village.dashboard for monitoring
- Auto-start TUI - init(leader=true, start_tui=true) launches dashboard automatically
- Stateless team discovery - Dashboard reads agents from .mail messages (no registry file needed)
- Cross-workspace task lookup - Task details fetched from correct workspace
- I/O optimization - Mail messages cached, reducing disk reads by 80%
- UX improvements - Click navigation: Teams ā Agents ā Tasks ā Task Detail
v1.1.2 - Role-Based Task Assignment
- Leader/Worker agents -
init(leader=true) for leaders, init(role="fe") for workers
- Role tags on tasks - add(tags=["fe"])` to assign tasks to specific rolesv1.1.1 - Token Optimization
- Tool descriptions reduced by ~50%
- Instructions reduced by ~80%
- Added AGENTS-LITE.md - 1.3KB quick reference
---
MIT