About MCP Tool Server Template
MCP Tool Server Template is a cookiecutter template for developers building Python MCP tool servers. It generates a FastAPI-based project with a sample tool and deployment configurations.
Key features
- 01Cookiecutter project generation
- 02FastAPI REST server foundation
- 03Sample weather tool
- 04uv, ruff, and mypy support
- 05Docker and Kubernetes configurations
Use cases
- 01Scaffolding a new Python MCP server
- 02Starting a server with a sample weather tool
- 03Preparing container or Kubernetes deployment
MCP support
The template generates an MCP tool server that exposes tools to MCP clients, including a sample weather tool.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Tool Server Template
A cookiecutter template for creating Model Context Protocol (MCP) tool servers with FastAPI, uv, and Docker support.
Features
- FastAPI-based REST server
- Model Context Protocol (MCP) tool support
- Sample weather tool implementation
- Modern Python tooling (uv, ruff, mypy)
- Type hints and comprehensive testing
- Docker support for containerization
- Kubernetes deployment configuration
Requirements
- Python 3.12 or higher
- uv package manager
- cookiecutter 2.5.0 or higher
Usage
Creating a New Project
cookiecutter gh:mibexx/mbxai-mcp-server-template
Follow the prompts to configure your project:
project_name: The name of your projectproject_slug: The slug for your project (used in paths and imports)package_name: The name of your Python packagedescription: A short description of your projectauthor_name: Your nameauthor_email: Your emailopen_source_license: The license for your projectpython_version: The Python version to useuse_pytest: Whether to include pytest for testinguse_mypy: Whether to include mypy for type checkinguse_ruff: Whether to include ruff for linting
Project Structure
The template creates a well-organized project structure:
your-project/
├── src/
│ └── your_package/
│ ├── api/ # Core API functionality
│ ├── clients/ # Client libraries
│ ├── project/ # Project-specific code
│ │ └── weather.py # Sample weather tool
│ ├── config.py # Configuration management
│ └── __init__.py # Package initialization
├── tests/ # Test suite
├── data/ # Data storage
├── logs/ # Log files
├── kubernetes/ # Kubernetes deployment files
├── Dockerfile # Docker configuration
├── docker-compose.yml # Docker Compose configuration
├── pyproject.toml # Project metadata and dependencies
└── README.md # Project documentation
Development
Running Locally
cd your-project
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
uv pip install -e .
uv run service
Running with Docker
cd your-project
docker-compose up -d
Deploying to Kubernetes
cd your-project
kubectl apply -f kubernetes/mbxai_resource.yaml
Adding New Tools
See the project README.md for detailed instructions on adding new tools to your MCP server.
License
This template is licensed under the MIT License - see the LICENSE file for details.
About
Created by Mibexx
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.