finds.dev

tadata-org/fastapi_mcp

Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

View on GitHubHomepage ↗

★ 11,915PythonMITupdated Nov 2025

// the take

fastapi_mcp turns any FastAPI app into an MCP server by introspecting its OpenAPI schema and exposing each endpoint as an MCP tool. It uses ASGI transport to call your app in-process rather than over HTTP, so there's no second network hop. Aimed at Python devs who already have a FastAPI service and want AI assistants to call it without rewriting anything.

Uses FastAPI's own Depends() for auth, so you get OAuth2/JWT/API key gating with code you already wrote — no parallel auth system to maintain. ASGI transport is the right call: skips serialization overhead and means the MCP server can't drift out of sync with the app it wraps. OpenAPI-to-MCP conversion preserves docstrings and Pydantic schemas, so tools arrive in the LLM context with real type info. Test coverage is solid — separate fixture apps, real transport tests, schema conversion tests — not just happy-path smoke tests.

Last push was November 2025 and MCP is moving fast; the spec has had breaking changes and there's real risk this falls behind without active maintenance. The 'FastAPI-first' claim is partly marketing: it still converts OpenAPI JSON under the hood, which means endpoints with complex response unions or custom encoders may generate confusing or wrong tool schemas. No streaming support — long-running endpoints that return `StreamingResponse` don't map cleanly to MCP tool calls, and the docs don't address this. Separate deployment (non-ASGI mode) falls back to HTTP calls, which quietly removes the main architectural advantage with no warning in the UI.

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
11,915
Forks
952
Language
Python
License
MIT
Last commit
24 Nov 2025

// nearby

If fastapi_mcp isn't quite it.

All repos →