MCP Django Unfold
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
๐ฎ MCP Django Unfold
A Model Context Protocol (MCP) server that gives AI agents complete, accurate knowledge of the Django Unfold admin theme โ so they can implement it without hallucination.
Built with the MCP Python SDK (FastMCP), this server exposes 25 documentation tools covering every feature, configuration option, and third-party integration of Django Unfold. Compatible with Claude Desktop, VS Code GitHub Copilot, Cursor, and any MCP-compatible client.
๐ Table of Contents
Related MCP server: Snippy
๐ก Why This Exists
AI coding agents (Claude, Copilot, Cursor) frequently hallucinate when generating Django Unfold code โ inventing non-existent settings, using wrong import paths, or missing critical ordering requirements in INSTALLED_APPS. This MCP server solves that by providing:
Verified documentation โ every code example is sourced directly from the official Django Unfold docs
Complete coverage โ 24 documentation sections spanning installation to advanced integrations
Instant access โ AI agents call tools and get authoritative answers in milliseconds
Search โ full-text search across all documentation sections
๐๏ธ Architecture
System Overview
%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#6366f1', 'primaryTextColor': '#ffffff', 'primaryBorderColor': '#818cf8', 'lineColor': '#a5b4fc', 'secondaryColor': '#1e1b4b', 'tertiaryColor': '#312e81', 'background': '#0f0d1a', 'mainBkg': '#1e1b4b', 'nodeBorder': '#818cf8', 'clusterBkg': '#1a1744', 'clusterBorder': '#4f46e5', 'titleColor': '#ffffff', 'edgeLabelBackground': '#1e1b4b', 'textColor': '#e0e7ff', 'noteTextColor': '#ffffff', 'noteBkgColor': '#312e81'}}}%%
flowchart TB
subgraph clients["๐ฅ๏ธ MCP Clients"]
direction LR
claude["Claude Desktop"]
vscode["VS Code Copilot"]
cursor["Cursor / Other IDE"]
custom["Custom MCP Client"]
end
subgraph transport["๐ก Transport Layer"]
stdio["stdio (stdin/stdout)"]
end
subgraph server["โ๏ธ MCP Server โ mcp-django-unfold"]
direction TB
fastmcp["FastMCP Runtime\n(mcp Python SDK)"]
subgraph tools["๐ง 25 Documentation Tools"]
direction LR
core["Core Tools\nโโโโโโโโโ\nunfold_get_started\nunfold_configuration\nunfold_actions\nunfold_filters\nunfold_decorators"]
ui["UI Tools\nโโโโโโโโโ\nunfold_components\nunfold_inlines\nunfold_widgets\nunfold_tabs\nunfold_dashboard"]
adv["Advanced Tools\nโโโโโโโโโ\nunfold_pages\nunfold_styles_scripts\nunfold_features_overview\nunfold_complete_example\nunfold_search_docs"]
integ["Integration Tools\nโโโโโโโโโ\nimport_export\nguardian\nsimple_history\ncelery_beat\nmodeltranslation\nmoney ยท constance\nlocation ยท djangoql\njson_widget"]
end
subgraph docs["๐ Documentation Store"]
docsmod["docs.py\nโโโโโโโโโ\nDOCS dict\n24 sections\nFull code examples"]
end
end
clients -->|"JSON-RPC over stdio"| transport
transport --> fastmcp
fastmcp --> tools
tools --> docs
style clients fill:#1e1b4b,stroke:#6366f1,stroke-width:2px,color:#e0e7ff
style transport fill:#312e81,stroke:#818cf8,stroke-width:2px,color:#e0e7ff
style server fill:#0f172a,stroke:#6366f1,stroke-width:2px,color:#e0e7ff
style tools fill:#1a1744,stroke:#4f46e5,stroke-width:1px,color:#e0e7ff
style docs fill:#1a1744,stroke:#4f46e5,stroke-width:1px,color:#e0e7ff
style claude fill:#312e81,stroke:#818cf8,color:#ffffff
style vscode fill:#312e81,stroke:#818cf8,color:#ffffff
style cursor fill:#312e81,stroke:#818cf8,color:#ffffff
style custom fill:#312e81,stroke:#818cf8,color:#ffffff
style stdio fill:#312e81,stroke:#818cf8,color:#ffffff
style fastmcp fill:#4f46e5,stroke:#818cf8,color:#ffffff
style core fill:#312e81,stroke:#6366f1,color:#e0e7ff
style ui fill:#312e81,stroke:#6366f1,color:#e0e7ff
style adv fill:#312e81,stroke:#6366f1,color:#e0e7ff
style integ fill:#312e81,stroke:#6366f1,color:#e0e7ff
style docsmod fill:#312e81,stroke:#6366f1,color:#e0e7ffRequest Flow
%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#6366f1', 'primaryTextColor': '#ffffff', 'primaryBorderColor': '#818cf8', 'lineColor': '#a5b4fc', 'secondaryColor': '#1e1b4b', 'tertiaryColor': '#312e81', 'background': '#0f0d1a', 'mainBkg': '#1e1b4b', 'nodeBorder': '#818cf8', 'clusterBkg': '#1a1744', 'clusterBorder': '#4f46e5', 'titleColor': '#ffffff', 'edgeLabelBackground': '#1e1b4b', 'textColor': '#e0e7ff'}}}%%
sequenceDiagram
participant C as ๐ฅ๏ธ AI Client
participant T as ๐ก stdio Transport
participant S as โ๏ธ FastMCP Server
participant TM as ๐ง Tool Manager
participant D as ๐ Docs Store
Note over C,D: Tool Discovery Phase
C->>T: initialize request
T->>S: JSON-RPC handshake
S-->>T: server capabilities (25 tools)
T-->>C: tool list + descriptions
Note over C,D: Tool Invocation Phase
C->>T: tools/call: unfold_configuration
T->>S: dispatch to handler
S->>TM: lookup "unfold_configuration"
TM->>D: DOCS["configuration"]
D-->>TM: full markdown content
TM-->>S: documentation string
S-->>T: tool result (content)
T-->>C: configuration docs
Note over C,D: Search Phase
C->>T: tools/call: unfold_search_docs("sidebar")
T->>S: dispatch to handler
S->>TM: lookup "unfold_search_docs"
TM->>D: scan ALL_SECTIONS for "sidebar"
D-->>TM: matching sections
TM-->>S: aggregated results
S-->>T: tool result (matches)
T-->>C: search results๐ Project Structure
%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#6366f1', 'primaryTextColor': '#ffffff', 'primaryBorderColor': '#818cf8', 'lineColor': '#a5b4fc', 'secondaryColor': '#1e1b4b', 'tertiaryColor': '#312e81', 'background': '#0f0d1a', 'mainBkg': '#1e1b4b', 'nodeBorder': '#818cf8', 'clusterBkg': '#1a1744', 'clusterBorder': '#4f46e5', 'titleColor': '#ffffff', 'edgeLabelBackground': '#1e1b4b', 'textColor': '#e0e7ff'}}}%%
graph TB
subgraph root["๐ฆ mcp-django-unfold/"]
pyproject["pyproject.toml\nโโโโโโโโโ\nname ยท version\ndependencies\nentry point\nhatch build"]
dockerfile["Dockerfile\nโโโโโโโโโ\npython:3.12-slim\npip install\nENTRYPOINT"]
readme["README.md"]
lock["uv.lock"]
subgraph src["src/mcp_django_unfold/"]
init["__init__.py\nโโโโโโโโโ\n__version__"]
server_py["server.py\nโโโโโโโโโ\nFastMCP init\n25 @mcp.tool()\nmain() entry"]
docs_py["docs.py\nโโโโโโโโโ\nDOCS dict\n24 doc sections\nALL_SECTIONS list"]
end
end
pyproject -->|"entry point"| server_py
server_py -->|"imports"| docs_py
server_py -->|"imports"| init
dockerfile -->|"pip install ."| pyproject
style root fill:#0f172a,stroke:#6366f1,stroke-width:2px,color:#e0e7ff
style src fill:#1a1744,stroke:#4f46e5,stroke-width:2px,color:#e0e7ff
style pyproject fill:#312e81,stroke:#818cf8,color:#ffffff
style dockerfile fill:#312e81,stroke:#818cf8,color:#ffffff
style readme fill:#312e81,stroke:#818cf8,color:#ffffff
style lock fill:#312e81,stroke:#818cf8,color:#ffffff
style init fill:#4f46e5,stroke:#818cf8,color:#ffffff
style server_py fill:#4f46e5,stroke:#a78bfa,stroke-width:2px,color:#ffffff
style docs_py fill:#4f46e5,stroke:#a78bfa,stroke-width:2px,color:#ffffffmcp-django-unfold/
โโโ pyproject.toml # Package metadata, dependencies, build config
โโโ Dockerfile # Container image for production
โโโ .dockerignore # Docker build exclusions
โโโ .gitignore # Git exclusions
โโโ README.md # This file
โโโ LICENSE # MIT license
โโโ uv.lock # Dependency lock file
โโโ src/
โโโ mcp_django_unfold/
โโโ __init__.py # Package init + version
โโโ server.py # FastMCP server + 25 tool definitions
โโโ docs.py # Complete documentation content (24 sections)File | Purpose |
| FastMCP server initialization, all 25 |
|
|
| Package name, version, Python โฅ3.11, |
| Production-ready container using |
๐ Quick Start
Option 1: uvx (recommended โ zero install)
uvx mcp-django-unfoldOption 2: pip install
pip install mcp-django-unfold
mcp-django-unfoldOption 3: Docker
docker build -t mcp-django-unfold .
docker run -i --rm mcp-django-unfoldโ๏ธ Client Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"django-unfold": {
"command": "uvx",
"args": ["mcp-django-unfold"]
}
}
}VS Code (GitHub Copilot)
Add to your project's .vscode/mcp.json:
{
"servers": {
"django-unfold": {
"command": "uvx",
"args": ["mcp-django-unfold"]
}
}
}Cursor
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"django-unfold": {
"command": "uvx",
"args": ["mcp-django-unfold"]
}
}
}Docker-based Configuration
For any client that supports Docker:
{
"mcpServers": {
"django-unfold": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp-django-unfold"]
}
}
}๐ง Available Tools
Core Documentation
Tool | Description |
| Installation, INSTALLED_APPS ordering, ModelAdmin setup |
| Complete |
| Global, row, detail & submit line actions with icons/variants |
| Dropdown, numeric, date, text, autocomplete filters |
|
|
UI & Layout
Tool | Description |
| Dashboard components โ card, chart, button, table, progress... |
| Stacked, tabular, nonrelated & sortable inlines |
| Form widgets โ ArrayWidget, switches, WYSIWYG, all input types |
| Changelist tab navigation |
| Custom dashboard with DASHBOARD_CALLBACK |
| Custom admin pages with class-based views |
| Custom CSS/JS, Tailwind 3.x & 4.x setup |
Third-party Integrations
Tool | Description |
| django-import-export forms and admin setup |
| django-guardian object-level permissions |
| django-simple-history model tracking |
| django-celery-beat task scheduling admin |
| django-modeltranslation with language flags |
| django-money (auto-styled) |
| django-constance dynamic settings |
| django-location-field map widget |
| djangoql advanced search (auto-styled) |
| django-json-widget (auto-styled) |
Meta
Tool | Description |
| Complete feature list and technology stack |
| Full working project โ settings, models, admin, templates |
| Full-text search across all 24 documentation sections |
๐งฑ How It Was Built
Technology Stack
Layer | Technology | Purpose |
Protocol | Standardized AI โ tool communication | |
SDK | mcp Python SDK (FastMCP) | Server framework with |
Transport | stdio (stdin/stdout) | Local process communication โ fast, no network overhead |
Build | Modern Python build backend | |
Runtime | Python โฅ 3.11 | Type hints, modern syntax |
Package | uvx / pip | Zero-install execution via uvx |
Container | Docker ( | Production-ready deployment |
Design Decisions
Embedded documentation โ All docs are stored as Python strings in
docs.pyrather than fetched at runtime. This ensures zero latency, offline operation, and version-locked accuracy.One tool per topic โ Each documentation section gets its own MCP tool with a descriptive docstring. AI agents can discover and call exactly the tool they need.
Full-text search โ The
unfold_search_docstool scans all sections by keyword, so agents can find relevant docs even when they don't know the exact tool name.stdio transport โ Chosen for local-first usage. The server starts as a child process of the AI client โ no ports, no network config, no auth needed.
src layout โ Standard Python packaging layout (
src/mcp_django_unfold/) with hatchling build for clean wheel generation and PyPI publishing.
๐ ๏ธ Development Guide
Prerequisites
Python 3.11+
uv (recommended) or pip
Setup
# Clone the repository
git clone https://github.com/rissets/mcp-django-unfold.git
cd mcp-django-unfold
# Install dependencies in a virtual environment
uv syncRun Locally
# Run the server directly
uv run mcp-django-unfoldTest with MCP Inspector
The MCP Inspector lets you interactively browse and call tools:
npx @modelcontextprotocol/inspector uv run mcp-django-unfoldThis opens a web UI where you can:
See all 25 registered tools
Read each tool's description and parameters
Execute tools and inspect the returned documentation
Verify the Server
# Quick smoke test โ check tools load
uv run python -c "
from mcp_django_unfold.server import mcp
print(f'Server: {mcp.name}')
print(f'Tools: {len(mcp._tool_manager._tools)}')
"
# Expected output:
# Server: django_unfold_mcp
# Tools: 25Adding Documentation
Add a new section to the
DOCSdictionary insrc/mcp_django_unfold/docs.pyCreate a corresponding
@mcp.tool()function insrc/mcp_django_unfold/server.pyThe search tool (
unfold_search_docs) will automatically index the new section
Code Style
# Format
uv run ruff format src/
# Lint
uv run ruff check src/๐ข Production Deployment
Publish to PyPI
# Build the package
uv build
# This creates dist/mcp_django_unfold-0.1.0.tar.gz and .whl
# Upload to PyPI
uv publish
# Or with twine:
# twine upload dist/*Once published, anyone can run it instantly:
uvx mcp-django-unfoldDocker
# Build
docker build -t mcp-django-unfold .
# Run (interactive mode required for stdio)
docker run -i --rm mcp-django-unfold
# Tag and push to a registry
docker tag mcp-django-unfold ghcr.io/rissets/mcp-django-unfold:latest
docker push ghcr.io/rissets/mcp-django-unfold:latestVersion Bump Workflow
Update
versioninpyproject.tomlUpdate
__version__insrc/mcp_django_unfold/__init__.pyCommit, tag, and push:
git add -A
git commit -m "release: v0.2.0"
git tag v0.2.0
git push origin main --tagsBuild and publish:
uv build && uv publish๐ Dev โ Prod Pipeline
%%{init: {'theme': 'dark', 'themeVariables': {'primaryColor': '#6366f1', 'primaryTextColor': '#ffffff', 'primaryBorderColor': '#818cf8', 'lineColor': '#a5b4fc', 'secondaryColor': '#1e1b4b', 'tertiaryColor': '#312e81', 'background': '#0f0d1a', 'mainBkg': '#1e1b4b', 'nodeBorder': '#818cf8', 'clusterBkg': '#1a1744', 'clusterBorder': '#4f46e5', 'titleColor': '#ffffff', 'edgeLabelBackground': '#1e1b4b', 'textColor': '#e0e7ff'}}}%%
graph LR
subgraph dev["๐ ๏ธ Development"]
code["Write Code"]
test["Test with\nMCP Inspector"]
local["Run Local\nuv run mcp-django-unfold"]
end
subgraph build["๐ฆ Build & Publish"]
hatch["uv build\n.tar.gz + .whl"]
twine["uv publish\nto PyPI"]
docker_build["docker build\n-t mcp-django-unfold ."]
end
subgraph prod["๐ Production Use"]
uvx["uvx mcp-django-unfold"]
pip_install["pip install\nmcp-django-unfold"]
docker_run["docker run -i --rm\nmcp-django-unfold"]
end
code --> test
test --> local
local -->|"ready"| hatch
hatch --> twine
hatch --> docker_build
twine --> uvx
twine --> pip_install
docker_build --> docker_run
style dev fill:#1a1744,stroke:#6366f1,stroke-width:2px,color:#e0e7ff
style build fill:#1a1744,stroke:#6366f1,stroke-width:2px,color:#e0e7ff
style prod fill:#1a1744,stroke:#6366f1,stroke-width:2px,color:#e0e7ff
style code fill:#312e81,stroke:#818cf8,color:#ffffff
style test fill:#312e81,stroke:#818cf8,color:#ffffff
style local fill:#312e81,stroke:#818cf8,color:#ffffff
style hatch fill:#4f46e5,stroke:#818cf8,color:#ffffff
style twine fill:#4f46e5,stroke:#818cf8,color:#ffffff
style docker_build fill:#4f46e5,stroke:#818cf8,color:#ffffff
style uvx fill:#059669,stroke:#34d399,stroke-width:2px,color:#ffffff
style pip_install fill:#059669,stroke:#34d399,stroke-width:2px,color:#ffffff
style docker_run fill:#059669,stroke:#34d399,stroke-width:2px,color:#ffffffStage | Command | What Happens |
Dev |
| Install deps locally in |
Dev |
| Run server for local testing |
Dev |
| Interactive tool browser |
Build |
| Generate |
Publish |
| Upload to PyPI |
Prod |
| Zero-install run from PyPI |
Prod |
| Containerized run |
๐ค Contributing
Fork the repository
Create a feature branch:
git checkout -b feat/new-docs-sectionMake your changes to
docs.pyandserver.pyTest with MCP Inspector
Submit a pull request
๐ License
MIT โ see LICENSE for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
This server cannot be deployed
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Tailor Platform for AI assistants: search, list and read the platform documentation.
Papers, SEC filings, Wikipedia, HN and web reading for research agents. 15 tools, x402.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and search MkDocs documentation through tools for full-text search, page navigation, and code block extraction. It serves documentation pages as readable resources and provides structural outlines to help LLMs navigate documentation content.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover and invoke tools for saving and retrieving code snippets, generating style guides and wiki documentation, and orchestrating multi-agent documentation workflows with semantic search.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover and invoke tools for saving and retrieving code snippets, generating language-specific style guides and deep wiki documentation, and orchestrating multi-agent documentation workflows backed by semantic vector search.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover and use tools for saving and retrieving code snippets, semantic code search, generating style guides, building wiki documentation, and orchestrating multi-agent documentation workflows.-