mcpb/examples/hello-world-uv
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Bryan Thompson a5d9ae8ed2
fix: repair broken examples and graduate UV runtime from experimental
- hello-world-node: wrap server startup in async main() with proper
  await on server.connect(transport) — fixes crash on initialize in
  Claude Desktop UtilityProcess runtime (closes #200)
- hello-world-uv: add required mcp_config block — v0.4 schema requires
  it but the example omitted it, causing mcpb pack to fail
- file-manager-python: convert from broken v0.1/python to v0.4/uv —
  the old manifest had privacy_policies on v0.1 (schema violation),
  used command "python" (ENOENT on macOS), and had no bundled deps.
  Now uses UV runtime with proper mcp_config (closes #47, closes #72)
- Graduate UV runtime from experimental across docs and schema comments
- Bump DEFAULT_MANIFEST_VERSION from 0.2 to 0.3

All three examples verified: pack succeeds, server responds to MCP
initialize over stdio, tools/list returns expected tools.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-12 11:16:30 -05:00
..
src feat: add UV runtime support in manifest v0.4 2025-12-02 21:22:19 -08:00
.mcpbignore feat: add UV runtime support in manifest v0.4 2025-12-02 21:22:19 -08:00
icon.png feat: add UV runtime support in manifest v0.4 2025-12-02 21:22:19 -08:00
manifest.json fix: repair broken examples and graduate UV runtime from experimental 2026-03-12 11:16:30 -05:00
pyproject.toml feat: add UV runtime support in manifest v0.4 2025-12-02 21:22:19 -08:00
README.md fix: repair broken examples and graduate UV runtime from experimental 2026-03-12 11:16:30 -05:00

Hello World UV Runtime Example

This example demonstrates a minimal MCP server using UV runtime.

What is UV Runtime?

UV runtime lets Claude Desktop automatically manage Python and dependencies for your extension:

  • Downloads the correct Python version for the user's platform
  • Creates an isolated virtual environment
  • Installs dependencies from pyproject.toml
  • Works cross-platform (Windows, macOS, Linux) without user setup

Structure

hello-world-uv/
├── manifest.json       # server.type = "uv"
├── pyproject.toml      # Dependencies listed here
├── .mcpbignore        # Exclude build artifacts
└── src/
    └── server.py       # MCP server implementation

Key Differences from Python Runtime

UV Runtime (this example):

  • server.type = "uv"
  • No bundled dependencies
  • mcp_config uses uv run to auto-resolve deps from pyproject.toml
  • Small bundle size (~2 KB)
  • Works on any platform

Python Runtime (traditional):

  • server.type = "python"
  • Must bundle dependencies in server/lib/
  • Requires mcp_config with PYTHONPATH
  • Larger bundle size
  • Only works with pure Python (no compiled deps)

Installing

mcpb pack

Install the generated .mcpb file in Claude Desktop.

Testing Locally

# Install dependencies
uv sync

# Run server
uv run src/server.py

Tools

  • say_hello - Greets a person by name