mcp-server-python-template
by sontallive·★ 17·Score 37
Python template for building MCP servers with clear documentation and example implementations.
Overview
This is a well-structured Python template for creating MCP servers. It provides a streamlined foundation with configurable transport modes (stdio, SSE) and includes an example weather service integration. The template features clean, well-documented code structure with minimal dependencies. A notable strength is its embedded MCP specifications and documentation, which can help AI assistants better understand MCP implementation without requiring external references.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this template when you're starting with MCP server development in Python and want a well-documented foundation with example implementations.
When NOT to choose this
Don't choose this if you need production-ready features beyond what's provided in the template, or if you prefer other programming languages.
Tools this server exposes
1 tool extracted from the READMEyour_tool_functionasync def your_tool_function(param1: str, param2: int) -> strYour tool description.
Note: Template shows example tool definition pattern but doesn't list concrete tools from the example weather service.
Comparable tools
Installation
Installation
- Clone this repository:
git clone https://github.com/sontallive/mcp-server-python-template.git
cd mcp-server-python-template- Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e .Claude Desktop Configuration
Add the following to your Claude Desktop configuration:
{
"mcpServers": {
"mcp-python-template": {
"command": "python",
"args": ["server.py"],
"env": {}
}
}
}FAQ
- What transport modes does this template support?
- The template supports stdio and SSE (Server-Sent Events) transport modes, allowing it to work with CLI tools and web applications respectively.
- How do I create my own MCP tools?
- Import the necessary components from 'mcp', initialize your MCP server with a namespace, and define your tools using the @mcp.tool() decorator as shown in the README.
Compare mcp-server-python-template with
Last updated · Auto-generated from public README + GitHub signals.