MCP.so
登录

FastAPI MCP Server

@tadata-org

基本信息

分类

开发工具

许可证

MIT

传输方式

stdio

作者

tadata-org

关于 FastAPI MCP Server

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

FastAPI MCP Server 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

FastAPI MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is FastAPI-MCP?

FastAPI-MCP is a Python library that exposes your FastAPI endpoints as Model Context Protocol (MCP) tools, with built-in authentication support. It is built by Tadata and targets developers who want to add MCP capabilities to existing FastAPI services with minimal friction.

How to use FastAPI-MCP?

Install with uv add fastapi-mcp or pip install fastapi-mcp. Then, in your FastAPI application, import FastApiMCP, instantiate it with your app, and call .mount() to expose the MCP server at /mcp. No further configuration is required for basic use.

Key features of FastAPI-MCP

  • Authentication built in using existing FastAPI dependencies
  • FastAPI-native: not just an OpenAPI-to-MCP converter
  • Zero or minimal configuration required
  • Preserves request and response model schemas
  • Preserves endpoint documentation as in Swagger
  • Flexible deployment: mount to same app or deploy separately
  • Uses ASGI transport for efficient communication

Use cases of FastAPI-MCP

  • Add MCP tool access to an existing FastAPI API without rewriting code
  • Secure MCP endpoints using familiar FastAPI Depends() for authentication and authorization
  • Deploy MCP capabilities on the same infrastructure as your FastAPI app
  • Enable AI assistants to interact with your API through the Model Context Protocol

常见问题

1

How does FastAPI-MCP differ from other OpenAPI-to-MCP converters?

FastAPI-MCP is FastAPI-native—it is designed as a direct extension of FastAPI, not just a converter. It communicates via ASGI instead of making HTTP calls to your API, and it supports native FastAPI dependency injection for authentication.

2

What are the runtime dependencies for FastAPI-MCP?

FastAPI-MCP requires Python 3.10+ (recommended 3.12). The recommended package installer is `uv`, but `pip` also works. It depends on a running FastAPI application.

3

Where does the MCP server’s data live?

FastAPI-MCP does not store data itself; it exposes your existing FastAPI endpoints as MCP tools. All data and state remain within your FastAPI application and its backends.

4

What transport does FastAPI-MCP use?

It uses FastAPI’s ASGI interface directly for communication, eliminating the need for separate HTTP calls from the MCP server to your API.

5

Does FastAPI-MCP handle authentication?

Yes. It leverages your existing FastAPI `Depends()` for authentication and authorization, so MCP endpoints inherit the same security as your API endpoints.

评论

开发工具 分类下的更多 MCP 服务器