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
MCP Markdownify Server with UTF-8 Support - Enhanced version with better multilingual handling
The MATLAB MCP server provides AI users with powerful scientific computing and data analysis capabilities. It allows users...
An open-source MCP server for integrating Wazuh security data with LLMs (such as the Claude Desktop App). This...
An MCP server for interacting with your up-bank account, retrieving account balances and transactions.
This read-only MCP Server allows you to connect to MailChimp data from Claude Desktop through CData JDBC Drivers....
A MCP Server for Cosense
A Model Context Protocol server that validates and renders Mermaid diagrams.
dedicated isolated environment for your AI agent





