Skip to main content
Glama
JPauloBR

MCP Server Starter

by JPauloBR

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.

End-to-end MCP server demo

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

Related MCP server: FastAPI MCP Template

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 ID

  • service_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.lock and scan the image in CI.

  • Treat tool descriptions and schemas as part of your public API.

Releasing

Releases are tag-driven and use PyPI trusted publishing—no long-lived API token is stored in GitHub. Before the first release, configure a PyPI trusted publisher for this repository with workflow release.yml and environment pypi.

  1. Update the version in pyproject.toml and merge the change after CI passes.

  2. Create and push the matching tag, for example v0.1.0.

  3. The release workflow verifies the tag/version pair, runs lint and tests, builds and validates the wheel and source distribution, publishes them to PyPI, and creates a GitHub release with generated notes and attached artifacts.

The workflow can also be run manually to validate the complete build without publishing.

Author

JP Oliveira · LinkedIn

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    A FastAPI-based implementation of the Model Context Protocol that enables standardized interaction between AI models and development environments, making it easier for developers to integrate and manage AI tasks.
    10
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Production-ready API server template integrating FastAPI with Model Context Protocol (MCP) for LLM integration, structured logging, and comprehensive testing.
    2
  • F
    license
    -
    quality
    -
    maintenance
    A production-ready Model Context Protocol server built with FastAPI, featuring JWT authentication, PostgreSQL database support, Redis caching, and comprehensive health monitoring for building secure async API applications.

View all related MCP servers

Related MCP Connectors

  • A Model Context Protocol server for Wix AI tools

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JPauloBR/mcp-server-starter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server