Python MCP Server Starter
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Python MCP Server Starterread the README resource and summarize the setup steps"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Python MCP Server Starter
A Python starter pack that you can clone and customize for projects that need an MCP server. It provides a Streamable HTTP server setup, example tools and resources, and a REST API route.
Features
MCP Streamable HTTP endpoint (
/mcp)Example MCP tool:
Do_somethingMCP resource that returns the project README:
file://README.mdREST API endpoint:
POST /api/v1/do_somethingServer configuration through environment variables and a
.envfile
Related MCP server: mcp-server-template-python
Requirements
Python 3.12 or later
Installation
Install the project dependencies from the repository root:
uv syncRunning the Server
The server can be started in one of three ways. From the repository root, configure the environment first:
cp .env_example .env1. Built-in Uvicorn server
Use the project runner for local development. It calls SERVER.run() and reads server_host and server_port from .env.
uv run --env-file .env python -m src.mcp_run2. Uvicorn CLI
The ASGI app is exposed as app by src.mcp_run_via_gunicorn. Set the bind address and port with Uvicorn options; keep them consistent with the server settings in .env.
uv run --env-file .env uvicorn src.mcp_run_via_gunicorn:app \
--host 127.0.0.1 \
--port 80963. Gunicorn with Uvicorn workers
Install the optional Gunicorn dependency and start the server using the repository configuration:
uv sync --extra gunicorn
uv run gunicorn -c gunicorn.conf.pyGunicorn reads gunicorn_bind, gunicorn_workers, and gunicorn_timeout from .env. gunicorn_bind controls Gunicorn's listener; make sure its host is compatible with server_host and the allowed-host configuration.
All three methods expose the MCP endpoint at /mcp and the REST route at /api/v1/do_something.
Configuration
Copy .env_example to .env as described in Running the Server, then update the values as needed. .env is excluded from Git because it may contain sensitive information, while .env_example is committed as a shareable configuration template. If a setting is omitted, its default value from the table below is used.
Environment variable | Default | Description |
|
| Host used by the built-in runner and MCP transport configuration |
|
| Port used by the built-in runner |
|
| Whether to use stateless mode for HTTP transport |
|
| Logging level |
|
| Enable DNS rebinding protection |
|
| Comma-separated list of allowed hosts for DNS rebinding protection |
|
| Comma-separated list of allowed origins for DNS rebinding protection |
|
| Allow test-only retrieval arguments |
|
| Gunicorn bind address and port (Gunicorn runner only) |
|
| Number of Gunicorn worker processes |
|
| Gunicorn worker timeout in seconds |
allowed_hosts and allowed_origins are passed to the DNS rebinding protection settings. The current CORS middleware allows all origins, methods, and headers for development convenience. Restrict these settings before deploying to production.
Note: Available Interfaces Form
MCP Tool
Name | Description | Return value |
| Performs an example action |
|
MCP Resource
URI | Description |
| Reads and returns |
REST API
POST /api/v1/do_something parses a JSON or form request body. The current example implementation returns the JSON string "Do something independently".
curl -X POST http://127.0.0.1:8096/api/v1/do_something \
-H 'Content-Type: application/json' \
-d '{}'Project Structure
src/
├── configuration/ # Server configuration
├── modules/ # Shared modules and logging
├── tasks/ # MCP tools and resources, and REST API
├── utils/ # Utilities
├── mcp.py # Server and interface configuration; exports SERVER
├── mcp_run.py # Built-in server runner
├── mcp_run_via_gunicorn.py # ASGI app setup for Uvicorn/Gunicorn
└── server.py # Streamable HTTP server wrapperThe repository root also contains gunicorn.conf.py, which configures the optional Gunicorn runner.
Development Notes
Project metadata and dependencies are managed in
pyproject.toml.The
.envfile is loaded automatically.The default server address and port are intended for development. Review the bind address, allowed hosts, and CORS policy before exposing the server externally.
Note: Cloning Without Git History
By default, git clone downloads the repository history and creates a .git folder. If you want to start a new project with the starter pack's files but without its Git history, use one of the methods below.
1. Use git clone --depth 1 (recommended)
This fetches only the latest commit and its required Git data, rather than the full history. It still creates a .git folder, so delete the .git folder after cloning to keep only the files.
# 1. Clone only the latest commit
git clone --depth 1 <repository URL>
# 2. Move into the folder
cd <folder-name>
# 3. Remove the git folder (Linux/macOS)
rm -rf .git
# Remove the git folder (Windows PowerShell)
rm -Recurse -Force .git2. Use npx degit (cleanest method)
If you have Node.js installed, using the degit tool is the most convenient option. It copies only the code and never creates a .git folder at all.
npx degit <username>/<repository-name> <new-folder-name>3. Use git archive (requires server support)
This requires support from the remote server and downloads the code as an archive without .git. (Note that some services, such as GitHub, restrict remote git archive for security reasons.)
git archive --remote=<repository URL> HEAD -o latest.zip4. Download a ZIP with curl or wget
Instead of a Git command, this uses the ZIP download link provided by the web service. (GitHub example below.)
curl -L https://github.com/<user>/<repo>/archive/refs/heads/main.zip -o code.zip
unzip code.zipSummary
Fastest Git command: run
git clone --depth 1, then delete the.gitfolderCleanest tool: use
npx degitGUI users: click [Code] -> [Download ZIP] on the GitHub page
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
A MCP server built for developers enabling Git based project management with project and personal…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.1-
- FlicenseNot gradedqualityDmaintenanceA Python template for building MCP servers with Streamable HTTP transport, providing example tools, resources, and prompts.1-
- FlicenseNot gradedqualityDmaintenanceThis MCP server provides a Streamable HTTP endpoint with bearer token authentication, exposing echo and add tools, and an info resource for remote client integration.-
- FlicenseNot gradedqualityCmaintenanceA minimal MCP server template with Streamable HTTP transport, bearer token authentication, and a health check endpoint, designed for quick deployment on Render. It provides an example tool and is meant to be forked and customized with your own tools.-