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/adamrpostjr/sqlmate-mcp/claude-mdgit clone --depth 1 https://github.com/adamrpostjr/sqlmate-mcpWrote 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/adamrpostjr/sqlmate-mcp/claude-md)<a href="https://agentmods.dev/instructions/adamrpostjr/sqlmate-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/adamrpostjr/sqlmate-mcp/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.01667 | $0.01667 |
| Opus 5 | $0.00834 | $0.00834 |
| Sonnet 5 | $0.00333 | $0.00333 |
| Haiku 4.5 | $0.00167 | $0.00167 |
Grade A, and why
sqlmate-mcp 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 3d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Commands
# Start the MCP server
npm start # node src/index.js
# Build the frontend (Svelte → /public)
npm run build # installs frontend deps + vite build
# Frontend dev server (proxies /api to localhost:4737)
cd frontend && npm run dev
# Register with Claude Code (one-time)
claude mcp add --transport stdio sqlmate-mcp node /path/to/src/index.js
# Run tests
npm test # node --test test/**/*.test.js
No lint command is configured.
Architecture
sqlmate-mcp is a zero-config MCP server that exposes database tools to Claude Code and opens a browser GUI for database inspection. When multiple projects run sqlmate-mcp at once, they share a single GUI process instead of each opening its own — see "Host/Attach Architecture" below.
Backend (src/)
Pure Node.js ES modules, no TypeScript, no build step.
| File | Role |
|---|---|
src/index.js |
Entry point. Loads connections, decides whether this process becomes the GUI host or attaches to an existing one, auto-opens browser |
src/mcp.js |
8 MCP tools (list_connections, add_connection, list_tables, describe_table, get_schema, run_query, explain_query, run_write). Includes 2-step confirmation for risky write operations via assessRisk() |
src/drivers.js |
Driver implementations for MySQL/MariaDB (mysql2), SQLite (native node:sqlite), MSSQL (mssql), PostgreSQL (pg). Each exposes a uniform interface: listTables, describeTable, runQuery, runWrite, getPaginatedRows, updateRow, deleteRow, close |
src/connections.js |
Reads .env (Laravel-style DB_* vars or DATABASE_URL) and .sqlmaterc (JSON array) from SQLMATE_PROJECT_ROOT (defaults to cwd) |
src/gui.js |
Express REST API on port 4737 (the host process only). Serves the built Svelte app from /public, project-scoped connection/table/row CRUD routes, the /api/host/* uplink routes used by attached processes, and the SSE stream (/api/events) for the live agent feed |
src/attach.js |
Client-side uplink used when another process already owns the GUI port: probes /api/info, registers this project with the host, sends heartbeats, forwards local tool events, and triggers host takeover (becomeHostOrAttach in index.js) if the host disappears |
src/registry.js |
ProjectRegistry — in-memory store of all projects (self + attached) the host knows about: registration/reconciliation of connections, heartbeat TTL + GC of stale projects, per-project connection lookup, and the snapshot()/projects_changed data sent to the GUI |
src/protocol.js |
Shared constants between host and attached processes: APP, PROTOCOL_VERSION (host/attach compatibility check), HEARTBEAT_MS, PROJECT_TTL_MS, GC_INTERVAL_MS, and the projectId() hash function |
src/events.js |
EventEmitter singleton — bridges MCP tool call lifecycle (tool_start/tool_end) and connections_changed to the GUI (directly when hosting, via attach.js uplink when attached) |
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.
- 3d ago First seen · 84 lines · 1,667 tokens per session scan A 2afb116e757d
sqlmate-mcp CLAUDE.md is an instructions file published in the GitHub repository adamrpostjr/sqlmate-mcp (1 stars, last pushed 15d ago), licensed MIT. It adds 1,667 tokens to every session, about $0.0083 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
db-tools-mcp AGENTS.md
AGENTS.md instructions for urjeetpatel/db-tools-mcp, covering agents.md — db-tools-mcp, what this server does, setup checklist (one-time), tool reference and discovery.
huginnDB CLAUDE.md
Instructions for Alexfp28/huginnDB, covering claude.md, identity, maintainer / collaboration notes, tech stack quick reference and hard-earned gotchas.
tabularis CLAUDE.md
Claude Code instructions for TabularisDB/tabularis, a project described as: Open-source desktop SQL workspace for PostgreSQL, MySQL/MariaDB, SQLite and 15+ more databases like DuckDB, ClickHouse, Redis and Firestore. Built-in MCP server for Claude, Cursor and Devin, SQL notebooks and visual EXPLAIN.
Connect_MSSQL_MCP AGENTS.md
Instructions for XingCheng3/Connect_MSSQL_MCP, covering repository guidelines(仓库贡献指南), 项目结构与模块, 构建、运行与开发, 代码风格与命名 and 测试指南.
db-tools-mcp copilot-instructions.md
Copilot instructions for urjeetpatel/db-tools-mcp, covering project guidelines, code style, architecture, build and test and conventions.
cocoindex-claude-code CLAUDE.md
Instructions for pkmdev-sec/cocoindex-claude-code, covering cocoindex claude code, quick commands, search documents, index documents and start server.