Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>QueryDockNew to Visual Studio Code? Get it now.
QueryDock

QueryDock

QueryDock

|
1 install
| (0) | Free
Give your AI agent safe access to your database. Zero-config, read-only by default MCP server plus a fast database client for SQLite, PostgreSQL, MySQL, MariaDB and SQL Server.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

QueryDock for VS Code

Marketplace Version Installs Rating

Give your AI agent safe access to your database.
QueryDock connects Claude Code, Cursor, Windsurf and Copilot to your project database through a local MCP server that is read-only by default and never writes to production. It also puts a fast database client right inside VS Code. It finds your databases without setup.


Why QueryDock?

AI coding agents write better code when they can see your real schema and data, but letting an agent run SQL against your database is risky. QueryDock gives the agent what it needs and nothing more:

  • 🛡️ Read-only by default: The MCP server only runs SELECT-style statements. The guard can't be fooled by keywords hidden in strings or comments, or by a write chained after a read.
  • 🔒 Production stays locked: Connections tagged production, prod or live are read-only for you and for the agent.
  • 🧪 Sandboxed stored procedures: Let the agent call read-only procedures inside a transaction that is always rolled back.
  • 🏠 100% local: The MCP server binds to 127.0.0.1. Nothing goes through a cloud proxy, and QueryDock collects no telemetry.
  • ⚡ Zero config: QueryDock finds databases in .env, docker-compose.yml, Laravel, Rails, Django, Supabase and Prisma projects, so your agent is connected in seconds.

And for you, a complete database client inside the editor:

  • 🚀 Zero-Config Discovery: Automatically detects databases configured in .env, docker-compose.yml, Laravel, Rails, Django, Supabase, and Prisma projects.
  • ⚡ High-Performance Data Grid: Virtualized records, sorting, column filters, and server-side pagination (25–500 rows).
  • ✏️ Safe Inline Editing: Double-click cell values to modify strings, numbers, booleans, dates, or complex JSON with batch change tracking and Cmd+S commit.
  • 🛡️ Environment Safety: Production and protected environments are locked to Read-Only by default with prominent visual warnings.
  • 🔍 Table & Schema Inspector: Inspect column nullability, types, defaults, primary keys, foreign key links, and indexes in a slide-over drawer.
  • 💻 SQL Query Editor: Write and run queries with Cmd+Enter, inspect EXPLAIN query plans, and search query history.

Free and Pro

QueryDock is free to use, including at work. Some advanced features will move to a paid Pro plan later. They are free during early access, and early users will get a discounted price.

Feature Free Pro
Browse, edit, and export data ✅ ✅
SQL query editor, EXPLAIN, query history ✅ ✅
SQLite, PostgreSQL, MySQL, MariaDB, SQL Server ✅ ✅
Zero-config discovery and .querydockrc ✅ ✅
Production read-only lock ✅ ✅
MCP schema tools: databases, tables, columns, indexes, foreign keys ✅ ✅
MCP data tools: get-table-rows, search-table, run-query Early access ✅
Sandboxed stored-procedure execution Early access ✅
Multi-project MCP routing for agents Early access ✅
AI query audit log, PII masking, SSH tunnels, cloud databases — Coming soon

Want Pro early? Join the waitlist.


Supported Databases

Engine Driver Architecture Capabilities
SQLite sql.js (WebAssembly) Pure cross-platform (macOS/Win/Linux), file-based & in-memory, schema & indexes, mutations, EXPLAIN QUERY PLAN
PostgreSQL pg (Pure JS) Schemas, views, UUID/JSONB/arrays, foreign keys, SSL, EXPLAIN (FORMAT JSON)
MySQL mysql2/promise Schemas, auto-increment, unsigned types, indexes, SSL, EXPLAIN FORMAT=JSON
MariaDB mysql2/promise Full MariaDB support via MySQL wire protocol
Microsoft SQL Server tedious (Pure JS) SQL Server 2017+, Azure SQL, AWS RDS; schemas, keys, indexes, multiple result sets, sandboxed EXEC on read-only connections

Future releases will expand support to MongoDB, DuckDB, and ClickHouse.


Requirements

  • VS Code 1.90 or newer (also works in Cursor, Windsurf, and other VS Code–based editors).
  • No native binaries, database CLIs, or Docker required — every driver is pure JavaScript/WebAssembly.

Platform Support

Runs anywhere VS Code runs: macOS (Intel & Apple Silicon), Windows (x64 & ARM64), Linux (x64, ARM64, ARMhf, Alpine), and remote/WSL/Dev Container workspaces.


Quick Start

  1. Install the QueryDock extension (.vsix or from Marketplace).
  2. Open any workspace folder containing a SQLite file, .env, or docker-compose.yml.
  3. Click the QueryDock icon in the Activity Bar.
  4. Your discovered databases will appear under Detected Databases — click Connect to browse immediately!
  5. Double-click any table to open the Data Grid.

Zero-Config Discovery

QueryDock automatically discovers your project databases safely without executing arbitrary application code.

Supported discovery targets:

  • .env, .env.local, .env.development, .env.production
    • DATABASE_URL, POSTGRES_URL, MYSQL_URL, SQLITE_DATABASE, DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE
  • docker-compose.yml, compose.yml (detects exposed database ports and container service configurations)
  • Frameworks:
    • Laravel: .env, database/database.sqlite
    • Ruby on Rails: config/database.yml
    • Django: manage.py, db.sqlite3
    • Supabase: supabase/config.toml (detects local Postgres instance)
    • Node.js / Prisma: prisma/schema.prisma (detects local SQLite or Postgres connection)

Passwords are never displayed in plain text or written to logs — all previews show masked credentials (••••••).


Manual Configuration (.querydockrc)

You can also explicitly configure database connections for your team using .querydockrc or .querydockrc.json in your workspace root:

[
  {
    "name": "Development Postgres",
    "type": "postgres",
    "host": "127.0.0.1",
    "port": 5432,
    "database": "myapp_dev",
    "username": "postgres",
    "password": "${env:DB_PASSWORD}",
    "environment": "development"
  },
  {
    "name": "Local SQLite",
    "type": "sqlite",
    "path": "./database/database.sqlite",
    "environment": "local"
  },
  {
    "name": "Production Replica",
    "type": "postgres",
    "host": "replica.internal",
    "port": 5432,
    "database": "myapp_prod",
    "username": "readonly_user",
    "credentialKey": "prod-replica-pass",
    "environment": "production",
    "isReadOnly": true
  },
  {
    "name": "Payments (dev, read-only)",
    "type": "mssql",
    "host": "db.internal",
    "port": 1433,
    "database": "PAYMENTS",
    "username": "readonly_user",
    "password": "${env:PAYMENTS_DB_PASSWORD}",
    "environment": "development",
    "isReadOnly": true,
    "execPolicy": "sandbox",
    "execAllowlist": ["EM3_*", "dbo.UTIL_*_GET_*"]
  }
]

QueryDock reads only its own files (.querydockrc, .querydockrc.json, .querydock/config.json); it does not pick up other tools' connection files. Add .querydockrc to .gitignore when it holds credentials, or use ${env:VAR} / credentialKey.

Read-only connections and stored procedures

A read-only connection runs SELECT-shaped statements only. Stored-procedure calls follow the connection's execPolicy:

execPolicy Behaviour
deny (default) EXEC / CALL are rejected like any other write.
sandbox The call runs inside a transaction that is always rolled back. Every result set is returned; any INSERT/UPDATE the procedure performs is undone. Restrict which procedures qualify with execAllowlist (case-insensitive globs, optional schema. prefix). Dynamic SQL (EXEC (...), sp_executesql, xp_*) is never sandboxed.

Sandbox mode currently supports SQL Server. Side effects that escape a transaction (mail, linked servers, consumed identity values) are not undone — keep the allowlist to read-only procedures.

Secret References

  • Use ${env:VAR_NAME} to reference environment variables without committing passwords.
  • Use "credentialKey": "key-name" to retrieve stored credentials from VS Code's encrypted SecretStorage.

Data Grid & Editing

  • Double Click any cell to edit value inline.
  • Supports strings, numbers, booleans, dates, and JSON objects.
  • Changed cells are highlighted in amber.
  • Press Cmd+S or click Save Changes to commit updates.
  • Press Escape or click Discard to revert unsaved edits.
  • Right-click any cell to Set NULL.
  • Click the trash icon to Delete Row with primary key confirmation.
  • Click Export to export loaded records to CSV, TSV, JSON, or SQL INSERT statements.

Built-in SQL Query Editor

Open via Command Palette (QueryDock: Open Query Editor) or title bar icon:

  • Syntax highlighting and auto-formatting.
  • Press Cmd+Enter (macOS) or Ctrl+Enter (Windows/Linux) to run.
  • Click Explain to view detailed visual execution plan.
  • Query History Drawer: Review recent executions, durations, and status; click to reload query.
  • Export query results directly to CSV or JSON.

Model Context Protocol (MCP) Server for AI

QueryDock embeds a local MCP server bound strictly to 127.0.0.1 so AI coding tools (Claude, Cursor, Antigravity) can inspect and query your project database:

Exposed Tools

  • get-database-info: Returns server engine, version, and connection status.
  • get-tables: Lists all tables and views in the schema.
  • get-table-schema: Full column list, data types, nullability, primary & foreign keys.
  • get-indexes: Lists table indexes.
  • get-foreign-keys: Lists relationship mappings between tables.
  • get-table-rows: Paginated table rows with optional filtering.
  • search-table: Text search within table columns.
  • run-query: Executes SQL. Batches and procedures return every result set in resultSets; on read-only connections procedure calls run only under execPolicy: "sandbox" (rolled back).

Connecting an AI Agent

Click the plug icon in the QueryDock dashboard header → Copy MCP configuration and pick your client. The snippet is copied to your clipboard.

QueryDock installs its MCP server at ~/.querydock/mcp-server.js and keeps it up to date, so your AI client's config keeps working when the extension updates.

Claude Code (one command):

claude mcp add --transport stdio querydock node ~/.querydock/mcp-server.js

Cursor / VS Code (.cursor/mcp.json or .mcp.json) and Windsurf (mcp_config.json). JSON configs need the full path, which the copied snippet fills in for you:

{
  "mcpServers": {
    "querydock": {
      "command": "node",
      "args": ["/Users/<you>/.querydock/mcp-server.js"]
    }
  }
}

HTTP (any client that supports Streamable HTTP, while VS Code is open):

{ "mcpServers": { "querydock": { "type": "http", "url": "http://127.0.0.1:42100/mcp" } } }

How it works: the stdio server is a thin proxy. The extension writes ~/.querydock/mcp.json (workspace path → port) when it starts; the proxy looks up the project from its working directory (--project <path> or QUERYDOCK_PROJECT override it) and forwards tool calls to the extension's HTTP server. VS Code with QueryDock must be open for the project. projectId is injected automatically, so agents never have to supply it.

Security Controls

  • Read-Only Mode: Controlled by querydock.mcp.readOnly (default true). Only SELECT/WITH/EXPLAIN/SHOW/PRAGMA/DESCRIBE statements run; keywords inside string literals and comments are ignored by the guard. Procedure calls need the connection's execPolicy: "sandbox" and run inside a rolled-back transaction.
  • Project Isolation: MCP requests must target known workspace project IDs.
  • Localhost Only: Binds strictly to 127.0.0.1.

Keybindings

Command macOS Windows / Linux
Go to Table (QuickPick) Cmd + K, Cmd + G Ctrl + K, Ctrl + G
Run SQL Query Cmd + Enter Ctrl + Enter
Save Database Edits Cmd + S Ctrl + S
Discard Cell Edit Escape Escape

Extension Settings

Setting Default Description
querydock.debug false Enable verbose debug logging to output channel.
querydock.defaultPageSize 100 Default row count per page (25, 50, 100, 250, 500).
querydock.enableAutoDiscovery true Auto-detect databases from workspace files.
querydock.enableCodeLens true Display CodeLens actions above models and table definitions.
querydock.enableMcp true Start local MCP server on 127.0.0.1.
querydock.mcp.readOnly true Enforce strict read-only mode for MCP queries.
querydock.readOnlyEnvironments ["production", "prod", "live"] Environment tags that enforce read-only protection.
querydock.queryHistoryLimit 100 Max recent queries stored in history.

Security & Privacy Guarantee

  • No Remote Telemetry: QueryDock does not collect or transmit telemetry, user analytics, or usage statistics.
  • Zero Cloud Proxies: Database traffic never leaves your local machine or local network.
  • Credential Masking: Passwords and secrets are masked before ever reaching logs or UI previews.
  • Content Security Policy: Webview enforces strict CSP forbidding inline scripts and remote network calls.

Support & Contributing

  • 🐛 Found a bug or have a feature request? Open an issue.
  • 📖 Configuration and MCP docs: github.com/heysidhant/querydock.
  • ⭐ If QueryDock saves you time, please leave a review and star the GitHub repo.

License

QueryDock is free to use under the QueryDock End User License Agreement. Open-source components it includes are listed in THIRD-PARTY-NOTICES.txt.

© 2026 Sidhant Sinha

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft