Quarry MCP server
Safety-railed database access for agents: Postgres, MySQL, Redis. Read-only by default.
4 stars324 downloads/wk
Reviews
Write oneNobody has reviewed Quarry yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Quarry tools
No tool declarations could be read from the package source. They show once the server is installed.
Public scan report
scanner v0.1.9 · 2026-09-26 · same rubric, same numbers if you re-run it
- Code scan10 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 3 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year9/10
What the publisher says
From the Quarry repository's README, as published. We do not edit it. Read it on GitHub
Quarry
The database workbench built for the AI era — one kernel, many faces (CLI / GUI / MCP / agent skill).
中文文档 → · Website →
Every database tool you know — DBeaver, TablePlus, pgAdmin — assumes a human at the keyboard. But increasingly, the entity running your queries is an AI agent, and agents need different guarantees:
- Results a machine can parse, not a screen a human can read
- Shared query safety policies, with explicit authorization by entry point
- Deterministic error contracts (stable exit codes), not stack traces to scrape
- Configuration as files, not clicks — so it can be versioned, diffed, and shared with agents
Quarry inverts the traditional design: it is a query kernel with an agent-safe contract first, and the human faces (CLI, GUI) are thin shells grown from the same kernel. Whether a query comes from a person in the browser, a script in CI, or Claude running a skill, it uses shared query policies. CLI formats render rows; the GUI, MCP and Python API expose a structured QueryResult. See the interface and support contract for the exact boundaries.
Philosophy
- One core, many faces. Connection management, query execution, schema introspection, and safety rails live in an importable kernel (quarry.core). The CLI (qy), the GUI, the MCP server, and agent skills are thin shells. Fix a bug once, every face gets it.
- Read-only by default; escalation is explicit and graduated. CLI writes require --write; prod additionally needs confirmation or --yes. MCP requires server and per-call authorization, plus confirmprod for prod. GUI queries are read-only; Python callers obtain authorization before passing allowwrite=True. Read queries without an outer LIMIT default to a 500-row cap; --max-rows 0 explicitly disables it. PostgreSQL/MySQL query execution also uses database read-only transactions unless writes are authorized.
- A contract machines can trust. GUI/MCP/Python queries return {columns, rows, rowCount, truncated, elapsedMs, engine, sql, downloadBytes, sizeIsEstimated}. CLI JSON remains an array of rows; diagnostics and truncation notices go to stderr. Exit codes are stable API: 0 ok, 2 connection error, 3 SQL error, 8 safety block. CLI argument syntax errors also use 2; other commands have their own codes (for example ping returns 1 on failure). GUI/MCP/Python report structured errors.
- Workspace as code. A workspace is just a directory: connections.toml + queries//.sql (named queries with -- @meta headers). Share query files and credential-free templates through your repo; keep actual connection credentials local.
- Nearly zero dependencies. The base package and GUI use Python 3.11+ stdlib. PostgreSQL uses system psql, Redis needs redis-cli 6+, SSH uses system ssh, and MySQL uses the optional quarry-db[mysql] dependencies. No Electron or cloud service; the optional qy up keeper runs in the background.
Install
pipx install quarry-db # or: pip install quarry-db
qy --helpPostgreSQL uses the system psql binary; MySQL needs pip install "quarry-db[mysql]".
Quickstart
mkdir my-workspace && cd my-workspace
cat > connections.toml <<'EOF'
[shop]
url = "postgresql://user:pass@localhost:5432/shop"
engine = "postgres"
env = "dev"
EOFShortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Install directly
claude mcp add quarry -- uvx quarry-db
Quarry: common questions
- Is Quarry MCP server safe?
- Yes, by our scan: it is graded A (94/100). Read the Quarry safety report
- How do I install Quarry?
- It runs on your machine. Copy the Claude Code, Claude Desktop or Cursor config from the install section.
- Does Quarry need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Quarry maintained?
- The last commit was 4 days ago (2026-09-23). The latest release is v0.2.2.
- What can I use instead of Quarry?
- Servers from other publishers that do the same job: Database Mysql MCP server, Amnesic MCP server and DBHub MCP server. Compare all Quarry alternatives.
Alternatives to Quarry
Same job from other publishers: the closest match first, then the best rated.
- Database MysqlMCP server for MySQL. Read-only by default, row caps, statement timeouts, secrets never logged.not reviewedGrowingB
- AmnesicPersistent semantic memory for SQL databases. Postgres, MySQL, MSSQL, SQLite.not reviewedGrowingA
- DBHubToken-efficient database MCP server for PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLitenot reviewedWidely usedA
- NeonOfficial Neon MCP server for managing Neon projects and Lakebase Postgres databases.not reviewedEstablishedA
- valvLet coding agents query any SQL database safely. Read-only by default and scoped by your policies.not reviewedGrowingB