template
Its a template that can be extended to write MCP servers following Enterprise best practices around Security and Deployment on Kubernetes
claude mcp add --transport stdio redhat-data-and-ai-template-mcp-server python -m template_mcp_server \ --env MCP_HOST="localhost" \ --env MCP_PORT="5001" \ --env ENABLE_AUTH="False" \ --env MCP_SSL_KEYFILE="None" \ --env MCP_SSL_CERTFILE="None" \ --env PYTHON_LOG_LEVEL="INFO" \ --env MCP_TRANSPORT_PROTOCOL="http" \ --env USE_EXTERNAL_BROWSER_AUTH="False"
How to use
This MCP server is a production-ready Python/FastMCP implementation that exposes multiple transport protocols (HTTP, SSE, and streamable-HTTP) and includes three example tools: a multiply calculator, a code review prompt generator, and a Red Hat logo tool. It uses Pydantic for configuration via environment variables and structured JSON logging. To run, ensure Python 3.12+ is available, then start the server with the command configured in the mcp_config section. The server provides a /health endpoint for liveness checks and other tool endpoints under the MCP server root. Typical usage involves curling the health endpoint to verify the server is up and then invoking the individual tools via their HTTP interfaces in accordance with the FastMCP protocol. The template demonstrates proper error handling, SSL support, and OpenShift/container-ready deployment configuration as described in the repository documentation.
How to install
Prerequisites:
- Python 3.12+ installed on your system
- Git installed
- Optional: Docker if you prefer containerized deployment
Install steps:
-
Clone the repository git clone https://github.com/redhat-data-and-ai/template-mcp-server.git cd template-mcp-server
-
Create and activate a virtual environment python3 -m venv .venv source .venv/bin/activate
-
Install the package in editable mode with development dependencies pip install -e ".[dev]"
or if you prefer local editable install via pip
-
Install pre-commit hooks (optional but recommended) pre-commit install
-
Configure environment variables cp .env.example .env
Edit .env as needed (MCP_HOST, MCP_PORT, AUTH settings, etc.)
-
Run the server python -m template_mcp_server
-
Verify the server is running curl http://localhost:5001/health
Additional notes
Tips and notes:
- The server supports multiple transport protocols; configure MCP_TRANSPORT_PROTOCOL (http, sse, or streamable-http) via environment variables.
- SSL/TLS can be enabled by setting MCP_SSL_KEYFILE and MCP_SSL_CERTFILE to valid paths; ensure the hosting environment allows TLS termination if using a reverse proxy.
- AUTH can be enabled by setting ENABLE_AUTH to True and following the authentication guide in the docs; USE_EXTERNAL_BROWSER_AUTH enables browser-based OAuth for local development.
- The project is designed to be containerized and OpenShift-ready; you can adapt the provided container and deployment manifests for your environment.
- When renaming the project for your own MCP server, update references to template_mcp_server as described in the Rename Checklist in the README to avoid leftover references.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP