QueryIO logo

QueryIO

Read-only PostgreSQL inspection for debugging rows, relationships, schema metadata, and targeted SQL through MCP.

Install QueryIO

Run the project’s own setup commands, in order.

Setup steps from the project

QueryIO installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to your MCP client
    npx -y queryio setup
    
  2. 2. Add to your MCP client
    npx -y queryio setup --claude
    
  3. 3. Add to your MCP client
    npx -y queryio setup --codex
    
  4. 4. Add to your MCP client
    npx -y queryio setup --cursor
    

Overview

QueryIO MCP server connects AI coding agents to PostgreSQL for bounded, read-only debugging and data inspection. Its inspect_row tool retrieves a primary-key row with a one-level neighborhood of declared foreign-key relationships, while query supports targeted SQL checks. Schema tools help agents find tables and examine keys, indexes, columns, and planner statistics without scanning data. Reach for QueryIO when an agent needs to trace a concrete record through related database rows rather than modify the database.

Use cases

  • Trace a user or invoice through its immediate foreign-key relationships
  • Check a suspected data inconsistency with bounded SQL
  • Discover application tables by table or column name
  • Review keys, indexes, and planner statistics before investigating records

Key features

  • Read-only PostgreSQL transactions with rollback and timeouts
  • Primary-key row inspection with depth-one foreign-key samples
  • Bounded SQL results with truncation and redaction metadata
  • Schema and relationship discovery without table scans
  • Sensitive-looking column redaction

Tools4

What QueryIO lets your agent do. Expand a tool for its parameters.

Verified live~816 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

11/11 checks healthy over the last 45d

What it can do

From the 4 tools this server returned when we ran it.

Handles credentials · 1Makes network requests · 1Read-only tools · 4
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age18 days
Maintainers1

Observed 2026-10-23 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 12d ago via OSV.dev

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads108Package downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How QueryIO works

What QueryIO MCP server does

QueryIO MCP server gives AI coding agents a read-only view of PostgreSQL application data. It is designed for debugging concrete records such as users, invoices, projects, and their related entities. The main workflow starts with a primary-key lookup, then uses the returned relationship samples and targeted SQL to test a diagnosis.

The server supports four MCP tools: inspect_row, query, list_tables, and describe_tables. Together, they cover record inspection, bounded SQL checks, table discovery, and schema-oriented investigation.

How it works

inspect_row accepts a fully qualified table and a complete primary-key value. It returns the selected row and samples from each declared foreign-key relationship in both directions: rows referenced by the root and rows that reference it. Each relationship is limited, ordered by the related table's primary key when available, and marked when results were truncated or could not be attempted because of relation or deadline limits.

query accepts one read-only SQL statement. Supported statement forms include SELECT, WITH, VALUES, TABLE, and SHOW. The statement runs inside a read-only transaction that is rolled back, with server-side statement and lock timeouts. Results are bounded by row and byte limits, and long values are shortened with a size marker.

Schema exploration avoids data scans where planner metadata is sufficient. list_tables reports non-system tables, estimated row counts, and column counts, with an optional case-insensitive name filter. describe_tables reports columns, nullability, primary and foreign keys, indexes, and available planner statistics for multiple tables in one request.

Setup and configuration

QueryIO requires Node.js 20 or newer and a PostgreSQL role that can read the target data. Set the QUERYIO_DATABASE_URL environment variable to the database connection string, then check connectivity with:

Terminal
npx -y queryio check

Run the setup wizard from the application repository to configure the coding agent connection:

Terminal
npx -y queryio setup

The wizard can detect Claude Code, Codex, and Cursor, shows proposed changes before writing them, and does not store the database connection string in a configuration file. Individual client selection is available with --claude, --codex, or --cursor. Start the agent from a terminal where QUERYIO_DATABASE_URL is set. A dedicated read-only PostgreSQL role is recommended.

Tools and capabilities

  • inspect_row: Fetches one primary-key row and bounded samples for its immediate declared foreign-key neighborhood. It returns compact relationship results, paired source and target columns, statuses, and truncation indicators.
  • query: Runs one bounded, read-only SQL statement for joins, aggregates, and targeted checks. Sensitive-looking columns are redacted, and result metadata reports truncation and redaction counts.
  • list_tables: Finds non-system tables by table or column name and returns planner-estimated row counts without scanning tables.
  • describe_tables: Examines several tables together, including columns, keys, indexes, and selected planner statistics. Sensitive columns do not expose their statistics.

Limitations and notes

inspect_row requires a declared primary key and follows only declared foreign keys one level deep. Tables without primary keys must be investigated with query. Related rows are ordered by key, not by recency, and the tool returns samples rather than complete relationship contents or counts.

Sensitive-looking names such as password, token, and api_key are redacted on a best-effort basis. Values can also be shortened to stay within response limits. Every call is read-only and rolled back, but QueryIO is not a complete security sandbox; database permissions and a dedicated read-only role remain important.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about QueryIO

QueryIO is an MCP server that connects AI coding agents to PostgreSQL for read-only database debugging. Its main tools inspect a primary-key row with related foreign-key records, run bounded SQL checks, list tables, and describe columns, keys, indexes, and planner statistics while redacting sensitive-looking values.

Install and run QueryIO through npx; Node.js 20 or newer is required. Set QUERYIO_DATABASE_URL, run npx -y queryio check, then use npx -y queryio setup from your application repository to configure a supported coding agent.

Yes, QueryIO supports Cursor. Run npx -y queryio setup and select Cursor, or use npx -y queryio setup --cursor. The agent must be started from a terminal where QUERYIO_DATABASE_URL is set.

No, QueryIO runs calls in read-only PostgreSQL transactions and rolls them back. Its SQL tool accepts read-oriented statements such as SELECT, WITH, VALUES, TABLE, and SHOW, so it is intended for inspection rather than data changes.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewQueryIO AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/queryio?style=directory)](https://allmcps.com/mcp/queryio)
HTML Embed
<a href="https://allmcps.com/mcp/queryio"><img src="https://allmcps.com/api/badge/queryio?style=directory" alt="QueryIO on AllMCPs" /></a>