fix(mcp): Run bd commands in user's working directory
The MCP server was running bd commands from the plugin installation directory, causing the database to be created in the wrong place. Added BEADS_WORKING_DIR config option and modified BdClient to use working directory for subprocess calls. Falls back to PWD environment variable. This ensures bd commands run from the user's actual project directory. 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -58,6 +58,7 @@ Then use in Claude Desktop config:
|
||||
**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_WORKING_DIR` - Working directory for bd commands (default: `$PWD` or current directory)
|
||||
- `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`)
|
||||
|
||||
Reference in New Issue
Block a user