Python MCP Server Starter Template
About
Opinionated starter kit for building Model-Context-Protocol (MCP) server in Python — clean project scaffold, typed code, VS Code debug config, Docker & GitHub Actions ready out-of-the-box
Details
- Author
- ltwlf
- Downloads
- 156
- Categories
- Developer Tools
Jump to
- Implements MCP server using FastMCP from the Python SDK.
- Exposes MCP Tools and Resources for LLM interaction.
- Command-line interface with customizable options (stdio/SSE).
- Built-in debug capabilities with debugpy and VS Code integration.
- Development environment managed with uv.
- Docker support for containerized deployment.
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Python MCP Server Starter TemplateCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Clone the repository and rename the project package and scripts. Create a virtual environment with uv venv, activate it, then install dependencies with uv pip install -e ".[dev]". Run the server in stdio mode using uv run your-script-name or mcp dev ./your_package_name/server.py, or in SSE mode with uv run your-script-name --sse. Optionally, deploy with Docker via docker-compose up -d.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"python mcp server starter template": {
"python-mcp-starter": {
"command": "uv",
"args": [
"venv"
]
}
}
}
}
McpServers
{
"python-mcp-starter": {
"command": "uv",
"args": [
"venv"
]
}
}
Python MCP Server Starter Template
A template repository for creating Python applications using the Model Context Protocol (MCP) and the MCP Python SDK.Features
- Implements an MCP server using themcp Python SDK (FastMCP).
- Exposes MCP Tools (functions callable by LLMs) and Resources (data accessible by LLMs).
- Clean, modular architecture
- Easy tool and resource registration
- Command-line interface with customizable options
- Ready for production deployment
- Built-in debug capabilities using debugpy with VS Code integration
- Development tools configured (using uv for environment/package management)
- Docker support for containerized deployment
Getting Started
Prerequisites
- Python 3.10 or higher - uv (Recommended for environment and package management) - MCP Inspector (Recommended visual tool for testing/debugging MCP servers) - [Optional] Git - [Optional] Docker for containerized deploymentInstallation
1. Clone or Use as Template: Get the code. ``shell
git clone https://github.com/ltwlf/python-mcp-starter.git your-repo-name # Or use GitHub's "Use this template" button
cd your-repo-name
`
2. Rename the Project: Rename the core components:
Rename the hello_mcp_server directory to your desired Python package name (e.g., my_awesome_mcp).
Search and replace hello-mcp-server (in pyproject.toml, README.md, Dockerfile, docker-compose.yml) with your project name (e.g., my-awesome-mcp).
Search and replace hello_mcp_server (in Python import statements like in main.py, tests/test_server.py, pyproject.toml scripts section) with your new package name.
Update the APP_ID in your renamed server.py file.
* Update .vscode/launch.json configuration file to reflect your new project and package names.
3. Create Virtual Environment:
`shell
# Create the virtual environment
uv venv
# Activate the environment (Windows PowerShell)
.venv\Scripts\Activate.ps1
# Or for other shells:
# source .venv/bin/activate (Linux/macOS)
# .venv\Scripts\activate.bat (Windows Command Prompt)
`
4. Install Dependencies:
`shell
uv pip install -e ".[dev]"
`
Running the MCP Server for Development
You can run the server directly using uv run or the mcp CLI tool provided by the SDK. This allows testing with tools like the MCP Inspector.
In stdio mode (for MCP Inspector)
Method 1: Using uv run
``powershellSign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





