Fastapi

Security

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

Your AI app calls the Fastapi MCP server, which does the security work and sends the result back to the chat.

About Fastapi

Fastapi is a community MCP server from tadata-org, filed in our directory under security. Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!

Fastapi runs as a remote server at https://app.base.url/mcp, so there is nothing to install: your AI app connects over streamable HTTP, and most remote servers ask you to sign in with OAuth the first time.

At a glance

Publisher
tadata-org (community)
Runs
As a hosted remote server
Written in
Python
License
MIT
GitHub stars
12,032

How to set up Fastapi

  1. Nothing to install: Fastapi is a remote server, so all you need is an AI app that accepts a remote MCP URL.
  2. Check the Fastapi README for keys or settings; the registry lists none that Fastapi requires.
  3. Add Fastapi to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Fastapi tools to confirm the connection.
  5. Run one read-only task with Fastapi first, and keep your app asking before each tool call until the results look right.

Fastapi compared with similar servers

  • AiSOC by beenuar has fewer GitHub stars than Fastapi (8.9k against 12k); both are community servers, and AiSOC runs on your own machine and Fastapi runs as a remote server.
  • GhidraMCP by LaurieWired has more GitHub stars than Fastapi (12.1k against 12k); both are community servers, and GhidraMCP runs on your own machine and Fastapi runs as a remote server.
  • Bla by qybaihe has fewer GitHub stars than Fastapi (7.5k against 12k); both are community servers, and Bla runs on your own machine and Fastapi runs as a remote server.

Before you connect Fastapi

  • Give Fastapi its own sign-in or token with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Fastapi tool call until you trust what it does with them.
  • Treat text that Fastapi fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Fastapi on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Fastapi

How marketing and sales teams put Fastapi to work, by company size. Pick the size closest to yours and start Fastapi on one use case.

Small business

  • A small business can use Fastapi to check its domains, logins and site for common gaps before they cost a customer's trust.
  • Owners can ask Fastapi whether a tool or vendor has known issues before connecting it to customer data.
  • Fastapi runs as a remote server, so a small team can connect it in a few minutes with no install to maintain.

Mid-market

  • Marketing ops can use Fastapi to review what each connected app can access and remove keys nobody uses.
  • Security and web teams can connect Fastapi to scan campaign sites and forms before launch, not after an incident.
  • Start Fastapi on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run Fastapi in the security team's tooling, so marketing's agents and apps are reviewed like any other system.
  • Large orgs can use Fastapi to keep evidence for audits, showing which agents reached which data and when.
  • Fastapi is a community server, so have security review the code and pin a version before Fastapi touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Fastapi README

From tadata-org/fastapi_mcp on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md
Built by Tadata

FastAPI-MCP

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

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.

Questions about Fastapi

What is the Fastapi MCP server?

Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!. Fastapi is maintained by tadata-org on GitHub at tadata-org/fastapi_mcp, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I add Fastapi to Claude Code?

Fastapi is a remote server, so you add its URL instead of installing a package: run claude mcp add --transport http fastapi https://app.base.url/mcp in your terminal. In other apps, add the Fastapi URL as a remote or custom connector.

Does Fastapi need an API key?

The registry lists no required keys for Fastapi. Check the Fastapi README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Fastapi an official MCP server?

No. Fastapi is a community server maintained by tadata-org. Community servers can be excellent; read the code and the open issues before you give Fastapi access to company data.

What license is Fastapi under?

Fastapi is released under the MIT license, according to its GitHub repository. The license covers the code of Fastapi; the service it connects to has its own terms.