Django admin models over MCP: CRUD, actions, history, autocomplete β capped by Django permissions.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Expose Django admin models to MCP (Model Context Protocol) clients via HTTP. Add a mixin to your ModelAdmin classes and get instant access to CRUD operations, admin actions, model history, and more.
mcp_fields and mcp_exclude_fieldsmodels:// and data:// URIsAdd to your Django project:
Run migrations to create the token model:
Add the mixin to any ModelAdmin. Set mcp_expose = True to expose direct tools:
Use mcp_exclude_fields to prevent sensitive data exposure:
Go to Django admin at /admin/django_admin_mcp/mcptoken/ and create a token. Grant the token exactly the permissions the agent needs via its Permissions and Groups fields β tokens start with no access. The linked user caps the token (it can never exceed that user's permissions) and is the audit identity actions are logged under.
Add to your MCP client settings (e.g. a project .mcp.json for Claude Code):
Once configured, the agent can use the tools directly:
For each exposed model (e.g., Article), the following tools are generated:
| Tool | Description |
|---|---|
list_article | List all articles with pagination (limit, offset) and filtering |
get_article | Get a single article by id |
create_article | Create a new article with field values |
update_article | Update an existing article by id |
delete_article | Delete an article by id |
| Tool | Description |
|---|---|
find_models | Discover all exposed models and their available tools |
describe_article | Get field definitions, types, and constraints |
| Tool | Description |
|---|---|
actions_article | List available admin actions for the model |
action_article | Execute an admin action on selected records |
bulk_article | Bulk create, update, or delete multiple records |
| Tool | Description |
|---|---|
related_article | Get related objects via foreign keys |
history_article | View Django admin change history |
autocomplete_article | Search suggestions for autocomplete fields |
For custom integrations, the MCP endpoint accepts JSON-RPC 2.0 POST requests:
Supported methods: initialize, notifications/initialized, tools/list, tools/call, prompts/list, prompts/get, resources/list, resources/templates/list, and resources/read. A GET /mcp/health/ endpoint is available for health checks.
When an admin action returns a Django HttpResponse / StreamingHttpResponse (typical for CSV/TSV/PDF downloads), action_<model> serializes the body instead of str(response):
Text-ish content types (text/*, application/json, β¦) decode using the Content-Type charset (or response.charset, default UTF-8) and return "encoding": "utf-8" with Unicode text in content. If that decode fails (unknown charset or invalid bytes), the payload falls back to "encoding": "base64" like binary downloads. Binary payloads use "encoding": "base64" with ASCII base64 in content.
Large downloads are rejected once the body exceeds MCP_ACTION_MAX_FILE_BYTES (default 5 MiB) to protect MCP transports.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/django-admin-mcp)<a href="https://allmcps.com/mcp/django-admin-mcp"><img src="https://allmcps.com/api/badge/django-admin-mcp?style=directory" alt="Django Admin MCP on AllMCPs" /></a>