📥 Installation¶
This guide covers installing Django Admin MCP and configuring it in your Django project.
📋 Requirements¶
Before installing, ensure you have:
- 🐍 Python >= 3.10
- 🌐 Django >= 3.2
- 📐 Pydantic >= 2.0
📦 Install the Package¶
Install using pip:
Or with your preferred package manager:
⚙️ Configure Django Settings¶
Add django_admin_mcp to your INSTALLED_APPS:
settings.py
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
# Add django_admin_mcp
'django_admin_mcp',
# Your apps...
]
🔗 Add URL Routes¶
Include the MCP URLs in your project's URL configuration:
urls.py
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('mcp/', include('django_admin_mcp.urls')),
]
This exposes two endpoints:
POST /mcp/— Main MCP protocol endpointGET /mcp/health/— Health check endpoint
🗄️ Run Migrations¶
Create the database tables for token management:
This creates the MCPToken model table for API authentication.
✅ Verify Installation¶
Start your Django development server:
Test the health endpoint:
Expected response:
🚀 Next Steps¶
Now that Django Admin MCP is installed, proceed to:
- Quick Start — Set up your first exposed model
- Configuration — Learn about configuration options