Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

Fastapi MCP

MCP server by tadata-org Verified · gh:tadata-org

FastAPI-MCP exposes the endpoints of a FastAPI app as Model Context Protocol (MCP) tools, with authentication. It is aimed at developers who already run FastAPI services and want MCP support.

  • Score 71
  • 12k stars
  • MIT
  • Updated

Install Fastapi MCP

Built from the published package, never by AI.

claude mcp add fastapi-mcp -- uvx fastapi-mcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install Fastapi MCP in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the fastapi-mcp block.

About

FastAPI-MCP is a Python library that exposes the endpoints of a FastAPI application as Model Context Protocol (MCP) tools. With zero or minimal configuration, you point it at your FastAPI app and it generates the MCP server. The source says it preserves the schemas of request and response models and the documentation of each endpoint, as shown in Swagger.

It uses FastAPI's ASGI interface directly, so the MCP server does not make HTTP calls to your API. Authentication uses your existing FastAPI dependencies. The MCP server can be mounted on the same app or deployed separately. The project is aimed at developers who already run FastAPI services and want to add MCP support. It is MIT licensed and published by Tadata.

Written from the project's README and checked against it.

What you need

  • Python 3.10+ (3.12 recommended)
  • uv (recommended installer) or pip

Try asking

  • Add MCP tools to my existing FastAPI app without rewriting endpoints
  • Expose my FastAPI endpoints to an AI assistant with auth checks
  • Keep my request and response schemas when exposing endpoints as tools

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work

What you can do with it

  • Exposing FastAPI endpoints to AI assistants
  • Securing MCP endpoints with FastAPI dependencies
  • Adding MCP support to an existing FastAPI service

Alternatives to Fastapi MCP

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

Fastapi MCP: common questions

Is FastAPI-MCP just an OpenAPI to MCP converter?

The source says it is not. It describes itself as a native extension of FastAPI, not just a converter that generates MCP tools from an API.

How does FastAPI-MCP handle authentication?

Authentication is built in and uses your existing FastAPI dependencies. The source says you can secure MCP endpoints with familiar FastAPI Depends() for authentication and authorization.

Can the MCP server run separately from the FastAPI app?

Yes. The MCP server can be mounted to the same FastAPI app, or deployed separately. The source links to a guide on separate deployment.

How do I install Fastapi MCP?

In Claude Code run claude mcp add fastapi-mcp -- uvx fastapi-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is Fastapi MCP the official server?

Fastapi MCP is published by gh:tadata-org from its verified domain in the official MCP Registry.

Is Fastapi MCP free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is Fastapi MCP safe to use?

It scores 71 of 100. Grades: maintenance F, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to Fastapi MCP?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does Fastapi MCP work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

Fastapi MCP Install

Add to stack

Loading.