Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"aiohttp-mcp": {
"args": [
"aiohttp-mcp"
],
"command": "uvx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Tools for building Model Context Protocol (MCP) servers on top of aiohttp.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
uvx 'aiohttp-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked aiohttp-mcp against OSV.dev.
Click any tool to inspect its schema.
get_configService configuration exposed as a resource.
config://{service}
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools
Read, write, and manage files on the local filesystem
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Manage Supabase projects — databases, auth, storage, and edge functions
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
MCP Security Weekly
Get CVE alerts and security updates for Aiohttp Mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Tools for building Model Context Protocol (MCP) servers on top of aiohttp.
Implements the MCP protocol natively — no heavy SDK dependencies. Only 3 runtime dependencies: aiohttp, aiohttp-sse, pydantic.
ctx.app and per-request data via ctx.requestWith uv package manager:
uv add aiohttp-mcp
Or with pip:
pip install aiohttp-mcp
Create a simple MCP server with a custom tool:
import datetime
from zoneinfo import ZoneInfo
from aiohttp import web
from aiohttp_mcp import AiohttpMCP, build_mcp_app
# Initialize MCP
mcp = AiohttpMCP()
# Define a tool
@mcp.tool()
def get_time(timezone: str) -> str:
"""Get the current time in the specified timezone."""
tz = ZoneInfo(timezone)
return datetime.datetime.now(tz).isoformat()
# Create and run the application
app = build_mcp_app(mcp, path="/mcp")
web.run_app(app)
You can also use aiohttp-mcp as a sub-application in your existing aiohttp server:
import datetime
from zoneinfo import ZoneInfo
from aiohttp import web
from aiohttp_mcp import AiohttpMCP, setup_mcp_subapp
mcp = AiohttpMCP()
# Define a tool
@mcp.tool()
def get_time(timezone: str) -> str:
"""Get the current time in the specified timezone."""
tz = ZoneInfo(timezone)
return datetime.datetime.now(tz).isoformat()
# Create your main application
app = web.Application()
# Add MCP as a sub-application
setup_mcp_subapp(app, mcp, prefix="/mcp")
web.run_app(app)
By default, the server runs in stateless mode — each request creates a fresh transport, making it safe for load-balanced and multi-instance deployments. Tool notifications (ctx.info()) work inline via SSE POST responses.
For single-instance deployments that need server-initiated push (via GET SSE stream) or SSE resumability, enable stateful mode. Session state and events are stored in-process memory — this is not suitable for multi-instance deployments without sticky sessions.
from aiohttp_mcp import AiohttpMCP, InMemoryEventStore, build_mcp_app
# Stateful with resumability (single instance only)
# If client disconnects, it can reconnect with Last-Event-ID to replay missed events
mcp = AiohttpMCP(event_store=InMemoryEventStore())
app = build_mcp_app(mcp, path="/mcp", stateless=False)
Note:
InMemoryEventStoreis in-process only. For multi-instance stateful deployments, implement