Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add instructions/thepapermen/django-mcp-sql/claude-mdgit clone --depth 1 https://github.com/thepapermen/django-mcp-sqlWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/thepapermen/django-mcp-sql/claude-md)<a href="https://agentmods.dev/instructions/thepapermen/django-mcp-sql/claude-md"><img src="https://agentmods.dev/badge/instructions/thepapermen/django-mcp-sql/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00589 | $0.00589 |
| Opus 5 | $0.00295 | $0.00295 |
| Sonnet 5 | $0.00118 | $0.00118 |
| Haiku 4.5 | $0.00059 | $0.00059 |
Grade A, and why
django-mcp-sql CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mcp_sql — agent guidance
The full architecture, file map, settings shape, OAuth surface, curated-view
pattern, naming map, and the complete "Watch out" list live in
docs/architecture.md (shipped in the wheel). Read it before touching
anything non-trivial here. Operational runbooks: docs/role-setup.md (DB
role + grants) and docs/oauth.md (OAuth + MCP transport).
This package is distributed standalone as django-mcp-sql (see
pyproject.toml, RELEASING.md). It must stay consumer-agnostic: no
imports from the surrounding project in production code OR tests; every
consumer-specific value comes from the MCP_SQL settings dict. The test
suite runs standalone via make test here (settings: tests/settings.py).
Load-bearing invariants (full rationale in docs/architecture.md)
- Only
SET LOCAL, never bareSET— transaction-mode pgbouncer would leak session GUCs onto reused backends.session.enter_readonly_sessionis the single helper; never inline a partial copy. - The default DB alias must never serve MCP reads. The guarantee is the
executor's
connection.alias == DB_ALIASassert, NOT the router (routers can't intercept explicitconnections[...]). The router only blocks migrations on the read alias. - Parser check ordering is a pinned contract
(
test_parser.TestCheckOrdering) — security reasons fire before ergonomic ones so audit rows name the real problem. Reorder with care. run_queryresults are fenced:rows(anderror) come back as a per-response random-UUID<untrusted-data-…>string, not a list — the prompt-injection boundary.list_tables/describe_tableare not fenced.MCPOAuth2Authenticationis mounted on/mcp/sql/only — never inREST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"]; the view self-declaresIsAuthenticatedso stock DRF defaults can't pierce the package.- Per-request
FastMCPinstantiation is deliberate (tool closures over the authenticated user). Tools areasync def, dispatch ORM work viasync_to_async(..., thread_sensitive=False), and every dispatch is wrapped in_close_conns_after— keep all three properties for any new tool. - Curated-view migrations live in the OWNING app, use
CREATE OR REPLACE VIEWforward SQL (column-additive) and carrystate_operations=[CreateModel(..., managed=False)].
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 4d ago First seen · 41 lines · 589 tokens per session scan A 7c32ed809cbb
django-mcp-sql CLAUDE.md is an instructions file published in the GitHub repository thepapermen/django-mcp-sql (3 stars, last pushed 22d ago), licensed MIT. It adds 589 tokens to every session, about $0.0029 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
seekstone CLAUDE.md
Instructions for shaqmughal/seekstone, covering claude.md, what this repo is, commands, the harness itself (run after npm install) and architecture.
plan-forge database.instructions.md
Database patterns for .NET — Dapper/EF Core, parameterized queries, migration strategy.
pg-dash CLAUDE.md
Claude Code instructions for indiekitai/pg-dash, covering pg-dash claude.md, 项目结构, 构建与测试, 发版纪律(强制) and 发版检查清单(每次 npm publish 前必须按序执行).
shop-ce AGENTS.md
AGENTS.md instructions for o3-shop/shop-ce, covering agent notes for o3-shop (shop-ce), docker setup, running tests and database.
jdbc-driver CLAUDE.md
Claude Code instructions for keboola/jdbc-driver, covering claude.md, project overview, build & test commands, jdbc driver and vscode sqltools extension.
MCP-SqlServer CLAUDE.md
Claude Code instructions for Aron-Valenzuela/MCP-SqlServer, covering claude.md, project overview, setup (for each user), 1. install dependencies and 2. configure claude desktop.