create-python-server
by: modelcontextprotocol
Create a Python MCP server
πOverview
Purpose: To simplify the creation of Model Context Protocol (MCP) server projects without the need for build configuration or manual dependency management.
Overview: Create MCP Server is a command-line tool that automatically sets up server projects with a streamlined structure and integrated dependencies, allowing users to focus on development without the hassle of initial configurations.
Key Features:
-
Simple Command-Line Interface: Facilitates easy and quick project creation with minimal user input.
-
Auto-Configuration for Integration: Integrates with the Claude Desktop app when available, enhancing functionality out-of-the-box.
-
Fast Package Management: Utilizes uvx for efficient and reliable management of packages and project setup.
-
Structured Setup: Automatically creates a basic directory structure for MCP servers, providing only the essential files needed to run the server.
-
SDK Utilization: Leverages the Model Context Protocol Python SDK, ensuring compatibility and adherence to protocol standards.
MCP Create Server
Create Model Context Protocol (MCP) server projects with no build configuration.
Quick Overview
To create a new server, run either of these commands:
Using uvx (recommended)
uvx create-mcp-server
Using pip
pip install create-mcp-server
create-mcp-server
The tool will set up everything you need to create an MCP server.
Creating a Server
Prerequisite: Have UV >= 0.4.10 installed.
To create a new server:
- Run the command for either
uvx
orpip
as shown above.
You will have a new directory structured as follows:
my-server/
βββ README.md
βββ pyproject.toml
βββ src/
βββ my_server/
βββ __init__.py
βββ __main__.py
βββ server.py
Once done, you can start the server:
cd my-server
uv sync --dev --all-extras
uv run my-server
Features
- Simple command-line interface for creating new projects.
- Auto-configures Claude Desktop app integration when available.
- Utilizes uvx for package management and project creation.
- Sets up basic MCP server structure.
- Integrates with the Model Context Protocol Python SDK.
Philosophy
- Zero Configuration: No need to manually configure project structure or dependencies.
- Best Practices: Adheres to Python packaging standards and MCP server patterns.
- Batteries Included: Comes fully equipped to start building an MCP server.
License
Open source software licensed as MIT.