
Django ORM Lens
**Django ORM static-analysis for AI coding agents.** Zero DB, zero Django boot, zero credentials — pure AST parse of `models.py`, `signals.py`, `migrations/`. ### 13 read-only tools **Schema** - `list_apps` — every Django app with model counts - `list_models` — flat `app.Model` list, optional app filter - `describe_model` — fields, relations, `Meta`, base classes, file path - `find_relations` — inbound + outbound (FK, M2M, O2O, `related_name`, `on_delete`) - `er_diagram` — ER diagram of the workspace: Mermaid, DBML, D2 or PlantUML **Change safety** - `blast_radius` — what a destructive migration actually hits: risk rules joined with every place that still references the schema they touch - `drift` — do the migrations still describe the models? `makemigrations --check` without booting Django - `impact` — everything still referencing a field or model, grouped by Django layer - `describe_migration_dependency` — per-app migration DAG, including cross-app dependencies - `cascade_preview` — delete blast radius grouped by `on_delete` (cascade, set_null, protected) **Performance** - `nplusone_scan` — N+1 anti-patterns: loops touching un-prefetched relations, followed across function boundaries - `suggest_indexes` — missing indexes inferred from real `filter` / `exclude` / `get` / `order_by` usage - `signal_graph` — `pre_save` / `post_save` / `pre_delete` / `post_delete` receivers mapped to sender models ### Install `pip install "django-orm-lens[mcp]"` — works with Claude Desktop, Cursor, Cline, Continue, Zed, or any MCP client. The optional `django_orm_lens_root` setting points at your Django project root; without it the client's working directory is used. ### One engine, three surfaces - **MCP server** — this listing - **CLI** — `pip install django-orm-lens`, with a GitHub Action and a pre-commit hook for CI gating - **VS Code / VSCodium / Cursor extension** — sidebar tree, ER diagram, jump-to-model, schema diff Listed in the official [MCP Registry](https://registry.modelcontextprotocol.io/) and in [punkpeye/awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers). MIT-licensed, free, actively maintained.
First seen 2 Oct 2026. Evidence as of 5 Oct 2026.
Tools
No tool list captured yet.
Change history
No changes since the first observation. The first snapshot is the baseline.
| Source | Listing | First seen | Last seen | Versions |
|---|---|---|---|---|
| Smithery | frowningdev/django-orm-lens | 2 Oct 2026 | 5 Oct 2026 | 1 |