fix: MCP server bd executable path resolution

Fixes issue where MCP tools failed with "bd executable not found"
when BEADS_PATH was set to command name instead of absolute path.

Changes:
- Remove BEADS_PATH=bd from plugin.json (use auto-detection)
- Enhance config validator to resolve command names via PATH
- Add comprehensive config validation tests (11 new tests)

The validator now accepts both:
  - Absolute paths: /usr/local/bin/bd
  - Command names: bd (resolved via shutil.which)

This makes the MCP server more robust and user-friendly while
maintaining backward compatibility.

All 90 tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-10-14 16:37:59 -07:00
parent 50c85635c8
commit 800ed300a6
3 changed files with 141 additions and 7 deletions

View File

@@ -26,7 +26,6 @@
"beads-mcp"
],
"env": {
"BEADS_PATH": "bd",
"BEADS_ACTOR": "${USER}"
}
}