0.1.0
Warning
Yanked on PyPI — broken import on a bare install. import django_stateless_mcp raised ModuleNotFoundError: No module named 'structlog' unless the optional [structlog] extra happened to be installed. Use 0.1.1.
django-stateless-mcp 0.1.0
The first release: a stateless Model Context Protocol server for Django, built
on the 2026-07-28 spec.
uv add django-stateless-mcpFeatures
mcp_view(server)— serve anMCPServeras a stateless streamable-HTTP
Django view, under both WSGI and ASGI. Optional OAuth bearer authentication
via the SDK'sTokenVerifierprotocol, withrequired_scopes.mcp.pyautodiscovery — addingdjango_stateless_mcptoINSTALLED_APPS
imports each app'smcpmodule at startup, so apps register tools the way
they register admin models.request_state_security()— keys the SDK's elicitation-resume encryption
fromSECRET_KEY(andSECRET_KEY_FALLBACKS), so elicitation survives a
multi-worker deployment instead of failing when a retry lands on another
worker.django_request(ctx)— reach the authenticated Django request and ORM
from inside a tool, with no request-spanning global state.StructlogRequestLogger— optional flow-logging middleware
(django-stateless-mcp[structlog]), one structured event per request.
Supported versions
- Python 3.12, 3.13, 3.14
- Django 5.2 LTS and 6.0
mcp2.0.x
Verified against the spec
The official MCP conformance suite (modelcontextprotocol/conformance) runs in
CI against a live server; the full stateless-elicitation scenario set passes.
Contributors
@BenA-SA (Ben Atkinson) created django-stateless-mcp.