1. Conduid
  2. Developer Tools
  3. FastAPI to MCP auto generator
MCP server · Developer Tools

FastAPI to MCP auto generator

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

Unclaimed MIT last commit 11 months ago devtools
89Excellent

Scored 10 days ago · breakdown

About FastAPI to MCP auto generator

FastAPI to MCP auto generator is an MCP server published by tadata-org in the Developer Tools category: expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!.

The repository has 12K stars and 970 forks, with the last commit 11 months ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/tadata-org/fastapi_mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about FastAPI to MCP auto generator

Powered by Claude · Grounded in docs

I know everything about FastAPI to MCP auto generator. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 4 days ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • ✓No dynamic code executionSource scan found no eval, dynamic Function, or shell execution.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

Releases

v0.4.0v0.4.0 · 28 Jul 2025🚀 FastAPI-MCP now supports Streamable HTTP transport. HTTP transport is now the recommended approach, following the specification that positions HTTP as the standard while maintaining SSE for backwards compatibility. ⚠️ Breaking Changes…
v0.3.7v0.3.7 · 14 Jul 2025Fixed 🐛 Fix a bug with OAuth default_scope (#123) PRs Fixes #123: allow usage of default_scope to be passed by @jessesanford in https://github.com/tadata-org/fastapi_mcp/pull/185 New Contributors @jessesanford made their first contribution…
v0.3.6v0.3.6 · 10 Jul 2025What's Changed Added 🚀 Add configurable HTTP header forwarding (#181) Fixed 🐛 Fix a bug with handling FastAPI `root_path` parameter (#163) PRs update readme by @itay-tadata in https://github.com/tadata-org/fastapi_mcp/pull/164 Update…
v0.3.4v0.3.4 · 18 May 2025Fixed 🐛 Update the `mcp` dependency to `1.8.1`. Fixes Issue #134 that was caused after a breaking change in mcp sdk 1.8.0. PRs Upgrades the mcp package dependency to 1.8.1 by @ierickson in https://github.com/tadata-org/fastapi_mcp/pull/137…
v0.3.3v0.3.3 - Fix OpenAPI Conversion Regression · 23 Apr 2025Fixes the broken release from 0.3.2. Fixed 🐛 Fix critical bug in openapi conversion (missing `param_desc` definition) (#107, #99) 🐛 Fix non-ascii support (#66) PRs Fix error in openapi conversion by @danlapid in…

README

PyPI version Python Versions FastAPI CI Coverage

Features

  • Authentication built in, using your existing FastAPI dependencies!

  • FastAPI-native: Not just another OpenAPI -> MCP converter

  • Zero/Minimal configuration required - just point it at your FastAPI app and it works

  • Preserving schemas of your request models and response models

  • Preserve documentation of all your endpoints, just as it is in Swagger

  • Flexible deployment - Mount your MCP server to the same app, or deploy separately

  • ASGI transport - Uses FastAPI's ASGI interface directly for efficient communication

Hosted Solution

If you prefer a managed hosted solution check out tadata.com.

Installation

We recommend using uv, a fast Python package installer:

uv add fastapi-mcp

Alternatively, you can install with pip:

pip install fastapi-mcp

Basic Usage

The simplest way to use FastAPI-MCP is to add an MCP server directly to your FastAPI application:

from fastapi import FastAPI
from fastapi_mcp import FastApiMCP

app = FastAPI()

mcp = FastApiMCP(app)

# Mount the MCP server directly to your FastAPI app
mcp.mount()

That's it! Your auto-generated MCP server is now available at https://app.base.url/mcp.

Documentation, Examples and Advanced Usage

FastAPI-MCP provides comprehensive documentation. Additionaly, check out the examples directory for code samples demonstrating these features in action.

FastAPI-first Approach

FastAPI-MCP is designed as a native extension of FastAPI, not just a converter that generates MCP tools from your API. This approach offers several key advantages:

  • Native dependencies: Secure your MCP endpoints using familiar FastAPI Depends() for authentication and authorization

  • ASGI transport: Communicates directly with your FastAPI app using its ASGI interface, eliminating the need for HTTP calls from the MCP to your API

  • Unified infrastructure: Your FastAPI app doesn't need to run separately from the MCP server (though separate deployment is also supported)

This design philosophy ensures minimum friction when adding MCP capabilities to your existing FastAPI services.

Development and Contributing

Thank you for considering contributing to FastAPI-MCP! We encourage the community to post Issues and create Pull Requests.

Before you get started, please see our Contribution Guide.

Community

Join MCParty Slack community to connect with other MCP enthusiasts, ask questions, and share your experiences with FastAPI-MCP.

Requirements

  • Python 3.10+ (Recommended 3.12)
  • uv

License

MIT License. Copyright (c) 2025 Tadata Inc.

README fetched from the repository 4 days ago. The original is authoritative.

Questions

About FastAPI to MCP auto generator

How do I install FastAPI to MCP auto generator?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is FastAPI to MCP auto generator safe to use with an AI agent?

Its trust score is 89 out of 100 (excellent). It passes 5 of the 6 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is FastAPI to MCP auto generator still maintained?

The last commit was 11 months ago and 173 open issues. That's long enough that you should check whether the maintainer is responding to issues before depending on it.