aiohttp-tiny-mcp¶
Documentation · Repository · Issues · Releases
aiohttp-tiny-mcp turns an aiohttp service into a remote MCP server. Declare
Python handlers as tools, resources, or prompts; the library exposes them over
Streamable HTTP or stdio.
It is designed for services behind a load balancer. A later request from one MCP client may reach another process, so sessions and events live in backends shared by all workers. For one process, the included memory backends are used automatically.
Start here¶
Quickstart — run a server and call a tool.
Tools, resources, and prompts — choose what to expose.
How the server fits together — understand
Exchange,SessionStore, andHubbefore deploying more than one worker.Authentication — protect a standalone endpoint or mount it in an aiohttp application that already verifies JWTs.
The library supports 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25,
and 2026-07-28 from one set of handlers. Use the
compatibility table for protocol differences.
Already use the official Python SDK? Read how it compares before choosing a framework. For local benchmark methodology and results, see What it costs.
Getting started
Writing handlers
Calling and running a server