mpak run: respect compatibility.runtimes.python from manifest
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- cli, python, typescript
Research direction
Start with packages/cli/src/commands/packages/run.ts, especially findPythonCommand() and its call in handleRun(), then read the existing tests in packages/cli/src/commands/packages/run.test.ts. Check how the manifest exposes compatibility.runtimes.python and how Python versions are detected. Done means version-aware resolution and a clear error for a mismatch, with tests covering the specified and unspecified runtime cases.
Written by the indexing model from the issue text.
Description
Problem
mpak run uses findPythonCommand() which grabs whatever python3 is on the user's PATH. Python MCPB bundles vendor native .so files compiled for a specific CPython minor version (e.g., cpython-313). If the user has Python 3.12 but the bundle was built with 3.13 deps, they get a confusing ModuleNotFoundError.
Reported in NimbleBrainInc/mcp-folk#1. Reproduced — running the darwin-arm64 bundle with Python 3.12 produces the exact same traceback.
Root Cause
findPythonCommand() in packages/cli/src/commands/packages/run.ts (line 318) tries python3 then python with no version awareness. The MCPB v0.4 manifest schema already has compatibility.runtimes.python but mpak run doesn't read it.
Proposed Fix
Update findPythonCommand() to accept the manifest and:
- Read
compatibility.runtimes.pythonfrom the manifest (e.g.,"3.13") - If specified, try
python3.13first, thenpython3, thenpython— checking--versionoutput matches - If no matching Python found, give a clear error:
=> Error: This bundle requires Python 3.13 but found Python 3.12.10 => Install it: brew install [email protected] - If
compatibility.runtimes.pythonis not set, fall back to current behavior (trypython3thenpython)
Stretch: auto-install via uv
If uv is available on PATH, mpak run could auto-install the required Python:
uv python install 3.13
This would make it zero-friction for users. Lower priority than the error message fix.
Files to Change
packages/cli/src/commands/packages/run.ts—findPythonCommand()+ call site inhandleRun()packages/cli/src/commands/packages/run.test.ts— tests for version-aware Python resolution
Related
- NimbleBrainInc/mcp-folk#1 — original user report
- NimbleBrainInc/mcp-folk#2 — add
compatibility.runtimes.pythonto folk manifest
- Dominant language
- TypeScript
- Stars
- 14
- Forks
- 13
- Avg merge
- 16m
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NimbleBrainInc/mpak
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
NimbleBrainInc/mpak#180 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NimbleBrainInc/mpak#175 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
NimbleBrainInc/mpak#159 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
NimbleBrainInc/mpak#120 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
NimbleBrainInc/mpak#112 ·
All issues in NimbleBrainInc/mpak
Similar issues
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Potential Bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Comfy-Org/ComfyUI_frontend#23773 ·
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 85/100
lingdojo/kana-dojo#34301 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
github/gh-aw-firewall#11797 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
code-yeongyu/senpi#7007 ·
Maintainers usually reply within 1 day