Complete daemon RPC with per-request context routing (bd-115)
- MCP server now uses daemon client by default with CLI fallback - Added BEADS_USE_DAEMON environment variable (default: enabled) - Created multi-repo integration test (all tests pass) - Updated .gitignore for daemon runtime files - Added SETUP_DAEMON.md with migration instructions - Closed bd-105 (investigation complete) and bd-114 (multi-server confusion) This enables single MCP server to handle multiple repos via daemon with per-request context routing. No more multiple MCP server configs! Amp-Thread-ID: https://ampcode.com/threads/T-c222692e-f6ef-4649-9726-db59470b82ef Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -56,6 +56,7 @@ Then use in Claude Desktop config:
|
||||
```
|
||||
|
||||
**Environment Variables** (all optional):
|
||||
- `BEADS_USE_DAEMON` - Use daemon RPC instead of CLI (default: `1`, set to `0` to disable)
|
||||
- `BEADS_PATH` - Path to bd executable (default: `~/.local/bin/bd`)
|
||||
- `BEADS_DB` - Path to beads database file (default: auto-discover from cwd)
|
||||
- `BEADS_WORKING_DIR` - Working directory for bd commands (default: `$PWD` or current directory)
|
||||
@@ -114,3 +115,18 @@ uv run pytest --cov=beads_mcp tests/
|
||||
```
|
||||
|
||||
Test suite includes both mocked unit tests and integration tests with real `bd` CLI.
|
||||
|
||||
### Multi-Repo Integration Test
|
||||
|
||||
Test daemon RPC with multiple repositories:
|
||||
```bash
|
||||
# Start the daemon first
|
||||
cd /path/to/beads
|
||||
./bd daemon start
|
||||
|
||||
# Run multi-repo test
|
||||
cd integrations/beads-mcp
|
||||
uv run python test_multi_repo.py
|
||||
```
|
||||
|
||||
This test verifies that the daemon can handle operations across multiple repositories simultaneously using per-request context routing.
|
||||
|
||||
Reference in New Issue
Block a user