AgentIndex icon
AgentIndex
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Submit Tool
ToolsMCP ServersHOTCategoriesTrendingNewBest ListsCompareGuides
Home/
Dev Tooling/
fastapi_mcp
fastapi_mcp logo

fastapi_mcp

Active·★ 12.0k·MIT·Updated 2025-11-24
★ Most Popular★ Essential

FastAPI-MCP exposes the endpoints of an existing FastAPI application as Model Context Protocol tools, with authentication. Instead of writing a separate MCP server, you point it at your FastAPI app and it generates tools from your routes, preserving request and response schemas and the documentation you already wrote for Swagger.

It suits teams that already have a FastAPI backend and want AI assistants or agents to call it. Because it is FastAPI-native rather than a generic OpenAPI-to-MCP converter, it reuses your existing FastAPI dependencies for authentication and talks to the app directly through the ASGI interface, which is efficient and avoids an extra HTTP hop. You can mount the MCP server on the same app or deploy it separately. The authors also offer a hosted solution.

Getting started: `uv add fastapi-mcp` (or pip), create a `FastApiMCP` object from your app, and mount it. Then review which endpoints are exposed before connecting a client.

This write-up is based on the project's README and public repository data. We have not hand-tested the tool. Data as of 2026-10-24.

License
MIT
Latest release
v0.4.0 · 2025-07-28
Last commit
2025-11-24
Contributors
18
Forks
969
Open issues and PRs
174
First published
2025-03-08
PyPI package
fastapi-mcp 0.4.0 · 706,512 downloads last week

Source: GitHub, npm and PyPI public APIs.

#FastAPI#MCP#Python#API Tools#Authentication#Coding
$ Install
$ uv add fastapi-mcp
↗ Visit site★ GitHub
01

Features

01Authentication built in, using your existing FastAPI dependencies!
02FastAPI-native: Not just another OpenAPI -> MCP converter
03Zero/Minimal configuration required
04Preserving schemas of your request models and response models
05Flexible deployment - Mount your MCP server to the same app, or deploy separately
02

Why choose it

+Turns an existing FastAPI app into MCP tools with minimal configuration.
+Reuses existing FastAPI dependencies for authentication.
+Preserves schemas and endpoint documentation, so tools are well described for the model.
+Efficient ASGI transport and flexible deployment; MIT licensed.
03

Trade-offs

!The repository has not been updated since November 2025, so check compatibility with current MCP clients and spec versions.
!Exposing every endpoint by default can give agents more power than intended; filter endpoints, especially write operations.
!Only for FastAPI; other Python web frameworks need a different approach.
05

Maintenance check

StaleChecked: 2026-10-25
Last commit
2025-08-10
Commits, last 90 days
0
Releases, last 90 days
0
Latest release
v0.4.0 (2025-07-28)
Open issues
174
Recent issues with at least one comment
5/15
Commits per week, last 12 weeks
Commits per week, last 12 weeks: 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

Oldest week on the left; the latest four weeks are orange. Source: GitHub commit activity.

Status rule: archived on GitHub = Archived; last commit within 90 days = Active; 91 to 365 days = Slowing; older = Stale. All figures come from the GitHub API on the date shown.

Most discussed open issues

  • #189 [BUG] MCP session 404 in multi worker production environment9 comments · 2025-07-02
  • #208 [VOTE] Support Stateful Sessions in a Multi-Worker Environment, Using a Shared Session Store7 comments · 2025-07-29
  • #18 Issues integrating with Cline7 comments · 2025-03-22
  • #154 Support POST requests on main route6 comments · 2025-05-29
  • #72 [BUG] Cant get the server communicating to Claude correctly6 comments · 2025-04-16

Issue titles are quoted from GitHub. Open the link to check whether a problem still applies to the version you use.

04

Who it fits

Pick it if
  • You already have a FastAPI application and want to expose its endpoints as MCP tools while reusing your existing FastAPI authentication dependencies and Swagger schemas.
  • You want to mount the MCP server directly onto your ASGI app or deploy it separately under an MIT license.
Look elsewhere if
  • You are building a standalone MCP server from scratch rather than wrapping a FastAPI app; use FastMCP or the official MCP Python SDK.
  • You need an actively updated repository (last push was November 2025).
06

How it differs

fastmcp logovs fastmcp★ 28.2k

FastAPI-MCP automatically converts existing FastAPI web endpoints into MCP tools; FastMCP is an actively maintained general framework for writing purpose-built MCP servers and clients.

Full comparison →
07

Compatibility

FastAPI
Native
Verified via docs
Model Context Protocol
MCP Tool Provider
Verified via docs
Python
Python 3.10+
Verified via docs
08

Quick start

1
$ uv add fastapi-mcp
09

Use cases

↳Integrating FastAPI services as tools for large language models (LLMs) that support MCP.
↳Enabling LLMs to interact with and utilize existing business logic and data exposed via FastAPI.
↳Quickly exposing authenticated FastAPI APIs as discoverable and usable tools within an MCP ecosystem.
10

Alternatives

⚡Top VS:
VSfastmcp★28.2k→VSarcade-mcp★1.1k→VSgolf★840→VSmcp-use★10.8k→
fastmcp logo
fastmcp★ 28.2k
🚀 The fast, Pythonic way to build MCP servers and clients.
VSCompare→
arcade-mcp logo
arcade-mcp★ 1.1k
The best way to create, deploy, and share MCP Servers
VSCompare→
golf logo
golf★ 840
Production-Ready MCP Server Framework • Build, deploy & scale secure AI agent infrastructure • Includes Auth, Observability, Debugger, Telemetry & Runtime • Run real-world MCPs powering AI Agents
VSCompare→
mcp-use logo
mcp-use★ 10.8k
mcp-use is the easiest way to interact with mcp servers with custom agents
VSCompare→
Unity-MCP logo
Unity-MCP★ 4.5k
AI-powered bridge connecting LLMs and advanced AI agents to the Unity Editor via the Model Context Protocol (MCP). Chat with AI to generate code, debug errors, and automate game development tasks directly within your project.
VSCompare→
core logo
core★ 3.7k
A framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
VSCompare→
Agently logo
Agently★ 1.7k
[GenAI Application Development Framework] 🚀 Build GenAI application quick and easy 💬 Easy to interact with GenAI agent in code using structure data and chained-calls syntax 🧩 Use Event-Driven Flow *TriggerFlow* to manage complex GenAI working logic 🔀 Switch to any model without rewrite application code
VSCompare→
jupyter-mcp-server logo
jupyter-mcp-server★ 1.3k
🪐 🔧 Model Context Protocol (MCP) Server for Jupyter.
VSCompare→
See all alternatives →

Featured in these lists

  • SDKs, Frameworks & Official Reference Servers for Building with MCP

Comments

Log in to leave a comment

No comments yet. Be the first!

On this page
01Features02Why choose it03Trade-offs05Maintenance check04Who it fits06How it differs07Compatibility08Quick start09Use cases10Alternatives
tadata-org /
fastapi_mcp
↗

Expose FastAPI endpoints as MCP tools, with auth

12.0k969MIT
Last commit11mo ago
StatusActive
CategoryDev Tooling
Contributors18
Latest releasev0.4.0
Links
Documentation↗Discussion↗Issues↗Releases↗
Cloud Infrastructure
Ad

Deploy on DigitalOcean

Host your MCP servers, Docker containers, and AI agents with $200 free credit over 60 days.

Claim $200 Free Credit
© 2026 AgentIndex.app|Built by a 10-year iOS Developer.
Best by use caseAboutContactAdvertisePrivacy PolicyTerms of UseQYSGitHubBuy me a coffee ☕

Browse by Category

MCP ServersCode AssistantWorkflow AutomationRAG / Knowledge BaseMulti-AgentBrowser AutomationLLM InfraDev ToolingObservability

Not affiliated with Anthropic, OpenAI or Microsoft.