MCP Server Starter
A production-minded Python starter for exposing typed tools over the Model Context Protocol with FastAPI.
README
MCP Server Starter
An opinionated, production-minded Python starter for exposing typed tools over the Model Context Protocol.
It deliberately uses the stable MCP Python SDK v1 line. SDK v2 is prerelease as of July 2026 and is not yet recommended for production.

What is included
- Streamable HTTP MCP endpoint at
/mcp - Typed tool inputs and structured outputs
- FastAPI health and readiness endpoints
- Request IDs and JSON access logs
- Environment-based configuration
- Stateless mode for horizontal scaling
- Unit, protocol, and HTTP tests
- Non-root Docker image
- Clear extension points for gateway authentication and telemetry
Quick start
Requirements: Python 3.11+ and uv.
uv sync --all-groups
uv run uvicorn mcp_server_starter.app:app --reload
The service exposes:
- MCP:
http://localhost:8000/mcp - Liveness:
http://localhost:8000/health/live - Readiness:
http://localhost:8000/health/ready
Try it with the MCP Inspector:
npx @modelcontextprotocol/inspector
Use http://localhost:8000/mcp as the Streamable HTTP server URL.
Or run the included demo client in a second terminal:
uv run python scripts/demo_client.py
It discovers the available tools and calls echo over the Streamable HTTP endpoint.
Included tools
echo: returns a validated message and request correlation IDservice_status: returns service name, version, and health state
They are intentionally boring. Replace them with domain tools while keeping the surrounding operational shell.
Configuration
All settings use the MCP_STARTER_ prefix.
| Variable | Default | Purpose |
|---|---|---|
MCP_STARTER_ENVIRONMENT |
development |
Deployment environment name |
MCP_STARTER_LOG_LEVEL |
INFO |
Python log level |
MCP_STARTER_ALLOWED_ORIGINS |
[] |
JSON array of browser origins allowed by CORS |
Example:
export MCP_STARTER_ENVIRONMENT=production
export MCP_STARTER_ALLOWED_ORIGINS='["https://your-mcp-client.example"]'
Architecture
MCP client
|
identity-aware API gateway <- authenticate, authorize, rate-limit
|
FastAPI operational shell <- health, request IDs, access logs
|
MCP Streamable HTTP <- protocol and typed schemas
|
domain tools <- business authorization + services
|
logs, traces, metrics, audit events
This starter does not pretend that a hard-coded API key is enterprise authentication. Terminate OAuth/OIDC at an identity-aware gateway, pass only trusted identity context to the application, and still enforce resource-level authorization inside each tool.
Development
uv run pytest
uv run ruff check .
uv run ruff format --check .
Build and run the container:
docker build -t mcp-server-starter .
docker run --rm -p 8000:8000 mcp-server-starter
Production checklist
- Put the service behind TLS and an identity-aware gateway.
- Restrict CORS to explicit origins; an empty list is the safe default.
- Add tool-level authorization—not only endpoint authentication.
- Emit audit events for every side-effecting tool.
- Add OpenTelemetry export for your chosen backend.
- Set timeouts, retries, and circuit breakers around downstream calls.
- Pin dependencies through
uv.lockand scan the image in CI. - Treat tool descriptions and schemas as part of your public API.
Author
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.