Template MCP Server
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
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
Maintainer
Works with
Installation
Manual Installation
npx template-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-serverInstall 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 installConfigure 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 .envStart 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/healthAdd 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.
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.
Template MCP Server Alternatives — Similar Developer Tools Servers
Looking for alternatives to Template MCP Server? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Template MCP Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.