MCP Catalogs
Home

mcp-server-python-template

by sontallive·17·Score 37

Python template for building MCP servers with clear documentation and example implementations.

developer-toolsai-llmother
16
Forks
0
Open issues
14 mo ago
Last commit
2d ago
Indexed

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:

you:Rapid prototyping of new MCP servers in Python
you:Learning MCP implementation patterns through examples
you:Building custom AI tools that integrate with external services
you:What transport modes does this template support?
you:How do I create my own MCP tools?

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 README
  • your_tool_functionasync def your_tool_function(param1: str, param2: int) -> str

    Your tool description.

Note: Template shows example tool definition pattern but doesn't list concrete tools from the example weather service.

Comparable tools

mcp-server-typescript-templatenpx create-mcp-serverfastmcp

Installation

Installation

  1. Clone this repository:
git clone https://github.com/sontallive/mcp-server-python-template.git
cd mcp-server-python-template
  1. 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.