Fastapi MCP
MCP server by tadata-org Verified · gh:tadata-org
FastAPI-MCP exposes the endpoints of a FastAPI app as Model Context Protocol (MCP) tools, with authentication. It is aimed at developers who already run FastAPI services and want MCP support.
Install Fastapi MCP
Built from the published package, never by AI.
claude mcp add fastapi-mcp -- uvx fastapi-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"fastapi-mcp": {
"args": [
"fastapi-mcp"
],
"command": "uvx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"fastapi-mcp": {
"args": [
"fastapi-mcp"
],
"command": "uvx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"fastapi-mcp": {
"args": [
"fastapi-mcp"
],
"command": "uvx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add fastapi-mcp -- uvx fastapi-mcp{
"mcpServers": {
"fastapi-mcp": {
"args": [
"fastapi-mcp"
],
"command": "uvx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add fastapi-mcp uvx fastapi-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the fastapi-mcp block.
About
FastAPI-MCP is a Python library that exposes the endpoints of a FastAPI application as Model Context Protocol (MCP) tools. With zero or minimal configuration, you point it at your FastAPI app and it generates the MCP server. The source says it preserves the schemas of request and response models and the documentation of each endpoint, as shown in Swagger.
It uses FastAPI's ASGI interface directly, so the MCP server does not make HTTP calls to your API. Authentication uses your existing FastAPI dependencies. The MCP server can be mounted on the same app or deployed separately. The project is aimed at developers who already run FastAPI services and want to add MCP support. It is MIT licensed and published by Tadata.
Written from the project's README and checked against it.
What you need
- Python 3.10+ (3.12 recommended)
- uv (recommended installer) or pip
Try asking
- Add MCP tools to my existing FastAPI app without rewriting endpoints
- Expose my FastAPI endpoints to an AI assistant with auth checks
- Keep my request and response schemas when exposing endpoints as tools
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
What you can do with it
- Exposing FastAPI endpoints to AI assistants
- Securing MCP endpoints with FastAPI dependencies
- Adding MCP support to an existing FastAPI service
Alternatives to Fastapi MCP
All alternatives →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
Compare with GitDiagram, mockserver or XcodeBuildMCP
Fastapi MCP: common questions
Is FastAPI-MCP just an OpenAPI to MCP converter?
The source says it is not. It describes itself as a native extension of FastAPI, not just a converter that generates MCP tools from an API.
How does FastAPI-MCP handle authentication?
Authentication is built in and uses your existing FastAPI dependencies. The source says you can secure MCP endpoints with familiar FastAPI Depends() for authentication and authorization.
Can the MCP server run separately from the FastAPI app?
Yes. The MCP server can be mounted to the same FastAPI app, or deployed separately. The source links to a guide on separate deployment.
How do I install Fastapi MCP?
In Claude Code run claude mcp add fastapi-mcp -- uvx fastapi-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is Fastapi MCP the official server?
Fastapi MCP is published by gh:tadata-org from its verified domain in the official MCP Registry.
Is Fastapi MCP free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is Fastapi MCP safe to use?
It scores 71 of 100. Grades: maintenance F, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to Fastapi MCP?
Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.
Does Fastapi MCP work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
