$ timeahead.in
/ servers/pypi/django-mcp-server
pypi

django-mcp-server

Django MCP Server is a Django extensions to easily enable AI Agents to interact with Django Apps through the Model Context Protocol it works equally well on WSGI and ASGI

342 stars30k/wkupdated 87d agogithub ↗
90good
▣ Overview
PyPI versionPublished on Django PackagesDjango versionsLicensePython versions

What it does

Django MCP Server is a Django extension that exposes your application's models and custom methods as Model Context Protocol tools, allowing AI agents and MCP clients to interact with your Django application. It serves an HTTP MCP endpoint implementing the streamable HTTP protocol, supporting both WSGI and ASGI without infrastructure changes. Define tool access declaratively: subclass ModelQueryToolset to expose a Django model with optional queryset filtering, or subclass MCPToolset to publish custom Python methods as callable tools. The extension handles serialization, parameter validation, and tool discovery.

Who it's for

Django developers building applications that need to integrate with AI agents—backend engineers wiring Claude or other MCP clients into existing Django services, teams adding AI features to Django REST applications, developers who want to expose domain-specific models or business logic to agents without building additional REST layers.

Common use cases

  • Expose Django ORM models to Claude with automatic queryset-level filtering (no REST API needed).
  • Convert Django REST Framework endpoints to MCP tools via a single decorator.
  • Allow AI agents to call custom Django methods—sending notifications, generating reports, updating records—from within agent workflows.
  • Build multi-step agent routines that query your database and trigger server-side tasks.

Setup pitfalls

  • OAuth2 is mandatory for Claude AI. As of June 2025, Claude AI requires OAuth2 authentication to connect. Install Django OAuth Toolkit and configure DJANGO_MCP_AUTHENTICATION_CLASSES; Dynamic Client Registration is only partially supported (a third-party add-on fills the gap).
  • OAuth2 URLs must be at standard locations. Keep /register, /token, and /authorize at their defaults unless you fully implement the OAuth metadata RFC—custom paths will break discovery.
  • Requires INSTALLED_APPS and URL configuration. Both mcp_server in INSTALLED_APPS and the URL include in urls.py are mandatory; endpoint defaults to /mcp.
  • No continuous integration. There is no CI pipeline—test thoroughly before deploying to production, especially when upgrading Django or the MCP server itself.
▣ Score BreakdownMCPScore = Σ(raw × weight)
DimensionRawWeighted
Security
35%
100
35.0
Freshness
25%
100
25.0
Adoption
20%
79
15.8
Quality
10%
90
9.0
Trust
10%
50
5.0
Total
89.8
⚿ Capabilities & Risk Explainer
networksecrets
◆ Risk level: medium
network + secrets — requires access to credentials or environment secrets.
⚙ Install config
Claude Desktop · Cursor · Windsurf · VS Code (Copilot) · Claude Code
add to your MCP client config:
{
  "mcpServers": {
    "django": {
      "command": "uvx",
      "args": [
        "django-mcp-server"
      ]
    }
  }
}
📈 Score historylast 27 snapshots
5/10/20266/6/2026 · 27 snapshots
⚙ Maintenance health
27/ 100 · is this project alive?
contributors (1y)7
top contributor share47%
releases (1y)0
ci✗ none
⛁ Raw data
weekly downloads30k
github stars342
forks52
open issues15
license✓ present
readme length17100 chars
last publish0d ago
last commit87d ago
last updated7h ago
install verified✓ pass · 20d ago
owner of this server? claim your listing to get a verified badgeclaim →
🔔 Score drop alerts
get notified by email when this server's score drops 5+ points