Frequently Asked Questions about FastAPI-MCP
Q: What is FastAPI-MCP?
A: FastAPI-MCP is a zero-configuration tool for automatically exposing FastAPI endpoints as Model Context Protocol (MCP) tools. MCP is an open protocol that standardizes how applications provide context to LLMs.
Q: What are the key features of FastAPI-MCP?
A: Key features include direct integration with FastAPI, zero configuration, automatic discovery of endpoints, preservation of schemas and documentation, and flexible deployment options.
Q: How do I install FastAPI-MCP?
A: We recommend using uv add fastapi-mcp or alternatively, you can install with pip: pip install fastapi-mcp.
Q: How do I use FastAPI-MCP with my FastAPI application?
A: Simply import FastApiMCP from the fastapi_mcp package, initialize it with your FastAPI app instance, and then mount it. See the Basic Usage example in the documentation.
Q: What is the purpose of the base_url parameter?
A: The base_url tells the MCP server where to send API requests when tools are called. It is highly recommended to provide it explicitly, especially in deployed environments.
Q: How does FastAPI-MCP name the MCP tools?
A: FastAPI-MCP uses the operation_id from your FastAPI routes as the MCP tool names. If you don’t specify an operation_id, FastAPI auto-generates one, which can be cryptic.
Q: Can I customize which endpoints are exposed as MCP tools?
A: Yes, you can control which FastAPI endpoints are exposed using Open API operation IDs or tags. You can include or exclude specific operations or tags.
Q: Can I deploy the MCP server separately from the original FastAPI app?
A: Yes, you can create an MCP server from one FastAPI app and mount it to a different app. This allows for greater flexibility and scalability.
Q: What do I do if I add endpoints to my FastAPI app after creating the MCP server?
A: You need to refresh the MCP server to include the new endpoints by calling the setup_server() method on the FastApiMCP instance.
Q: How do I connect to the MCP Server using SSE?
A: In applications like Cursor, navigate to Settings -> MCP and use the URL of your MCP server endpoint (e.g., http://localhost:8000/mcp) as the sse URL.
Q: My MCP client does not support SSE, what can I do?
A: You can use mcp-proxy stdio to expose MCP server to client which does not support SSE. Instructions are in the documentation.
Q: Where can I find examples of how to use FastAPI-MCP?
A: See the examples directory in the FastAPI-MCP repository for complete examples.
Q: Where can I get help and connect with other FastAPI-MCP users?
A: Join the MCParty Slack community to connect with other MCP enthusiasts, ask questions, and share your experiences with FastAPI-MCP.
Q: What are the requirements for using FastAPI-MCP?
A: FastAPI-MCP requires Python 3.10+ (Recommended 3.12) and uv.
FastAPI MCP Server
Project Details
- nguyendinhsinh361/fastapi-mcp
- MIT License
- Last Updated: 4/18/2025
Recomended MCP Servers
ChatTTS is a generative speech model for daily dialogue.
An integration that allows Claude Desktop to interact with Spotify using the Model Context Protocol (MCP).
- Amin Azmoodeh – Code. Create. Evolve.
hyeongseob's mcp test server repo.
这个项目是一个基于Model Context Protocol (MCP)的AutoCAD集成服务器,它允许通过自然语言与AutoCAD进行交互。通过这个服务器,用户可以使用Claude等大型语言模型来创建、修改和分析AutoCAD图纸,同时还可以存储和查询CAD元素的相关数据。目前制作参考学习,仅实现端到端之间的通信,具体工具函数尚未晚上





