Get the FREE Ultimate OpenClaw Setup Guide →

template

Its a template that can be extended to write MCP servers following Enterprise best practices around Security and Deployment on Kubernetes

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
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:

  1. Clone the repository git clone https://github.com/redhat-data-and-ai/template-mcp-server.git cd template-mcp-server

  2. Create and activate a virtual environment python3 -m venv .venv source .venv/bin/activate

  3. Install the package in editable mode with development dependencies pip install -e ".[dev]"

    or if you prefer local editable install via pip

  4. Install pre-commit hooks (optional but recommended) pre-commit install

  5. Configure environment variables cp .env.example .env

    Edit .env as needed (MCP_HOST, MCP_PORT, AUTH settings, etc.)

  6. Run the server python -m template_mcp_server

  7. 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

Sponsor this space

Reach thousands of developers