Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ typings/
# Claude files
.claude.json
.claude/
CLAUDE.md
PROJECT_STATUS.md

# Vite
.vite/
Expand Down
6 changes: 2 additions & 4 deletions MANIFEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,9 @@ 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`**: Python server using UV runtime (v0.4+)

### UV Runtime (Experimental, v0.4+)

> **Note:** UV runtime support is experimental and may change in future versions.
### UV Runtime (v0.4+)

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.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ bundle.mcpb (ZIP file)

### Bundling Dependencies

**UV Runtime (Experimental - v0.4+):**
**UV Runtime (v0.4+):**

- Use `server.type = "uv"` in manifest
- Include `pyproject.toml` with dependencies (no bundled packages needed)
Expand Down
7 changes: 7 additions & 0 deletions examples/file-manager-python/.mcpbignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.venv/
__pycache__/
*.pyc
.pytest_cache/
.mypy_cache/
*.egg-info/
uv.lock
23 changes: 11 additions & 12 deletions examples/file-manager-python/manifest.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"$schema": "../../dist/mcpb-manifest.schema.json",
"manifest_version": "0.1",
"manifest_version": "0.4",
"name": "file-manager-python",
"display_name": "Python File Manager MCP",
"version": "0.1.0",
"version": "0.2.0",
"description": "A Python MCP server for file operations",
"long_description": "This extension provides file management capabilities through a Python MCP server. It demonstrates Python-based MCP Bundle development, including file operations, directory management, and proper MCP protocol implementation.",
"long_description": "This extension provides file management capabilities through a Python MCP server. It demonstrates Python-based MCP Bundle development using UV runtime, including file operations, directory management, and proper MCP protocol implementation.",
"author": {
"name": "Anthropic",
"email": "support@anthropic.com",
"url": "https://github.com/anthropics"
},
"server": {
"type": "python",
"type": "uv",
"entry_point": "server/main.py",
"mcp_config": {
"command": "python",
"command": "uv",
"args": [
"${__dirname}/server/main.py",
"run",
"--directory", "${__dirname}",
"server/main.py",
"--workspace=${user_config.workspace_directory}"
],
"env": {
"DEBUG": "${user_config.debug_mode}",
"PYTHONPATH": "${__dirname}/server/lib"
"DEBUG": "${user_config.debug_mode}"
}
}
},
Expand Down Expand Up @@ -62,8 +62,7 @@
"claude_desktop": ">=0.10.0",
"platforms": ["darwin", "win32", "linux"],
"runtimes": {
"python": ">=3.8.0 <4"
"python": ">=3.10.0 <4"
}
},
"privacy_policies": []
}
}
31 changes: 4 additions & 27 deletions examples/file-manager-python/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,31 +1,8 @@
[build-system]
requires = ["setuptools>=42", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "file-manager-python"
version = "0.1.0"
version = "0.2.0"
description = "A Python MCP server for file operations"
authors = [
{name = "Anthropic", email = "support@anthropic.com"}
requires-python = ">=3.10"
dependencies = [
"mcp>=1.0.0",
]
license = {text = "MIT"}
classifiers = [
"Private :: Do Not Upload" # Prevents accidental uploads to PyPI
]

[project.dependencies]
mcp = ">=1.0.0"
trio = ">=0.22.0"

[tool.setuptools]
packages = ["server"]

[project.scripts]
bundle-deps = "python:install_deps"

# Custom scripts section for DXT development
[tool.dxt]
bundle = "pip install \"mcp[all]\" --target server/lib --upgrade --force-reinstall"
test = "python server/main.py --debug"
pack = "npx @anthropic-ai/dxt pack"
2 changes: 0 additions & 2 deletions examples/file-manager-python/requirements.txt

This file was deleted.

12 changes: 9 additions & 3 deletions examples/hello-world-node/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
});

// Start the server
const transport = new StdioServerTransport();
server.connect(transport);
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("Hello World MCP server running...");
}

console.error("Hello World MCP server running...");
main().catch((error) => {
console.error("Fatal error in main():", error);
process.exit(1);
});
6 changes: 2 additions & 4 deletions examples/hello-world-uv/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Hello World UV Runtime Example (Experimental)

> **Note:** UV runtime support is experimental and may change in future versions.
# Hello World UV Runtime Example

This example demonstrates a minimal MCP server using **UV runtime**.

Expand Down Expand Up @@ -28,7 +26,7 @@ hello-world-uv/
**UV Runtime** (this example):
- `server.type = "uv"`
- No bundled dependencies
- No `mcp_config` needed
- `mcp_config` uses `uv run` to auto-resolve deps from `pyproject.toml`
- Small bundle size (~2 KB)
- Works on any platform

Expand Down
6 changes: 5 additions & 1 deletion examples/hello-world-uv/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
"icon": "icon.png",
"server": {
"type": "uv",
"entry_point": "src/server.py"
"entry_point": "src/server.py",
"mcp_config": {
"command": "uv",
"args": ["run", "--directory", "${__dirname}", "src/server.py"]
}
},
"compatibility": {
"platforms": ["darwin", "linux", "win32"],
Expand Down
1 change: 0 additions & 1 deletion src/schemas/0.4.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// v0.4: Adds UV runtime support for Python extensions
// NOTE: This schema version is experimental and subject to change.
import * as z from "zod";

export const MANIFEST_VERSION = "0.4";
Expand Down
1 change: 0 additions & 1 deletion src/schemas_loose/0.4.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// v0.4: Adds UV runtime support for Python extensions
// NOTE: This schema version is experimental and subject to change.
import * as z from "zod";

export const MANIFEST_VERSION = "0.4";
Expand Down
2 changes: 1 addition & 1 deletion src/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const LATEST_MANIFEST_VERSION = "0.4" as const;
/**
* Default manifest version for new packages
*/
export const DEFAULT_MANIFEST_VERSION = "0.2" as const;
export const DEFAULT_MANIFEST_VERSION = "0.3" as const;

/**
* Map of manifest versions to their strict schemas
Expand Down
Loading