MerchantryTidbits

api-tooling / library

FastAPI-MCP

Capability: FastAPI-MCP

Use it when

  • You have an existing FastAPI service and want MCP clients like Claude to call its endpoints as tools without rewriting each one
  • You need your MCP tools to enforce the same authentication and authorization your API already implements via FastAPI Depends

What it solves

Not the fit when

  • Flask, Django, or Node services; it is FastAPI-native
  • requires Python 3.10+
  • converting an OpenAPI spec you do not control into MCP tools
  • building the underlying rest api itself
  • exposing non-python or third-party apis you do not run
  • generic openapi-spec-to-mcp conversion for external services

Install

pip install fastapi-mcp

Invoke

from fastapi_mcp import FastApiMCP; mcp = FastApiMCP(app); mcp.mount()  # MCP server served at https://app.base.url/mcp

Alternatives

No reviewed alternatives recorded yet.