How to Publish Your MCP Server

2 min read

If you plan to publish an MCP service for public use, here are some insights from the MCP community.

Installing MCP Package from PyPI in Claude and Cursor

You may encounter challenges when installing an MCP package from PyPI in Claude and Cursor. The key point is that the Claude desktop app and Cursor use uv, a modern Python package manager, instead of directly calling python to manage dependencies automatically.

How to Configure Claude/Cursor for Your PyPI Package

You need to update the claude_desktop_config.json file with the following configuration:

{
  "mcpServers": {
    "blender": {
      "command": "uv",
      "args": ["run", "--with", "blender_mcp", "python", "-m", "blender_mcp.server", "--stdio"],
      "env": {}
    }
  }
}

This is approximately equivalent to running:

pip install blender_mcp && python -m blender_mcp.server --stdio

Why Does This Work?

  • The uv run command creates an isolated environment
  • The --with blender_mcp flag installs your package from PyPI
  • It then executes python -m blender_mcp.server --stdio within that environment

Why Does npx Seem Simpler?

In the Node.js ecosystem, npx allows developers to install and execute a package in one step. Similarly, uv run --with in Python combines installation and execution into a single command.

Using the MCP CLI (Alternative Method)

If you have command-line access, you can also use the MCP CLI to install your package:

# Install the MCP CLI first if you haven't
pip install mcp[cli]

# Install your MCP server to Claude
mcp install -n "blender" -- python -m blender_mcp.server --stdio --with blender_mcp

This will automatically update the Claude configuration with the correct uv command.

Configuration for Cursor

For Cursor, you should use the same approach. Locate the MCP server configuration section in Cursor’s settings and apply the same command and args structure as shown above.

If you have any questions or encounter issues, check out this discussion:
🔗 GitHub Issue #247

Comments

Comments section will be available soon. Stay tuned!

Coming Soon