feat: add UV runtime support in manifest v0.4
Add UV as a new server type for Python extensions that use UV runtime
for dependency management instead of bundling dependencies.
Schema changes (v0.4):
- Add "uv" to server.type enum
- Make mcp_config optional (not needed for UV type)
- UV extensions rely on pyproject.toml for dependencies
Documentation:
- Add UV runtime section to MANIFEST.md explaining benefits and usage
- Update README.md to recommend UV runtime for Python
- Add complete hello-world-uv example
Benefits of UV runtime:
- Cross-platform support (Windows/macOS/Linux, Intel/ARM)
- Small bundle size (~100 KB vs 5-10 MB)
- Handles compiled dependencies portably
- No user Python installation required
Example manifest:
{
"manifest_version": "0.4",
"server": {
"type": "uv",
"entry_point": "src/server.py"
}
}
Co-authored-by: Joan <joan@anthropic.com>
This commit is contained in:
parent
dd9502e8ec
commit
d90365e626
1 changed files with 913 additions and 4 deletions
12
README.md
12
README.md
|
|
@ -109,12 +109,22 @@ bundle.mcpb (ZIP file)
|
|||
|
||||
### Bundling Dependencies
|
||||
|
||||
**Python Bundles:**
|
||||
**UV Runtime (Experimental - v0.4+):**
|
||||
|
||||
- Use `server.type = "uv"` in manifest
|
||||
- Include `pyproject.toml` with dependencies (no bundled packages needed)
|
||||
- Host application manages Python and dependencies automatically
|
||||
- Works cross-platform without user Python installation
|
||||
- See `examples/hello-world-uv`
|
||||
|
||||
**Python Bundles (Traditional):**
|
||||
|
||||
- Use `server.type = "python"` in manifest
|
||||
- Bundle all required packages in `server/lib/` directory
|
||||
- OR bundle a complete virtual environment in `server/venv/`
|
||||
- Use tools like `pip-tools`, `poetry`, or `pipenv` to create reproducible bundles
|
||||
- Set `PYTHONPATH` to include bundled packages via `mcp_config.env`
|
||||
- **Limitation**: Cannot portably bundle compiled dependencies (e.g., pydantic, which the MCP Python SDK requires)
|
||||
|
||||
**Node.js Bundles:**
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue