An MCP server that exposes Django runtime information to AI agents
Project description
django-mcp-inspector
Starts a Model Context Protocol server that exposes Django runtime information as resources, allowing AI agents to inspect a live Django project without any static file analysis.
Resources
| URI | Contents |
|---|---|
django://settings |
All settings (sensitive values redacted) |
django://apps |
Installed apps, labels, paths, model names |
django://urls |
URL pattern tree flattened to pattern / view / name |
django://models |
Every model's fields, types, and relations |
django://models/{app_label} |
Fields for a single app |
django://migrations |
Applied and pending migrations per app |
Usage
Zero project modification (recommended)
Run as an ephemeral tool — no changes to INSTALLED_APPS or requirements:
DJANGO_SETTINGS_MODULE=myproject.settings uv run --with django-mcp-inspector django-mcp-inspector
Pass --settings instead of the environment variable if you prefer:
uv run --with django-mcp-inspector django-mcp-inspector --settings myproject.settings
Exclude third-party app noise:
uv run --with django-mcp-inspector django-mcp-inspector --settings myproject.settings --exclude-site-packages
As an installed app
Add mcp_inspector to INSTALLED_APPS:
INSTALLED_APPS = [
...
'mcp_inspector',
]
Then run the management command:
python manage.py mcpserver
python manage.py mcpserver --exclude-site-packages
Connecting an MCP client
The server communicates over stdio. Point any MCP-compatible client (Claude Desktop, custom agent, etc.) at the process.
Example Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"django": {
"command": "uv",
"args": [
"run", "--with", "django-mcp-inspector",
"django-mcp-inspector", "--settings", "myproject.settings"
],
"env": {
"PYTHONPATH": "/path/to/your/project"
}
}
}
}
Requirements
- Python 3.12+
- Django 4.2+
- mcp 1.0+
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_mcp_inspector-0.1.0.tar.gz.
File metadata
- Download URL: django_mcp_inspector-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76eb2c48c189ae79e212d51426d2a5b0ca4c559452dee1a896b61277115f0d98
|
|
| MD5 |
2927e9a4c756688f82dea30146134913
|
|
| BLAKE2b-256 |
e37287392d91babe60f821cdaeebddb6b1fc62596cb353cb00bdd82133fa3ea4
|
File details
Details for the file django_mcp_inspector-0.1.0-py3-none-any.whl.
File metadata
- Download URL: django_mcp_inspector-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
732df72d18fa63fdba392c911995fbaac364146999d7de8529a98c8d6d63bf9a
|
|
| MD5 |
99eba5396ee0461607a6f198b5b35159
|
|
| BLAKE2b-256 |
6ee509291efd8ad776517fc8235acff0d1dc326246dc91b5584b0c018171acf7
|