Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
fadnavismehul avatar

SQL Preview

  • fadnavismehul/sql-preview

SQL Preview is a MCP server that runs governed SQL queries and schema inspection for agent-connected databases.

About

SQL Preview is an MCP server that exposes governed SQL execution and schema inspection to coding agents. developers shipping SaaS or API backends use it when they want the model to explore tables, validate queries, and reason about data without handing over unrestricted write access. Configuration centers on JSON connection profiles in SQL_PREVIEW_CONNECTIONS, safe mode that blocks mutating SQL unless you explicitly disable it, and a row ceiling to keep responses bounded. Install via npx with the published sql-preview npm package and stdio transport. It is a task integration for backend work and often bleeds into Operate when you diagnose production data. Intermediate complexity reflects managing secrets, connection JSON, and understanding read-only guardrails. Pair it with your normal migration workflow rather than treating the agent as a schema authority.

  • Inspect database schemas from MCP-connected agents
  • Run SQL with SQL_PREVIEW_MCP_SAFE_MODE defaulting to true (mutations opt-in via false)
  • Cap result sets with SQL_PREVIEW_MAX_ROWS default 10000
  • Headless connection profiles via secret SQL_PREVIEW_CONNECTIONS JSON
  • npx sql-preview --stdio for local MCP clients (registry version 0.6.4)

SQL Preview by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
terminal
claude mcp add --env SQL_PREVIEW_CONNECTIONS=YOUR_SQL_PREVIEW_CONNECTIONS --env SQL_PREVIEW_MCP_SAFE_MODE=YOUR_SQL_PREVIEW_MCP_SAFE_MODE --env SQL_PREVIEW_MAX_ROWS=YOUR_SQL_PREVIEW_MAX_ROWS sql-preview -- npx -y sql-preview

Add your badge

Show developers this MCP server is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Packagesql-preview
TransportSTDIO
AuthRequired
Repositoryfadnavismehul/sql-preview

What it does

Let agents run read-focused SQL and inspect schemas against configured databases without opening a separate SQL client.

Who is it for?

Best when you're wiring Postgres or other SQL stores and want read-biased agent access with explicit connection profiles.

Skip if: Greenfield projects with no database yet, or teams that refuse to put connection secrets in local MCP environment variables.

What you get

You get schema-aware answers and capped query previews in-chat while mutating SQL stays off unless you opt out of safe mode.

  • Agent-visible table and column metadata from connected databases
  • Capped query result previews for debugging and analytics checks
  • Documented MCP stdio entry with environment-driven connection profiles

By the numbers

  • Registry version 0.6.4 on npm as package sql-preview
  • Default SQL_PREVIEW_MAX_ROWS is 10000
  • SQL_PREVIEW_MCP_SAFE_MODE defaults to true in registry metadata

Recommended MCP Servers

How it compares

Governed SQL MCP bridge, not an ORM generator or migration skill.

FAQ

Who is SQL Preview MCP for?

It is for developers using Claude Code or Cursor who need agents to inspect schemas and run bounded SQL against configured connections.

When should I use SQL Preview MCP?

Use it during backend build and data debugging when you want read-focused exploration with safe mode and row limits enabled.

How do I add SQL Preview MCP to my agent?

Register npx sql-preview with --stdio, set SQL_PREVIEW_CONNECTIONS to your JSON profiles, and keep SQL_PREVIEW_MCP_SAFE_MODE true unless you intentionally allow writes.

Databasesdatabasesanalyticspipelines

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.