aiohttp-tiny-mcp

Tests Latest release License Documentation

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

  1. Quickstart — run a server and call a tool.

  2. Tools, resources, and prompts — choose what to expose.

  3. How the server fits together — understand Exchange, SessionStore, and Hub before deploying more than one worker.

  4. 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.