Skip to main content
The Python template is a production-ready starting point for building MCP servers in Python.

Clone the template

Project structure

How it works

The template uses the official mcp Python package to implement the Model Context Protocol over HTTP + SSE:

Sample server

Adding tools

1. Declare the tool in list_tools

2. Implement the tool in call_tool

Using environment variables

Set before deploying:

Local development

Build and deploy

Dependencies

Dockerfile

Type hints

The Python template is fully typed. Use mypy for static analysis: