mcp-server-template-python
A very simple Python template for building MCP servers using Streamable HTTP transport.
Overview
This template provides a foundation for creating MCP servers that can communicate with AI assistants and other MCP clients. It includes a simple HTTP server implementation with example tools, resources & prompts to help you get started building your own MCP integrations.
Prerequisites
Installation
Clone the repository:
Install python version & dependencies:
Usage
Start the server on port 3000:
Running the Inspector
Requirements
Node.js: ^22.7.5
Quick Start (UI mode)
To get up and running right away with the UI, just execute the following:
The inspector server will start up and the UI will be accessible at http://localhost:6274.
You can test your server locally by selecting:
Transport Type: Streamable HTTP
Development
Adding New Tools
To add a new tool, modify main.py
:
Adding New Resources
To add a new resource, modify main.py
:
The URI template uses {param_name}
syntax to define parameters that will be extracted from the resource URI and passed to your function.
Adding New Prompts
To add a new prompt , modify main.py
:
This server cannot be installed
A foundational template for building MCP servers in Python using Streamable HTTP transport. Provides example implementations of tools, resources, and prompts to help developers create custom MCP integrations for AI assistants.