Template MCP Server

v1.0.0Developer Toolsstable

A production-ready foundation template for building Model Context Protocol (MCP) servers with FastAPI, featuring modular tools, comprehensive testing, and OpenShift deployment configurations. Includes automated transformation scripts to create custom

agentic-aifastapifastmcpkubernetesllm-tools
Share:
54
Stars
0
Downloads
0
Weekly
0/5

What is Template MCP Server?

Template MCP Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to production-ready foundation template for building model context protocol (mcp) servers with fastapi, featuring modular tools, comprehensive testing, and openshift deployment configurations. includes a...

A production-ready foundation template for building Model Context Protocol (MCP) servers with FastAPI, featuring modular tools, comprehensive testing, and OpenShift deployment configurations. Includes automated transformation scripts to create custom

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A production-ready foundation template for building Model Co

Use Cases

Production-ready MCP server foundation
FastAPI and Kubernetes deployment
LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 11, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx template-mcp-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Template MCP Server

The Red Hat Template MCP Server is a production-ready foundation for building custom Model Context Protocol servers using Python, FastAPI, and FastMCP. It provides a working server scaffold with modular tool definitions, a health check endpoint, comprehensive test coverage, and deployment configurations for Kubernetes and OpenShift. Teams at Red Hat and in the enterprise AI ecosystem use it as a starting point to create domain-specific MCP servers without building boilerplate from scratch.

Prerequisites

  • Python 3.11 or higher
  • uv package manager (https://astral.sh/uv) or pip
  • Git for cloning the repository
  • Optional: Docker and kubectl/oc CLI for container and OpenShift deployment
  • An MCP-compatible client for testing (Claude Desktop or Claude Code)
1

Clone the repository

Clone the Red Hat template MCP server repository to your local machine.

git clone https://github.com/redhat-data-and-ai/template-mcp-server
cd template-mcp-server
2

Install dependencies with Make

Use the provided Makefile to create a virtual environment, install all dependencies, and set up pre-commit hooks in one step.

make install
3

Configure environment variables

Copy the example environment file and edit it to set your desired host, port, and transport protocol. The server defaults to localhost:5001 over HTTP.

cp .env.example .env
4

Start the server locally

Use the Make target to start the server on localhost:5001. Verify it is running with the health check endpoint.

make local
curl http://localhost:5001/health
5

Add your own MCP tools

Open the tools directory and create new tool modules following the pattern of the included example tools (multiply calculator, code review prompt generator). Each tool is a decorated Python function.

6

Configure your MCP client

Point your MCP client at the running server using the HTTP or streamable-HTTP transport. Set ENABLE_AUTH=true in .env and configure OAuth if authentication is required.

Template MCP Server Examples

Client configuration

Connect Claude Code to a locally running template MCP server over HTTP transport.

{
  "mcpServers": {
    "template-mcp-server": {
      "type": "http",
      "url": "http://localhost:5001/mcp"
    }
  }
}

Prompts to try

Test the built-in example tools that ship with the template server.

- "Multiply 123 by 456"
- "Generate a code review prompt for a Python pull request that adds authentication"
- "Show me the Red Hat logo asset"
- "What tools are available on this MCP server?"

Troubleshooting Template MCP Server

Server fails to start with 'port already in use' error

Change MCP_PORT in your .env file to an available port (e.g. 5002) and restart. Check for other processes using 'lsof -i :5001'.

Authentication errors when ENABLE_AUTH is set

Note that ENABLE_AUTH defaults to False in .env.example but True in the application code. Explicitly set ENABLE_AUTH=false in .env if you want to disable auth for local development.

Pre-commit hooks fail during git commit

Run 'make install' to ensure pre-commit hooks are properly installed. Then run 'pre-commit run --all-files' to see and fix linting issues before committing.

Frequently Asked Questions about Template MCP Server

What is Template MCP Server?

Template MCP Server is a Model Context Protocol (MCP) server that production-ready foundation template for building model context protocol (mcp) servers with fastapi, featuring modular tools, comprehensive testing, and openshift deployment configurations. includes automated transformation scripts to create custom It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Template MCP Server?

Follow the installation instructions on the Template MCP Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Template MCP Server?

Template MCP Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Template MCP Server free to use?

Yes, Template MCP Server is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "template-mcp-server": { "command": "npx", "args": ["-y", "template-mcp-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Template MCP Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides