Best for
- Developers reviewing ORM models without starting the app or connecting to a database.
- AI coding-agent workflows that need MCP access to schema information in a codebase.
The supplied source describes ORM Lens's static analysis features, read-only MCP tools, stdio manifest configuration, and workspace selection. The official field is false because the source does not indicate that the server is maintained by the upstream owners of Django, SQLAlchemy, or the MCP protocol.
Strongest · Setup experience 12/20 Weakest · Reliability 8/20
Static review · not runReviewed 2026-12-04
Read the FMRS scoring method →Runtime:Python 3.10+
ORM_LENS_ROOT
Optional: set this to the absolute path of the project to analyze. You can instead pass `workspace_root` in a tool call or use the current working directory.
ORM_LENS_ALLOWED_ROOTS
Optional: set an allowlist of permitted root paths, separated by `:` (or `;` on Windows).
Install Python 3.10 or later, then run pip install "orm-lens[mcp]". Set the config command to orm-lens-mcp and point ORM_LENS_ROOT to the project's absolute path; alternatively, pass workspace_root on each tool call. Example client config: {"mcpServers":{"orm-lens":{"command":"orm-lens-mcp","env":{"ORM_LENS_ROOT":"/abs/path/to/your/project"}}}}.
{"mcpServers":{"orm-lens":{"command":"orm-lens-mcp","env":{"ORM_LENS_ROOT":"/abs/path/to/your/project"}}}}
Works in clients that read an "mcpServers" key. For clients such as VS Code that use a different key, the configurator below converts it.
{
"servers": {
"orm-lens": {
"command": "orm-lens-mcp",
"env": {
"ORM_LENS_ROOT": "/abs/path/to/your/project"
}
}
}
}
Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).
[mcp_servers.orm-lens] command = "orm-lens-mcp" [mcp_servers.orm-lens.env] ORM_LENS_ROOT = "/abs/path/to/your/project"
Append to ~/.codex/config.toml (OpenAI Codex CLI uses TOML).
claude mcp add orm-lens -e ORM_LENS_ROOT=/abs/path/to/your/project -- orm-lens-mcp
Run it in a terminal; replace any <…> placeholders with your own values first.
Confirm `list_apps` and `nplusone_scan` appear in the client’s tool list. Call `list_apps` and check that it returns workspace app information.
Once connected, you can ask your AI assistant things like:
No matching tools
ORM Lens is a static ORM analysis tool for developers and AI coding agents, with an MCP server. It analyzes models, relations, migrations, and Alembic revisions; generates ER diagrams; and checks for N+1 issues, migration risks, schema drift, and field impact. The README says analysis does not require starting the application or connecting to a database. The MCP server provides read-only tools over stdio. SQLAlchemy support is marked preview.
Connect code, docs, and infrastructure in a local knowledge graph.
Docker's official MCP gateway CLI plugin for managing and running MCP servers.
Fast, low-cost structured judgments for agents.
Local call graphs and structural analysis for Go repositories.
Source revision 64211b376d3d Data synced 2026-12-05 Read the FMRS scoring method Markdown