flask-mcp-native
by nazil561
README.md
# flask-mcp-native
> Expose a Flask application as an MCP server with one line of code.
[](https://pypi.org/project/flask-mcp-native/)
[](https://pypi.org/project/flask-mcp-native/)
[](LICENSE)
[](https://github.com/nazil561/flask-mcp-native/actions/workflows/test.yml)
**Status:** `v0.1.0` — early release. Core is tested. See [Limitations](#limitations-v010) before production use.
---
## Why this exists
The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) lets AI agents call your application's functions as tools. FastAPI got its integration first — [`fastapi-mcp`](https://github.com/tadata-org/fastapi_mcp) has 11k+ stars. Flask did not.
| Feature | `fastapi-mcp` (FastAPI) | `flask-mcp-native` (Flask) |
| :--- | :--- | :--- |
| Route auto-discovery | ✅ | ✅ |
| Typed tool arguments | ✅ | ✅ (from URL converters) |
| stdio transport | ✅ | ✅ |
| HTTP/SSE transport | ✅ | 🔜 roadmap |
| Auth | ✅ | 🔜 roadmap |
| Framework | FastAPI (ASGI) | Flask (WSGI) |
The alternative was: migrate to FastAPI, or hand-write an MCP server duplicating every route. This is the third option — keep Flask, get MCP.
---
## Installation
```bash
pip install flask-mcp-native
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues