fix(mcp): use wrapper scripts instead of venv symlinks #217

Merged
lmiranda merged 1 commits from fix/mcp-venv-wrapper-scripts into development 2026-01-27 19:38:32 +00:00
Owner

Summary

  • Replace direct python path in .mcp.json with run.sh wrapper scripts
  • Scripts automatically locate venv in cache (~/.cache/claude-mcp-venvs/) or local .venv
  • Eliminates dependency on symlinks that get wiped by git operations

Problem

.venv symlinks are gitignored (**/.venv in .gitignore), causing them to be deleted on every git operation (pull, update, reset). The SessionStart hook should recreate them but this was unreliable, leading to repeated MCP server failures.

Solution

run.sh wrapper scripts that:

  1. First check ~/.cache/claude-mcp-venvs/leo-claude-mktplace/{server}/.venv
  2. Fallback to local .venv if exists
  3. Exit with helpful error message if neither found

The scripts are tracked in git and will always be present after clone/pull/update.

Test plan

  • All 5 MCP servers start correctly with run.sh
  • Scripts find cache venv automatically
  • Verify MCP tools work after session restart

🤖 Generated with Claude Code

## Summary - Replace direct python path in `.mcp.json` with `run.sh` wrapper scripts - Scripts automatically locate venv in cache (`~/.cache/claude-mcp-venvs/`) or local `.venv` - Eliminates dependency on symlinks that get wiped by git operations ## Problem `.venv` symlinks are gitignored (`**/.venv` in `.gitignore`), causing them to be deleted on every git operation (pull, update, reset). The SessionStart hook should recreate them but this was unreliable, leading to repeated MCP server failures. ## Solution `run.sh` wrapper scripts that: 1. First check `~/.cache/claude-mcp-venvs/leo-claude-mktplace/{server}/.venv` 2. Fallback to local `.venv` if exists 3. Exit with helpful error message if neither found The scripts are tracked in git and will always be present after clone/pull/update. ## Test plan - [x] All 5 MCP servers start correctly with `run.sh` - [x] Scripts find cache venv automatically - [ ] Verify MCP tools work after session restart 🤖 Generated with [Claude Code](https://claude.ai/code)
lmiranda added 1 commit 2026-01-27 19:37:14 +00:00
Replace direct python path in .mcp.json with run.sh wrapper scripts
that automatically locate the venv in cache or local directory.

Problem: .venv symlinks are gitignored, causing them to be wiped on
every git operation. The SessionStart hook should recreate them but
this was unreliable, leading to repeated MCP server failures.

Solution: run.sh scripts that:
- First check ~/.cache/claude-mcp-venvs/leo-claude-mktplace/{server}/.venv
- Fallback to local .venv if exists
- Exit with helpful error if neither found

This eliminates dependency on symlinks entirely - the scripts are
tracked in git and will always be present after clone/pull/update.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit dbb6d46fa4 into development 2026-01-27 19:38:32 +00:00
lmiranda deleted branch fix/mcp-venv-wrapper-scripts 2026-01-27 19:38:32 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#217