MCP server for multi-agent workflow with Beads + Agent Mail
Project description
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.
Use Cases
- 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
Quick Start
1. Install Prerequisites
pip install beads # Required: Beads CLI
node --version # Required: Node.js 16+
2. Install Beads Village
npx beads-village # Recommended
# or: npm install -g beads-village
# or: pip install beads-village
3. Configure Your IDE/Agent
Claude Desktop
Edit claude_desktop_config.json:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
Claude Code (CLI)
claude mcp add beads-village -- npx beads-village
Or create .mcp.json in project root:
{
"mcpServers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
Cursor
Create .cursor/mcp.json:
{
"mcpServers": {
"beads-village": {
"command": "npx",
"args": ["beads-village"]
}
}
}
GitHub Copilot (VS Code)
Add to VS Code settings.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.
Workflow
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
Documentation Guide
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 |
When to Use Which
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Tools Overview
| Category | Tools | Description |
|---|---|---|
| Lifecycle | init, claim, done |
Task workflow |
| Issues | add, assign, ls, show |
Task management (ls supports status="ready") |
| Files | reserve, release, reservations |
Conflict prevention |
| Messages | msg, inbox |
Agent communication (msg with global=true for broadcast) |
| Status | status |
Team visibility (use include_agents=true for discovery) |
| Maintenance | sync, cleanup, doctor |
Housekeeping |
| Graph Analysis | bv_insights, bv_plan, bv_priority, bv_diff |
Requires optional bv binary |
| Dashboard | village_tui |
Launch visual TUI dashboard |
Beads Viewer Integration (Optional)
The dashboard works without bv. Install bv only if you need advanced graph analysis.
Dashboard Features (Built-in, no bv needed)
| 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 |
Graph Insights (Requires bv)
| Feature | Without bv | With bv |
|---|---|---|
| Keystones, Bottlenecks | โ | โ |
| PageRank, Betweenness | โ | โ |
| Cycle Detection | โ | โ |
| Parallel Execution Plan | โ | โ |
Launch Dashboard
# Run dashboard for current directory
python -m beads_village.dashboard
# Run dashboard for specific workspace
python -m beads_village.dashboard "C:\path\to\workspace"
# Auto-start when leader inits
init(leader=True, start_tui=True)
Keyboard Shortcuts
| 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 |
Alternative: bv Binary (Go)
For advanced graph analysis, install the optional bv binary:
Installation
# Option 1: Go install (recommended)
go install github.com/Dicklesworthstone/beads_viewer/cmd/bv@latest
# Option 2: Download binary from releases
# https://github.com/Dicklesworthstone/beads_viewer/releases
New Tools (when bv available)
| 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_tuiandbv_statushave been merged intovillage_tuiandstatus(include_bv=true)
Usage Examples
# 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)
Architecture with bv
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ 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 |
# 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_tuitool not launching dashboard correctly on Windows - Improved command escaping for paths with spaces
v1.3.1 - CLI Flag Fix
Bug Fixes:
- Fixed
--tagflag error inaddtool - now uses correct--labelsflag forbd create - Fixed
--tagflag error inassigntool - now uses correct--add-labelflag forbd update - Fixed daemon fallback detection for
--labelsand--add-labelflags
v1.3.0 - Tool Consolidation & Dashboard Enhancements
Tool Consolidation (26 โ 21 tools):
broadcastmerged intomsg(global=true, to="all")discovermerged intostatus(include_agents=true)readymerged intols(status="ready")bv_statusmerged intostatus(include_bv=true)bv_tuimerged intovillage_tui
Dashboard Enhancements:
- Added Graph Insights panel (Keystones, Influencers, Cycles)
- Added Filter Recipes panel (All, Actionable, Blocked, High Impact, Stale)
- Dashboard works without
bvbinary (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.dashboardfor monitoring - Auto-start TUI -
init(leader=true, start_tui=true)launches dashboard automatically - Stateless team discovery - Dashboard reads agents from
.mailmessages (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 roles - Auto-filtered claim - Workers only see tasks matching their role
- assign() tool - Leaders can explicitly assign tasks to roles
v1.1.1 - Token Optimization
- Tool descriptions reduced by ~50%
- Instructions reduced by ~80%
- Added AGENTS-LITE.md - 1.3KB quick reference
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_lns2905_beads_village-1.3.0.tar.gz.
File metadata
- Download URL: iflow_mcp_lns2905_beads_village-1.3.0.tar.gz
- Upload date:
- Size: 69.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57a69854aa3b71744294994b27e875b6c8cfaa588a9918f7b69590a986524189
|
|
| MD5 |
27e4434e8dce17405203ebd3c5acec2f
|
|
| BLAKE2b-256 |
4fc69ac33717b990c9376f030f3bc34c3f6827c522ce8ab086426d6b51b90372
|
File details
Details for the file iflow_mcp_lns2905_beads_village-1.3.0-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_lns2905_beads_village-1.3.0-py3-none-any.whl
- Upload date:
- Size: 45.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e95dbcdda5907c2c858a50ebe54dbd60bf57e5135bd696b933659a6d1c08ca0
|
|
| MD5 |
bae011dfab7696f16b413aebfb8f9a27
|
|
| BLAKE2b-256 |
4ade34e148c740e8fccec8a6963ff0c0b93415fe440d87b72542ede04a3218d2
|