mcpField
M
MCP Tool Server Template

MCP Tool Server Template

Local
github.com/mibexxDeveloper Tools0Updated 72w ago

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

  1. 01Cookiecutter project generation
  2. 02FastAPI REST server foundation
  3. 03Sample weather tool
  4. 04uv, ruff, and mypy support
  5. 05Docker and Kubernetes configurations

Use cases

  1. 01Scaffolding a new Python MCP server
  2. 02Starting a server with a sample weather tool
  3. 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.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

MCP 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 project
  • project_slug: The slug for your project (used in paths and imports)
  • package_name: The name of your Python package
  • description: A short description of your project
  • author_name: Your name
  • author_email: Your email
  • open_source_license: The license for your project
  • python_version: The Python version to use
  • use_pytest: Whether to include pytest for testing
  • use_mypy: Whether to include mypy for type checking
  • use_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

Markdown supported

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.