Django ORM Lens MCP Server

Static-analysis MCP server for Django models. 5 read-only tools. No DB, no boot, no creds.

Local serverstdioPython

What is the Django ORM Lens MCP server?

Static-analysis MCP server for Django models. 5 read-only tools. No DB, no boot, no creds. The django orm lens mcp server wraps that behind the Model Context Protocol, so an assistant can use it through 14 defined tools rather than through you.

What it actually does

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.

Adding it to your client

django-orm-lens on PyPI is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Its toolset

Everything the assistant can do here goes through one of these:

  • uses — actions/checkout@v4
  • repohttps://github.com/FROWNINGdev/django-orm-lens
  • run — |
  • list_apps — Every Django app in the workspace with model counts
  • list_models — Flat app.Model list, optional app filter
  • describe_model — Full field / relation / Meta detail for one model
  • find_relations — Inbound + outbound relations for one model
  • cascade_preview — Blast radius of one delete(), grouped by on_delete
  • er_diagram — ER diagram — mermaid / dbml / d2 / plantuml / dot
  • describe_migration_dependency — Per-app migration DAG: roots, leaves, cross-app deps
  • suggest_indexes — Meta.indexes proposals from observed QuerySet usage
  • signal_graph — Sender→signal→handler graph from @receiver decorators

Caveats

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Django ORM Lens.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the django orm lens mcp server does with a few real requests.

When to reach for it

This sits in the payments and commerce group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Django ORM Lens's toolset — uses, repo, run and 11 more — is a fair guide to whether it matches your workflow. It is maintained by FROWNINGdev; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Available tools

ToolWhat it does
usesactions/checkout@v4
repohttps://github.com/FROWNINGdev/django-orm-lens
run|
list_appsEvery Django app in the workspace with model counts
list_modelsFlat app.Model list, optional app filter
describe_modelFull field / relation / Meta detail for one model
find_relationsInbound + outbound relations for one model
cascade_previewBlast radius of one delete(), grouped by on_delete
er_diagramER diagram — mermaid / dbml / d2 / plantuml / dot
describe_migration_dependencyPer-app migration DAG: roots, leaves, cross-app deps
suggest_indexesMeta.indexes proposals from observed QuerySet usage
signal_graphSender→signal→handler graph from @receiver decorators
nplusone_scanStatic N+1 findings for the whole workspace
ClientHow to enable

How to install the Django ORM Lens MCP server

{
  "mcpServers": {
    "django-orm-lens": {
      "command": "uvx",
      "args": ["django-orm-lens"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Django ORM Lens to uses.
  • Use Django ORM Lens to repo.
  • Use Django ORM Lens to run.

Frequently asked questions

It connects Django ORM Lens to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (uses, repo, run, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Django ORM Lens directly.