✨ From vibe coding to vibe deployment. UBOS MCP turns ideas into infra with one message.

Learn more

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.

Featured Templates

View More
AI Characters
Sarcastic AI Chat Bot
129 1713
AI Characters
Your Speaking Avatar
169 928
Customer service
AI-Powered Product List Manager
153 868
Verified Icon
AI Assistants
Speech to Text
137 1882

Start your free trial

Build your solution today. No credit card required.

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.