querybridge-mcp: Instructions file for Claude Code

CLAUDE.md

querybridge-mcp CLAUDE.md is an instructions file for Claude Code from MahmoudHassanMustafa/querybridge-mcp. It costs 1,999 tokens per session, scanned A, original, MIT.

A set of project instructions for coding agents working on querybridge-mcp, an MCP server that connects AI clients to MySQL. It explains the repository layout, commands, release process, and rules agents must follow.

In plain words
What is it for?
Use it when orienting an agent in the repository, building or testing the project, checking its architecture, or preparing a release.
Why use it?
It gives an agent a quick, consistent understanding of how the project works and how changes should be checked. This reduces mistakes caused by missing local conventions or using the wrong commands.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md.

This is MahmoudHassanMustafa/querybridge-mcp's own configuration. It tells Claude Code how to work on querybridge-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything querybridge-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MahmoudHassanMustafa/querybridge-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MahmoudHassanMustafa/querybridge-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/MahmoudHassanMustafa/querybridge-mcp

Made for: Claude Code.

Wrote 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.

agentmods badge for querybridge-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/mahmoudhassanmustafa/querybridge-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/mahmoudhassanmustafa/querybridge-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/mahmoudhassanmustafa/querybridge-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/mahmoudhassanmustafa/querybridge-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for querybridge-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/mahmoudhassanmustafa/querybridge-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/mahmoudhassanmustafa/querybridge-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,999 This file is loaded in full into every session.
When invoked 1,999 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.01999 $0.01999
Opus 5 $0.01000 $0.01000
Sonnet 5 $0.00400 $0.00400
Haiku 4.5 $0.00200 $0.00200

Measured 10d ago against content hash acb2bc0bc9fb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

querybridge-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 10d 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.

CLAUDE.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

Operational notes for agents working in this repo. Read CONVENTIONS.md for the full set of rules; this file is the 60-second briefing.

Quick orientation

  • What it is. An MCP server connecting Claude (and other MCP clients) to MySQL. Ships two transports: stdio (default) and Streamable HTTP (with bearer auth). 40 tools across 9 families (see README.md → Tools).
  • Stack. TypeScript, Node ≥ 20, pnpm (not npm — packageManager field in package.json), Vitest, mysql2/promise, ssh2, @modelcontextprotocol/sdk.
  • Architecture. Transport → Tools → Infrastructure. Enforced by .dependency-cruiser.cjs; CONVENTIONS.md §1 has the prose. Don't import upward.
  • Entry points. src/server/index.ts dispatches stdio vs HTTP. src/tools/index.ts is the tool-registry barrel.

Commands

pnpm install            # also installs the husky pre-commit hook via `prepare`
pnpm build              # tsc
pnpm lint               # eslint + dep-cruiser (architecture enforcement)
pnpm test               # unit tests (Vitest)
pnpm test:integration   # MySQL Testcontainers — needs Docker running
pnpm format             # prettier --write across the repo
pnpm format:check       # prettier --check (no writes) — what CI would run

pnpm lint && pnpm test covers everything CI does. The pre-commit hook handles the formatting + ESLint pass on staged files automatically — no need to remember pnpm format before each commit.

Release flow

Changesets-driven. Never bump versions manually.

  • Any user-visible change → add .changeset/<short-name>.md with the appropriate bump (patch / minor / major) and a clear changelog entry.
  • Merging to main triggers the Changesets bot to open or update a "Version Packages" PR.
  • Merging the Version Packages PR pushes a vX.Y.Z tag → release.yml publishes to npm (with Sigstore provenance) and GHCR (multi-arch + SBOM).

Hard rules

  • Never commit config.json. It contains DB credentials. config.example.json is the sanitized template.
  • Never skip pre-commit hooks (--no-verify). The hook (.husky/pre-commit) runs lint-staged, which calls eslint --fix --max-warnings=0 and prettier --write on staged files only. Fast (~1s typical) and fixable — if it fails, fix the root cause instead of bypassing.
  • Never reach for mysql2 outside src/connection.ts, src/db/cancel.ts, or src/tools/query-tools.ts. Pool hardening (LOCAL_FILES block, SSL setup, SET SESSION transaction_read_only) only happens in buildPoolOptions. Bypassing it loses defenses. dep-cruiser enforces.
  • Every new tool ships with an integration test. MockRunner unit tests are not enough — real MySQL catches behavior the mock doesn't (CONVENTIONS.md §8).
  • Read-only by default. Two layers, both required: getConnectionConfig().readonly flag check AND isReadOnlyQuery() SQL whitelist. Don't skip either.
  • config.json is gitignored but .changeset/config.json is not — the gitignore has a !.changeset/config.json negation. Don't break it.

Read the full file on GitHub · 70 lines

Changes

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.

  1. 10d ago First seen · 70 lines · 1,999 tokens per session scan A acb2bc0bc9fb

Subscribe to this mod's changes

querybridge-mcp CLAUDE.md is an instructions file published in the GitHub repository MahmoudHassanMustafa/querybridge-mcp (1 stars, last pushed 22d ago), licensed MIT. It adds 1,999 tokens to every session, about $0.0100 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.

Related

Other instructions, from other repositories