# FastAPI MCP server

> Turns your FastAPI endpoints into MCP tools, preserving request/response schemas and using your existing FastAPI auth dependencies.

- Repository: https://github.com/tadata-org/fastapi_mcp
- Page: https://hostedmcp.org/servers/tadata-org/fastapi-mcp
- Transport: —
- Stars: 12030
- License: MIT

## FAQ

### How do I add an MCP server to my FastAPI app?

Create FastApiMCP with your app instance and call mount(); the MCP server is then served at /mcp on your app's base URL.

### Does FastAPI-MCP support authentication?

Yes, authentication is built in and reuses your existing FastAPI dependencies such as Depends() for auth and authorization.

### Does it preserve my endpoint documentation and schemas?

Yes, it preserves request and response model schemas and keeps endpoint documentation as it appears in Swagger.

### What Python version does FastAPI-MCP require?

It requires Python 3.10 or newer, with 3.12 recommended.

### Can the MCP server be deployed separately from the FastAPI app?

Yes, you can mount the MCP server on the same app or deploy it separately.
