fastapi_mcp

fastapi_mcp

Convert FastAPI endpoints into MCP tools with authentication support.

MCPDevOpen sourceFastAPIMCP认证
Type
MCP
Transport
http
Open source
Yes
GitHub Stars
★ 11.9k
Source
mcp-github

Overview

FastAPI-MCP is a library that exposes FastAPI endpoints as MCP tools. It includes built-in authentication and can directly use existing FastAPI dependencies. The tool requires almost no configuration—just point it to your FastAPI application, and it works. It preserves the request and response model schemas as well as Swagger documentation, and supports flexible deployment. Ideal for developers who need to quickly convert existing FastAPI services into MCP tools.

Capabilities

  • Built-in authentication
  • Zero/minimal configuration
  • Preserve request and response model schemas
  • Preserve Swagger documentation
  • Flexible deployment options

Use cases

Convert FastAPI services into MCP toolsProvide secure API access for AIQuick integration with existing FastAPI projects

Setup

Requires: Python 3.10+uv
pip install fastapi-mcp or uv add fastapi-mcp

This information was compiled by AI from public sources and may contain inaccuracies — please refer to the source.

FAQ

How do I install FastAPI-MCP?

You can install it via pip: pip install fastapi-mcp, or using uv: uv add fastapi-mcp.

Does it support documentation from existing FastAPI projects?

Yes, FastAPI-MCP preserves all endpoint Swagger documentation.

Related skills