Metadata-Version: 2.5
Name: flask-mcp-native
Version: 0.1.0
Summary: Expose Flask routes as MCP tools with one line.
Project-URL: Homepage, https://github.com/nazil561/flask-mcp-native
Project-URL: Repository, https://github.com/nazil561/flask-mcp-native
Project-URL: Issues, https://github.com/nazil561/flask-mcp-native/issues
Author: nazil561
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agents,ai,fastmcp,flask,mcp,model-context-protocol
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Flask
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: flask>=3.0
Requires-Dist: mcp<2.0,>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# flask-mcp-native

> Expose a Flask application as an MCP server with one line of code.

[![PyPI version](https://img.shields.io/pypi/v/flask-mcp-native.svg)](https://pypi.org/project/flask-mcp-native/)
[![Python versions](https://img.shields.io/pypi/pyversions/flask-mcp-native.svg)](https://pypi.org/project/flask-mcp-native/)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
[![tests](https://github.com/nazil561/flask-mcp-native/actions/workflows/test.yml/badge.svg)](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
