FastAPI-MCP
About
A zero-configuration tool to automatically expose FastAPI endpoints as MCP tools.
Explore
You are not limited to serving the MCP on the same FastAPI app from which it was created.
You can create an MCP server from one FastAPI app, and mount it to a different app:
from fastapi import FastAPI from fastapi_mcp import FastApiMCP # Your API app api_app = FastAPI() # ... define your API endpoints on api_app ... # A separate app for the MCP server mcp_app = FastAPI() # Create MCP server from the API app mcp = FastApiMCP( api_app, base_url="http://api-host:8001", # The URL where the API app will be running ) # Mount the MCP server to the separate app mcp.mount(mcp_app) # Now you can run both apps separately: # uvicorn main:api_app --host api-host --port 8001 # uvicorn main:mcp_app --host mcp-host --port 8000
Connecting to the MCP Server using](https://github.com/nguyendinhsinh361/fastapi-mcp/blob/HEAD/examples)mcp-proxy stdio
If your MCP client does not support SSE, for example Claude Desktop:
Installmcp-proxy, for example:uv tool install mcp-proxy.
Add in Claude Desktop MCP config file (claude_desktop_config.json):
{ "mcpServers": { "my-api-mcp-proxy": { "command": "mcp-proxy", "args": ["http://127.0.0.1:8000/mcp"] } } }
{ "mcpServers": { "my-api-mcp-proxy": { "command": "/Full/Path/To/Your/Executable/mcp-proxy", "args": ["http://127.0.0.1:8000/mcp"] } } }
Find the path to mcp-proxy by running in Terminal:which mcp-proxy.
- Claude Desktop will discover all available tools and resources automatically
Thank you for considering contributing to FastAPI-MCP! We encourage the community to post Issues and Pull Requests.
Before you get started, please see ourContribution Guide.
MIT License. Copyright (c) 2024 Tadata Inc.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
A server that dynamically creates MCP endpoints from any OpenAPI specification URL.
Turn any OpenAPI 3.0 spec into an MCP server with zero code — deploy to Cloudflare Workers, Node.js, Docker, or run locally via npx, with a built-in OAuth 2.1 server for MCP clients that require custom connector authentication.
An MCP server for any web application with an OpenAPI specification, connecting AI models to external tools and data services.
An MCP server that enables Large Language Models to make HTTP requests and interact with web APIs. It supports automatic tool generation from OpenAPI/Swagger specifications.
CLI tool that generates MCP servers from OpenAPI/Postman specs — pip install mcpgen-cli
A secure MCP-to-OpenAPI proxy server that converts MCP tools into OpenAPI compatible HTTP servers, with support for multiple server types and automatic API documentation.
Turn any OpenAPI/Swagger spec into Claude tools. Zero config, zero code.
Connect to any OpenAPI-based API with built-in OAuth2 authentication management.
Converts OpenAPI/Swagger specifications to Model Context Protocol (MCP) format, providing a modern Web UI and a backend service.
Converts OpenAPI specifications into MCP tools, enabling AI clients to interact with external APIs seamlessly.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



