Provides safety-railed database access for AI agents to PostgreSQL, MySQL, SQLite, and Redis with explicit query and write policies.
Also known as Wangggym/quarry, quarry-db
- Stars
- 5
- Tools
- —
- Downloads, 30 days
- 1,472
- Latest version
- 0.2.2
- Last commit
- Nov 13, 2026
- License
- MIT
What is Quarry MCP?
Quarry provides safety-railed database access for AI agents to PostgreSQL, MySQL, SQLite, and Redis with explicit query and write policies.
Summary generated from the project's README
About Quarry MCP server
Quarry provides a secure way for AI agents to interact with various database systems including PostgreSQL, MySQL, SQLite, and Redis. It functions as a native Rust executable that can be run locally via a CLI or a browser-based GUI. Developers can use it as an MCP server to grant agents controlled access to data through explicit query and write policies.
This tool manages connections through workspaces that store configuration files while keeping actual credentials local. It supports advanced connectivity features like SSH tunnels and local Docker services. While the GUI is restricted to read-only operations, the CLI and MCP interfaces allow for write operations when specific authorization and production confirmations are provided. The system is designed to prevent accidental database creation by ensuring SQLite only opens existing files.
What you can do with it
- 1Execute controlled database writesAn AI agent can perform data modifications if it has both server and request authorization.
- 2Manage remote database connectionsA developer can connect to a database located on a different server using SSH tunnels.
- 3Run read-only data inspectionsUsers can use the browser interface to inspect database contents without the risk of changing data.
- 4Automate SQL execution via CLIA developer can run specific SQL commands against a defined environment using the command line.
Written from the project's README. Every use case is checked against a quote from it.
How to install Quarry MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall Quarry MCP in Claude Code
$ claude mcp add quarry -- uvx quarry-dbInstall Quarry MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"quarry": {
"command": "uvx",
"args": [
"quarry-db"
]
}
}
}Install Quarry MCP in VS Code
.vscode/mcp.json
{
"servers": {
"quarry": {
"type": "stdio",
"command": "uvx",
"args": [
"quarry-db"
]
}
}
}Install Quarry MCP in VS Code CLI
$ code --add-mcp '{"name":"quarry","type":"stdio","command":"uvx","args":["quarry-db"]}'Install Quarry MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"quarry": {
"command": "uvx",
"args": [
"quarry-db"
]
}
}
}Install Quarry MCP in Codex
$ codex mcp add quarry -- uvx quarry-dbInstall Quarry MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.quarry] command = "uvx" args = ["quarry-db"]
Install Quarry MCP in Gemini CLI
$ gemini mcp add -s user quarry uvx -- quarry-dbInstall Quarry MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"quarry": {
"command": "uvx",
"args": [
"quarry-db"
]
}
}
}Automated checks
Ran Nov 14, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablewangggym/quarry is public and reachablegithub.com/wangggym/quarry ↗Pass
- Package names this repository as its sourcequarry-db names wangggym/quarry as sourcepypi.org/project/quarry-db/ ↗Pass
- Build provenance (Sigstore attestation)Sigstore attestation for quarry-dbpypi.org/project/quarry-db/ ↗Pass
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/wangggym/quarry ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNo popular package one edit away from quarry-dbPass
- No critical advisory in the package or its dependencies1 resolved dependencies checked; no critical advisoryosv.dev ↗Pass
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubQuarry 2
A native database workbench: one reusable Rust kernel, CLI, browser GUI and MCP. PostgreSQL, MySQL, SQLite, Redis and experimental Neptune; explicit query/write policies, SSH tunnels, saved queries, local Docker services and a SQL assistant.
Install
Quarry 2.x ships as a native Rust executable.
curl -fsSL https://yiminspace.github.io/quarry/install.sh | sh
qy --version
qy gui
Or download a native archive and SHA256SUMS from GitHub Releases. The native executable needs neither Python nor a Rust toolchain. Supported: macOS/Linux arm64/x86_64; Linux glibc 2.28+. See install and upgrade.
Installer-managed copies can download new stable versions in the background.
The next launch activates the verified update. Run qy update to update now.
Use
Run qy gui stop from another terminal to shut down the local standalone GUI.
Use the same --config, --workspace, --host, and --port overrides as at
launch. If you started with --port 0, use the port in the printed GUI URL.
qy --workspace /path/to/workspace connections
qy --workspace /path/to/workspace exec shop --env dev --sql 'SELECT 1'
qy --workspace /path/to/workspace mcp
Workspaces contain connections.toml and reusable SQL query files. Actual
credentials remain local. GUI queries stay read-only; CLI writes require
--write and production confirmation. MCP writes require both server and
request authorization. SQLite opens existing files; it never invents a database
when a connection path is wrong. Assistant proposals never execute themselves.
Ordinary queries use native database drivers. SSH needs system ssh; Local services need Docker, and PostgreSQL schema sync needs pg_dump/psql.
Rust and Python
Rust owns main and all 2.x distribution. quarry-core, quarry-runtime,
quarry-local, quarry-assistant and quarry-service can be embedded directly
in host applications. Architecture.
For a hosted workbench, the official Docker image serves the GUI, authentication,
read-only API and execution from one configuration file. Use a built-in
administrator or configure an existing platform's IAM. Standalone qy runs
locally with its own workspaces.
See the hosting guide for deployment, access grants and offline
behavior. The Rust SDK remains available for advanced embedding.
Python 1.11.0 is preserved at its tag and the protected archive/python-1.x
branch. Python import APIs do not ship in 2.x. The Python source retained in this
checkout is a development/test baseline, not a runtime dependency or published
Python implementation. Existing configuration, saved queries and histories are
read by Rust. See upgrade instructions before changing installer ownership.
Build and verify
For frontend development, start the Rust workbench and Vite in separate terminals.
qy gui --no-browser
cd web
npm ci
npm run dev
Open the Vite URL ending in /quarry/. Vite reloads frontend changes and forwards
/api to the local Rust workbench on port 8765. If qy gui uses a different
port, start Vite with QUARRY_DEV_API_PORT=<port> npm run dev.
For a native build and the existing test workflow:
cd web && npm ci && npm run build && cd ..
cargo build --release --locked -p quarry-cli
cargo test --workspace --all-targets --locked
GUI feature matrix · Compatibility · Verification boundaries · 中文
Quarry MCP questions
How do I add Quarry MCP to Claude Code?
Run claude mcp add quarry -- uvx quarry-db in your terminal. Add --scope user to make it available in every project.
How do I add Quarry MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What databases does Quarry support?
Quarry supports PostgreSQL, MySQL, SQLite, Redis, and has experimental support for Neptune.
Does the native executable require Python or Rust to run?
No, the native executable does not require a Python or Rust toolchain to function.
How can I update Quarry?
You can run the command qy update to perform an immediate update.