fastapi-mcp-server
Allows Claude to interact with any FastAPI application by automatically generating MCP tools from its OpenAPI specification, enabling natural language calls to all endpoints.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@fastapi-mcp-serverShow me all tasks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
fastapi-mcp-server ⚡
Turn any FastAPI app into a Claude-compatible MCP server instantly by reading its OpenAPI spec
What it does
Point this tool at any running FastAPI app and it will:
Fetch the OpenAPI spec automatically from
/openapi.jsonParse every endpoint — paths, methods, parameters, request bodies
Dynamically register one MCP tool per endpoint
Claude can now call any endpoint using natural language
Zero manual tool writing. Zero code changes to your existing FastAPI app.
Related MCP server: mcpify
Demo
User: "Create a task titled Push code to GitHub with high priority"
Claude: [calls post_tasks tool]
→ Task created successfully ✅
User: "Mark task 2 as completed"
Claude: [calls put_tasks_task_id tool]
→ Task updated ✅
User: "Show me all tasks"
Claude: [calls get_tasks tool]
→ Returns all tasks ✅Architecture
Your FastAPI App (running)
↓
fastapi-mcp-server fetches /openapi.json
↓
OpenAPIParser extracts all endpoints
↓
One MCP tool registered per endpoint
↓
Claude calls tools using natural language
↓
MCP server makes real HTTP requests to your API
↓
Results returned to ClaudeTech Stack
Python 3.12
FastAPI + Pydantic
MCP (Model Context Protocol)
httpx
OpenAPI 3.x
Setup
1. Clone and install
git clone https://github.com/vkmech999/fastapi-mcp-server.git
cd fastapi-mcp-server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt2. Configure environment
cp .env.example .env
# Set TARGET_API_URL to your FastAPI app
# Set AUTH_TYPE if your API requires authentication3. Connect to Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"fastapi-mcp-server": {
"command": "/path/to/venv/bin/python3",
"args": ["-m", "mcp_server.server"],
"env": {
"TARGET_API_URL": "http://localhost:8000",
"AUTH_TYPE": "none",
"PYTHONPATH": "/path/to/fastapi-mcp-server"
}
}
}
}4. Use it in Claude Desktop
"List all available endpoints"
"Get all tasks"
"Create a new user named John with email john@example.com"
"Delete task with ID 3"Authentication Support
Auth Type | Use Case | Config |
| Public APIs |
|
| JWT / OAuth2 |
|
| Third-party APIs |
|
| Legacy systems |
|
MCP Tools
Tool | Description |
| Discover all registered endpoint tools |
| Auto-generated GET endpoint tools |
| Auto-generated POST endpoint tools |
| Auto-generated PUT endpoint tools |
| Auto-generated DELETE endpoint tools |
Running Tests
pytest tests/test_server.py -vAuthor
Vivek Kumar — Senior Python Full Stack Developer
LinkedIn · GitHub
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceAutomatically converts any OpenAPI specification or Postman Collection into an MCP server, enabling AI assistants like Claude to directly interact with REST APIs without writing any code.Last updatedApache 2.0
- Alicense-qualityBmaintenanceTurns any OpenAPI specification into a fully working MCP server with a single command, enabling AI agents to call APIs without writing any glue code.Last updated27MIT
- Alicense-qualityCmaintenanceTurn any OpenAPI spec into a working MCP server — point it at a spec and Claude instantly gets a tool for every endpoint.Last updatedMIT
- Alicense-qualityDmaintenanceConverts any OpenAPI/Swagger spec into an MCP server, exposing REST API endpoints as tools for Claude.Last updatedMIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
MCP server giving Claude AI access to 22+ NYC public-record databases for real estate due diligence
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vkmech999/fastapi-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server