Skip to content

Conversation

@joan-anthropic
Copy link
Contributor

@joan-anthropic joan-anthropic commented Nov 13, 2025

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

Motivation and Context

How Has This Been Tested?

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@joan-anthropic joan-anthropic marked this pull request as ready for review November 25, 2025 18:06
Copy link
Member

@domdomegg domdomegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, although I worry this means that mcpb is no longer self-contained i.e. it depends on other UV dependencies which may not be available to install etc. which breaks one of the guarantees that I think makes mcpb quite good.

Four server types are supported:

- **`node`**: Node.js server with bundled dependencies
- **`python`**: Python server with bundled dependencies
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we have wording that raw python support may be removed and steer people to uv?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I'm going to mark uv as experimental in case this ends up being the wrong call (for whatever reason, e.g. mcp sdk no longer requires built dependencies?) and we want to backtrack to a bundled approach. Will update if/when we formalize!

@joan-anthropic
Copy link
Contributor Author

joan-anthropic commented Nov 26, 2025

Sure, although I worry this means that mcpb is no longer self-contained i.e. it depends on other UV dependencies which may not be available to install etc. which breaks one of the guarantees that I think makes mcpb quite good.

@domdomegg the main issue we're running into is that python MCPBs include pydantic - which is a dependency of the MCP python sdk - and this requires the exact python version to exist on the user's machine that the mcpb was built with. There's essentially no good path for fully self-contained python MCPBs with that dependency in place

Long shot but: is there any chance this package is an unnecessary dependency or might suitable replacements exist? It sounds like pydantic v1 had a pure-python mode but that version no longer seems to be supported

@joan-anthropic joan-anthropic force-pushed the joan/uv-runtime-support branch from 3163e3b to 342ad0f Compare December 3, 2025 05:19
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>
@joan-anthropic joan-anthropic force-pushed the joan/uv-runtime-support branch from 342ad0f to d90365e Compare December 3, 2025 05:22
@joan-anthropic joan-anthropic changed the title feat: add UV runtime support in manifest v0.4 feat: add experimental UV runtime support in manifest v0.4 Dec 3, 2025
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@joan-anthropic joan-anthropic merged commit 970f2d5 into main Dec 4, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants