The MCP server was running all bd commands in its own installation directory (~/.claude/plugins/marketplaces/beads-marketplace/integrations/beads-mcp/) instead of the user's project directory. This caused databases to be created in the wrong location. For example, when working in ~/ai/flutter/wyvern and running `bd init --prefix wy-`, the database was created at: ~/.claude/plugins/marketplaces/beads-marketplace/integrations/beads-mcp/.beads/wy-.db Instead of the expected location: ~/ai/flutter/wyvern/.beads/wy-.db Solution: - Add `cwd=os.getcwd()` to all asyncio.create_subprocess_exec() calls - This makes bd commands execute in the current working directory from PWD env var - Claude Code updates PWD for the MCP server process environment Impact: - bd init now creates .beads/ in the correct project directory - All bd commands (create, list, update, etc.) operate on the correct database - Multi-project workflows work correctly without manual DB path configuration Test results: 90/91 tests passing (1 unrelated path assertion failure)
beads-mcp
MCP server for beads issue tracker and agentic memory system. Enables AI agents to manage tasks using bd CLI through Model Context Protocol.
Installing
git clone https://github.com/steveyegge/beads
cd beads/integrations/beads-mcp
uv sync
Add to your Claude Desktop config:
{
"mcpServers": {
"beads": {
"command": "uv",
"args": [
"--directory",
"/path/to/beads-mcp",
"run",
"beads-mcp"
],
"env": {
"BEADS_PATH": "/home/user/.local/bin/bd",
}
}
}
}
Environment Variables (all optional):
BEADS_PATH- Path to bd executable (default:~/.local/bin/bd)BEADS_DB- Path to beads database file (default: auto-discover from cwd)BEADS_ACTOR- Actor name for audit trail (default:$USER)BEADS_NO_AUTO_FLUSH- Disable automatic JSONL sync (default:false)BEADS_NO_AUTO_IMPORT- Disable automatic JSONL import (default:false)
Features
Resource:
beads://quickstart- Quickstart guide for using beads
Tools:
init- Initialize bd in current directorycreate- Create new issue (bug, feature, task, epic, chore)list- List issues with filters (status, priority, type, assignee)ready- Find tasks with no blockers ready to work onshow- Show detailed issue info including dependenciesupdate- Update issue (status, priority, design, notes, etc)close- Close completed issuedep- Add dependency (blocks, related, parent-child, discovered-from)blocked- Get blocked issuesstats- Get project statistics
Development
Run MCP inspector:
# inside beads-mcp dir
uv run fastmcp dev src/beads_mcp/server.py
Type checking:
uv run mypy src/beads_mcp
Linting and formatting:
uv run ruff check src/beads_mcp
uv run ruff format src/beads_mcp
Testing
Run all tests:
uv run pytest
With coverage:
uv run pytest --cov=beads_mcp tests/
Test suite includes both mocked unit tests and integration tests with real bd CLI.