Flask-MCP-Server is a lightweight, production-ready Model Context Protocol (MCP) server for Flask, with tool discovery, endpoint registration, async support, and full compliance with the latest MCP 2025-06-18 specification.
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"flask-mcp-server","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# flask-mcp-server Flask-based **Model Context Protocol (MCP)** server for Python. Drop it into any Flask app or run it standalone. Ships with security and ops features out of the box. **Spec target:** MCP **2025-06-18** — Streamable HTTP transport with a **unified `/mcp` endpoint** (POST for JSON-RPC; GET for SSE). Back-compat routes retained. **Package version:** `0.6.1` --- ## Table of Contents - [Requirements](#requirements) - [Install](#install) - [Quick Start](#quick-start) - [What’s new in 0.6.1](#whats-new-in-060) - [Configuration (env vars)](#configuration-env-vars) - [Core Concepts](#core-concepts) - [Examples](#examples) - [A. Unified MCP endpoint usage](#a-unified-mcp-endpoint-usage) - [B. Tools with roles & TTL cache](#b-tools-with-roles--ttl-cache) - [C. Resources & ResourceTemplates](#c-resources--resourcetemplates) - [D. Prompts & Completions](#d-prompts--completions) - [E. Batch Calls (compat)](#e-batch-calls-compat) - [F. SSE (hello + registry events)](#f-sse-hello--registry-events) - [G. Auth: API keys & HMAC](#g-auth-api-keys--hmac) - [H. Rate limiting](#h-rate-limiting) - [I. Service Providers](#i-service-providers) - [J. Discovery (auto-register)](#j-discovery-auto-register) - [K. CLI](#k-cli) - [L. OpenAPI & Swagger](#l-openapi--swagger) - [FAQ](#faq) - [Troubleshooting](#troubleshooting) - [License](#license) --- ## Requirements - **Python** 3.9+ - **Flask** 3.x (auto-installed) --- ## Install ### From PyPI ```bash pip install flask-mcp-server ``` Add to `requirements.txt` from a file path: ``` flask-mcp-server==0.6.1 ``` --- ## Quick Start **Integrated into an existing Flask app** (integrated HTTP): ```python from flask import Flask from flask_mcp_server import mount_mcp, Mcp from flask_mcp_server.http_integrated import mw_auth, mw_ratelimit, mw_cors app = Flask(__name__) @Mcp.tool(name="sum") def sum_(a: int, b: int) -> int: return a + b # Mount at /mcp with useful middlewares mount_mcp(app, url_p…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.