MCP Forge Python - Production-Ready MCP Server with OAuth

A comprehensive MCP (Model Context Protocol) server template with OAuth support, JWT validation, and production-ready deployment options for Python developers.

View on GitHub

MCP Forge Python - Production-Ready MCP Server Template

Python Version License Docker CI Coverage Template Contributors Last Commit

A comprehensive, production-ready MCP (Model Context Protocol) server template built with Python, featuring OAuth 2.0 authentication, JWT validation, and seamless deployment options for developers building AI-powered applications.

Key Features of MCP Forge Python

MCP Protocol Implementation

Communication Transports

Built-in MCP Tools

The server includes several MCP tools registered via the router:

Security & Middleware

OAuth 2.0 Integration (RFC 8414 & RFC 9728)

Flexible Configuration

Production-Ready Deployment

Getting Started with MCP Forge Python

System Requirements

Installation & Setup

# Install project dependencies
uv sync

# Install the MCP server package
uv pip install -e .

# Start HTTP server with streaming support
uv run http

# Alternative: Run stdio server for local AI clients
uv run stdio

# Or use just commands
just run      # HTTP server
just run-stdio # Stdio server

Project Architecture

src/mcp_app/
├── main.py          # Application entry point and FastAPI setup
├── config.py        # Pydantic configuration models
├── context.py       # JWT context management for secure claim sharing
├── handlers/        # OAuth endpoints handlers (RFC 8414 & RFC 9728)
├── middlewares/     # Custom middlewares (JWT, access logs, CORS)
└── tools/           # MCP tools and registration router

Core Components

Documentation & Resources

License

This project is licensed under the Unlicense - a public domain dedication. See LICENSE.txt for the full license text.