skillfed

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

django-mcp-server v0.5.7 204.3K downloads/30d#9,611 on PyPI
Permissive license MIT AGING released

What it is and what it does

Django MCP Server bridges Django applications and AI agents by implementing the Model Context Protocol standard. It lets you expose Django models and custom business logic as callable tools that Claude AI, Google Agent Development Kit, and other MCP-compatible clients can discover and invoke. You define tool sets by subclassing provided base classes for model queries or custom methods, then register them in a configuration file. The package automatically generates MCP schemas, handles authentication, and serves the protocol endpoint without requiring infrastructure changes—it works on both WSGI and ASGI Django deployments.

The package also bridges Django Rest Framework APIs directly into MCP tools via decorators, so existing DRF views become AI-callable operations. You can test tools locally with a management command, integrate with Claude Desktop for local development, or connect to Claude AI via HTTP with OAuth2 authentication. It has no known vulnerabilities and depends on mcp, django, djangorestframework, inflection, and uritemplate.

Use it for:

  • Enable Claude AI or other AI agents to query your Django models and retrieve data without direct database access.
  • Expose custom Django business logic (e.g., email sending, calculations) as MCP tools for AI agents to call.
  • Convert existing Django Rest Framework CRUD views into AI-callable operations with a single decorator.
  • Build local AI assistant workflows in Claude Desktop that interact with a development Django app.
  • Integrate Google Agent Development Kit or other MCP clients with a Django backend for autonomous agent tasks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Exposes Django models and custom logic as Model Context Protocol (MCP) tools, allowing AI agents and MCP clients to query and interact with Django applications through a standardized interface.

Yes, if you are building AI agent integrations with Django. The package is permissively licensed, has low install friction, and directly solves the problem of exposing Django logic to MCP clients. The aging maintenance status (308 days since last release) is a minor concern for a stable, narrowly-scoped tool, but verify that OAuth2 setup matches your production security model before deploying.

Install

django-mcp-server on PyPI

pip

pip install django-mcp-server

uv

uv add django-mcp-server

poetry

poetry add django-mcp-server

Installing django-mcp-server

Before you install

Low install friction with a pure-Python wheel distribution. Maintenance status is aging—last release was 308 days ago—so expect slower response to issues, though actively maintained.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install django-mcp-server

# Add to INSTALLED_APPS in settings.py
INSTALLED_APPS = [
    'django-mcp-server',
]

# Add to urls.py
from django.urls import path, include
urlpatterns = [
    path('', include('mcp_server.urls')),
]

# Create tool definitions, then verify with management command

Requires Python >=3.10 and Django 4 or 5. For Claude AI integration, OAuth2 setup is needed.

Verify before relying

  • Whether OAuth2 setup is mandatory for production Claude AI integration or optional for other MCP clients.
  • Performance characteristics and scalability limits when exposing large Django model querysets or complex APIs.
  • Compatibility with Django versions prior to 4 or Python versions below 3.10.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — mcp, django, djangorestframework, inflection, uritemplate
Maintenance aging — 308 days since the last release
First released
Downloads 204,326/month — #9,611 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_mcp_server-0.5.7-py3-none-any.whl

Keywords: django, mcp, model context protocol, tools

Framework :: DjangoFramework :: Django :: 4Framework :: Django :: 5License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3

Tags

django model context protocolmcp server djangoai agent django integrationexpose django models to aidjango rest framework mcp toolsclaude ai django integrationmcp tools from django models
ai-integrationprotocol-bridgedjango-extension

More Application Frameworks packages