fastapi_mcp  by tadata-org

MCP server for FastAPI apps

Created 6 months ago
10,403 stars

Top 4.9% on SourcePulse

GitHubView on GitHub
Project Summary

This library exposes FastAPI endpoints as Model Context Protocol (MCP) tools, enabling seamless integration with systems that consume MCP. It targets developers building microservices with FastAPI who need to expose their functionality via the MCP standard, offering built-in authentication and minimal configuration.

How It Works

FastAPI-MCP leverages FastAPI's native ASGI interface to directly access and expose endpoints as MCP tools. It preserves the original request/response schemas and endpoint documentation from FastAPI. Authentication is handled via FastAPI's Depends() mechanism, allowing reuse of existing authentication logic. This direct ASGI transport avoids inter-process communication overhead.

Quick Start & Requirements

Highlighted Details

  • Built-in authentication using FastAPI dependencies.
  • Zero/minimal configuration required.
  • Preserves OpenAPI schemas and documentation.
  • Supports mounting MCP server to the same FastAPI app or separate deployment.

Maintenance & Community

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

The project is actively maintained, with no explicit limitations or caveats mentioned in the README.

Health Check
Last Commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
5
Issues (30d)
3
Star History
1,253 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.