FastAPI-MCP
@tadata-org
FastAPI-MCP について
Expose your FastAPI endpoints as Model Context Protocol (MCP) tools, with Auth!
基本情報
設定
ツール
ツールは検出されませんでした
ツールは 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
FAQ from FastAPI-MCP
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.
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.
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.
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.
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.
「開発者ツール」の他のコンテンツ
Hello World MCP Server (Reference Extension)
anthropicsDesktop Extensions: One-click local MCP server installation in desktop apps
Huoshan Test
volcenginetest
prysmaticlabsGo implementation of Ethereum proof of stake
OpenSumi
opensumiA framework helps you quickly build AI Native IDE products. MCP Client, supports Model Context Protocol (MCP) tools via MCP server.
sentry-mcp
getsentryAn MCP server for interacting with Sentry via LLMs.
コメント