Aiohttp MCP Server

Tools for building Model Context Protocol (MCP) servers on top of aiohttp

Local serverstdioPython

What is the Aiohttp MCP server?

Aiohttp MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Tools for building Model Context Protocol (MCP) servers on top of aiohttp.

What you get

Implements the MCP protocol natively — no heavy SDK dependencies. Only 3 runtime dependencies: aiohttp, aiohttp-sse, pydantic.

  • Native MCP protocol implementation (supports specs 2025-11-25, 2025-06-18, 2025-03-26)
  • Streamable HTTP transport with SSE streaming
  • Easy integration with aiohttp web applications
  • Tool, Resource, and Prompt support with decorator-based registration
  • Shared state via ctx.app and per-request data via ctx.request
  • Stateless by default, with optional stateful mode for server push and resumability

What the assistant can call

Once Aiohttp is connected, these are the calls the assistant has available:

  • Async — first design with full type hints
  • ctx.request — aiohttp Request (headers, cookies, client IP)
  • ctx.app — aiohttp Application for shared state (ctx.app["db_pool"])
  • ctx.request_id — JSON-RPC request ID
  • aiohttp — sse >= 2.2.0, < 3.0.0

Setting it up

aiohttp-mcp on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration and credentials

  • Python 3.11 or higher - aiohttp >= 3.9.0, < 4.0.0 - aiohttp-sse >= 2.2.0, < 3.0.0 - pydantic >= 2.0.0, < 3.0.0

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Aiohttp's toolset — Async, ctx.request, ctx.app and 2 more — is a fair guide to whether it matches your workflow.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the aiohttp mcp server does with a few real requests.

Available tools

ToolWhat it does
Asyncfirst design with full type hints
ctx.requestaiohttp Request (headers, cookies, client IP)
ctx.appaiohttp Application for shared state (ctx.app["db_pool"])
ctx.request_idJSON-RPC request ID
aiohttpsse >= 2.2.0, < 3.0.0

How to install the Aiohttp MCP server

{
  "mcpServers": {
    "aiohttp": {
      "command": "uvx",
      "args": ["aiohttp-mcp"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

  • Python 3.11 or higher - aiohttp >= 3.9.0, < 4.0.0 - aiohttp-sse >= 2.2.0, < 3.0.0 - pydantic >= 2.0.0, < 3.0.0

Example prompts to try

  • Use Aiohttp to Async.
  • Use Aiohttp to ctx.request.
  • Use Aiohttp to ctx.app.

Frequently asked questions

It connects Aiohttp to MCP-compatible AI assistants such as Claude and Cursor, exposing 5 tools (Async, ctx.request, ctx.app, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Aiohttp directly.