create-python
Create a Python MCP server
claude mcp add --transport stdio modelcontextprotocol-create-python-server python -m my_server
How to use
This MCP server project is generated by the Create MCP Server tool for Python-based MCP implementations. It scaffolds a minimal MCP server project using the Model Context Protocol Python SDK and provides a ready-to-run structure without manual dependency setup. The resulting project includes a standard package layout under src/, including a package (e.g., my_server) with an init.py, main.py, and server.py, allowing you to run the server with a simple Python invocation. You can start the server after creating a project by running the provided UV commands (uv sync and uv run) from the project directory, which ensures the project dependencies are installed and the server loop is started according to MCP conventions. The server leverages the MCP Python SDK to implement context handling, data exchange, and protocol features defined by MCP.
How to install
Prerequisites:
- Python 3.8+ and pip installed on your system.
- UV (optional, recommended for project orchestration and development workflow): https://docs.astral.sh/uv/
Installation steps:
-
Install the code generator for MCP servers (Choose one):
- Using pip: pip install create-mcp-server
- Or using UV (recommended): uvx install create-mcp-server
-
Create a new MCP server project:
- Using UV: uvx create-mcp-server
- Or using pip: create-mcp-server
-
Change into the newly created project directory (e.g., my-server).
-
Install dependencies and start development workflow (UV example): uv sync --dev --all-extras uv run my-server
-
The server will start, using the MCP Python SDK to handle Model Context Protocol interactions. You can customize src/my_server/server.py and related files as needed for your context models and endpoints.
Additional notes
Tips and considerations:
- The generated project uses the MCP Python SDK; refer to its documentation for available context types and handlers.
- No manual configuration is required to start; the scaffolding follows standard Python packaging practices and MCP server patterns.
- If you use UV, you can leverage uv sync to install dependencies and uv run to start the server with development extras.
- Environment variables are not strictly required by default, but you may add them for configuration (e.g., API keys, endpoints) in a .env file or your runtime environment as needed by your MCP server logic.
- If you customize the server package name (e.g., my_server), ensure the main.py entry point remains aligned with python -m my_server for running the server.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP