Django ER diagrams, N+1 detection, schema drift & migration-risk linting — in VS Code, a CLI and an MCP server. Static analysis: no database, no django.setup(). Free & MIT.
claude mcp add django-orm-lens -- npx -y django-orm-lens
A pasteable skeleton generated from the repository name. Check the project README for the exact package and arguments.
Star count
89 ★ · FROWNINGdev/django-orm-lens · read from the GitHub search API · (checked 2026-10-16 20:00:20)
Source
collected from the punkpeye/awesome-mcp-servers list · type: MCP server
Harvest history
first seen 2026-10-09 · last seen 2026-10-16 · seen 32× · listed by 7 sources
Score
score 703 · 89 ★ · 7 sources · mcp
FAQ (answers come from our records)
How do I install it?
We did not find an install command for this repository (our install coverage is only about 4%). Check its README or releases page.
Who is it for?
We filed it under these tags: MCP 服务. The tags come from the entry itself, not a taxonomy we imposed.
Who maintains it?
repository FROWNINGdev/django-orm-lens;first catalogued 2026-10-09;last seen 2026-10-16。There is no official certification or quality rating here — we record sources and dates only.
Django ORM Lens ER diagrams, N+1 detection and migration-risk checks for Django — without booting it. Your entire model graph — live in your editor sidebar, gating your CI, and answering your AI agent over MCP. All from static parsing: no database, no runserver, no working venv. **Replaces:** graph_models + django-schema-graph + hand-drawn ER diagrams + grep archaeology. Featured in Django News #347 · PyCoder's Weekly #746 --- ⚡ 10 seconds to first insight Cold clone, broken venv, no settings module — you still see every app and model of the project, then the N+1 loops and risky migrations in it, right in your terminal. (uvx is from uv; pipx run works the same way.) **Then pick your surface** — three distributions, one parser core: | You are | Install | You get | |---|---|---| | **Editor user** — VS Code / Cursor / Windsurf / VSCodium | code --install-extension frowningdev.django-orm-lens | Field autocomplete in .filter(), sidebar tree, live ER diagram, hover cards, 18 lint rules with QuickFixes | | **Terminal / CI user** | pip install django-orm-lens | 17 subcommands, SARIF + PR annotations, pre-commit hooks, a GitHub Action | | **AI-agent user** — Cursor / Claude Code / Aider / Zed / Continue | pip install "django-orm-lens[mcp]" | 13 read-only MCP tools answering schema questions from ground truth | MCP setup is one JSON block — see Integrations. Point DJANGO_ORM_LENS_ROOT at your Django project's absolute path. --- 🆓 Paid-tier capabilities, free and MIT Schema review is a paid category nearly everywhere. A bot that reviews every pull request, analysis that follows a queryset past the function it was built in, a check that catches schema drift, index advice grounded in real table statistics — those normally sit behind a per-seat or per-database subscription. All of it is here, MIT-licensed, with no tier gate, no seat count, no account, and no telemetry: | Capability usually sold as a paid tier | Here | |---|---| | PR review bot for schema changes — posts once, then updates in place | blast-radius + the Action | | Analysis that follows a queryset across functions | nplusone | | Schema drift detection | drift | | Index proposals from observed QuerySet usage | suggest-indexes | | Migration risk weighed against real table sizes | blast-radius --stats | | Blast radius of a destructive migration | blast-radius | | Cross-layer impact of removing a field | impact | **There is no Pro tier, and none is planned.** If the tool saves you an afternoon, a star is the entire ask. --- 📊 Traction > If the tool saves you a grep next time you touch a strange Django project — **a star helps others find it**. 📈 Star growth --- ⚡ Install **VS Code / Cursor / Windsurf** (VS Code Marketplace): **VSCodium / code-server / Gitpod / any OSS Code fork** (Open VSX): Or search **Django ORM Lens** in the Extensions view — same publisher frowningdev on both registries. **Terminal & AI coding agents:** Requires Python 3.9+. Zero runtime dependencies for the CLI. **Docker (v0.6+):** Multi-arch (amd64 + arm64). No Python required on the host. Good for CI and one-off audits. 🎯 The problem > **Works offline. Works on a broken venv. Works on someone else's laptop. Works in CI.** You open a Django project. It has 20 apps. You need to answer a simple question: > _"Which app owns the Order model, and how is it connected to User?"_ Today, that means: Ctrl+P, "models", scroll through 30 hits, open five files, Ctrl+F for class Order, read through 400 lines of ForeignKey('otherapp.Something') strings, try to remember what you learned two files ago. **Half a day gone. Every time. On every project.** ✨ With Django ORM Lens 📚 A tree of everything Every app → every model → every field → every Meta option. Grouped by application, sorted alphabetically, expandable. Icons distinguish CharField from ForeignKey from ManyToManyField at a glance. 🕸️ A live ER diagram One command opens a Mermaid entity-relationship diagram of your entire schema. Watch it redraw as you edit. Export to SVG. ForeignKey, OneToOneField, and ManyToManyField become proper cardinality arrows. 🔎 Hover for relations Hover over ForeignKey('app.Model') in any Python file → a card pops up with the target model's fields, relations, and a "Jump to" link. No Ctrl+F, no file dialog. 🧭 Jump-to-definition Click any field in the tree → cursor lands on the exact line. Filter the tree by app or model name. Split models/ packages are fully supported. ⚡ Zero configuration No DJANGO_SETTINGS_MODULE. No runserver. Parses models.py statically. Works with a broken venv, a missing dependency, or on someone else's laptop.