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
51
MANIFEST.md
51
MANIFEST.md
|
|
@ -1,7 +1,7 @@
|
|||
# MCPB Manifest.json Spec
|
||||
|
||||
Current version: `0.3`
|
||||
Last updated: 2025-10-24
|
||||
Last updated: 2025-12-02
|
||||
|
||||
## Manifest Schema
|
||||
|
||||
|
|
@ -398,6 +398,55 @@ The `server` object defines how to run the MCP server:
|
|||
|
||||
### Server Types
|
||||
|
||||
Four server types are supported:
|
||||
|
||||
- **`node`**: Node.js server with bundled dependencies
|
||||
- **`python`**: Python server with bundled dependencies
|
||||
- **`binary`**: Compiled executable
|
||||
- **`uv`**: Python server using UV runtime (experimental, v0.4+)
|
||||
|
||||
### UV Runtime (Experimental, v0.4+)
|
||||
|
||||
> **Note:** UV runtime support is experimental and may change in future versions.
|
||||
|
||||
The `uv` server type enables cross-platform Python extensions without bundling dependencies. Instead, dependencies are declared in `pyproject.toml` and installed by the host application using UV.
|
||||
|
||||
**Benefits:**
|
||||
- Cross-platform support (Windows, macOS, Linux; Intel, ARM)
|
||||
- Small bundle size (~100 KB vs 5-10 MB)
|
||||
- Handles compiled dependencies (pydantic, numpy, etc.)
|
||||
- No user Python installation required
|
||||
|
||||
**Example:**
|
||||
```json
|
||||
{
|
||||
"manifest_version": "0.4",
|
||||
"server": {
|
||||
"type": "uv",
|
||||
"entry_point": "src/server.py"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Requirements:**
|
||||
- Must include `pyproject.toml` with dependencies
|
||||
- Must NOT include `server/lib/` or `server/venv/`
|
||||
- `mcp_config` is optional (host manages execution)
|
||||
|
||||
**Package structure:**
|
||||
```
|
||||
extension.mcpb
|
||||
├── manifest.json # server.type = "uv"
|
||||
├── pyproject.toml # Dependencies
|
||||
├── .mcpbignore # Exclude .venv, server/lib
|
||||
└── src/
|
||||
└── server.py
|
||||
```
|
||||
|
||||
See `examples/hello-world-uv` for a complete example.
|
||||
|
||||
### Node, Python, and Binary Types
|
||||
|
||||
1. **Python**: `server.type = "python"`
|
||||
- Requires `entry_point` to Python file
|
||||
- All dependencies must be bundled in the MCPB
|
||||
|
|
|
|||
Loading…
Reference in a new issue