Python MCP Server Starter Template
@ltwlf
关于 Python MCP Server Starter Template
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
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"python-mcp-starter": {
"command": "uv",
"args": [
"venv"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Python MCP Server Starter Template?
It is a template repository for building Python applications using the Model Context Protocol (MCP) and the MCP Python SDK. It provides a clean, modular architecture for exposing MCP Tools and Resources, along with development tooling, debugging, and Docker support, targeting developers creating MCP servers.
How to use Python MCP Server Starter Template?
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.
Key features of Python MCP Server Starter Template
- Implements MCP server using
FastMCPfrom 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.
Use cases of Python MCP Server Starter Template
- Quickly scaffold a new MCP server for AI assistants.
- Prototype MCP Tools and Resources for LLM-powered applications.
- Provide a starting point for production-grade MCP integrations.
- Establish a consistent development workflow with debugging and testing.
FAQ from Python MCP Server Starter Template
What are the prerequisites to use this template?
Python 3.10 or higher and uv (for environment/package management) are required. The MCP Inspector is recommended for testing, and Git and Docker are optional.
How do I run the server in SSE mode versus stdio mode?
In stdio mode, run uv run your-script-name (or use the mcp dev CLI). For SSE mode, add the --sse flag, optionally setting custom host and port with --host and --port.
How can I debug the MCP server?
Use the uv run mcp-debug command, then attach the VS Code debugger with the "Attach to MCP worker" configuration. The template includes debugpy integration. Never enable debug mode in production.
How do I add new tools or resources?
Add tools using the @mcp.tool() decorator and resources using the @mcp.resource() decorator inside your renamed package’s server.py file. The template provides example implementations.
How do I deploy the server with Docker?
Update the Dockerfile and docker-compose.yml with your renamed project/package, then run docker-compose up -d or build and run directly with docker build and docker run.
开发工具 分类下的更多 MCP 服务器
MCP-Bridge
SecretiveShellA middleware to provide an openAI compatible endpoint that can call MCP tools
Unity MCP (Server + Plugin)
IvanMurzakAI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for fr
MCP Framework
QuantGeekDevThe Typescript MCP Framework
Golf
golf-mcpProduction-Ready MCP Server Framework • Build, deploy & scale secure AI agent infrastructure • Includes Auth, Observability, Debugger, Telemetry & Runtime • Run real-world MCPs powering AI Agents
DevDocs by CyberAGI 🚀
cyberagiincCompletely free, private, UI based Tech Documentation MCP server. Designed for coders and software developers in mind. Easily integrate into Cursor, Windsurf, Cline, Roo Code, Claude Desktop App
评论