v0.1.0 Released

Turn Python Backends into
MCP Servers Instantly

Convert any FastAPI, Flask, or Django application into a fully functional MCP (Model Context Protocol) server. Zero boilerplate. Pure magic.

Why backend2mcp?

Everything you need to expose your Python API as MCP tools

Instant Setup

Two lines of code. No migrations, no code generation, no configuration files. Your API is an MCP server.

Multi-Framework

One interface, three frameworks. FastAPI, Flask, and Django all work the same way.

Smart Introspection

Automatically extracts types, parameters, and schemas from your route handlers and Pydantic models.

Direct Execution

No HTTP overhead. Tools call your handlers directly, preserving all authentication and business logic.

Fine-Grained Control

Use the @mcp_tool decorator to customize names, descriptions, or hide routes entirely.

Extensible Design

Clean adapter pattern makes it easy to add support for new frameworks or customize behavior.

Get Started in Minutes

Install, import, and run. That's it.

main.py
from fastapi import FastAPI
from backend2mcp.fastapi import MCPAdapter

app = FastAPI()

@app.get("/users/{id}")
async def get_user(id: int):
    return {"id": id, "name": "Satyam"}

MCPAdapter(app).run()

Supported Frameworks

Industry-standard Python web frameworks out of the box

FastAPI

Full Pydantic support, async handlers, automatic documentation

🌶️

Flask

Route converters, extensions support, lightweight

🎪

Django

URL patterns, path converters, class-based views

Roadmap

Expanding to all major web frameworks

Phase 1 ✓

Python: FastAPI, Flask, Django

Phase 2

JavaScript: Express, NestJS, Fastify

Phase 3

Java: Spring Boot, Quarkus

Phase 4

Go: Gin, Fiber, Echo