Skip to content
Cursor

SQL Preview for Cursor

io.github.fadnavismehul/sql-preview

Run governed SQL queries and inspect database schemas from MCP agents.

client:Cursor transport:stdio runtime:npm

Install SQL Preview in Cursor

~/.cursor/mcp.json · windows: %USERPROFILE%\.cursor\mcp.json

Held in this page only — never stored, logged, or sent anywhere but back to your screen.

{
  "mcpServers": {
    "sql-preview": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sql-preview"
      ],
      "env": {
        "SQL_PREVIEW_CONNECTIONS": "<SQL_PREVIEW_CONNECTIONS>",
        "SQL_PREVIEW_MCP_SAFE_MODE": "<SQL_PREVIEW_MCP_SAFE_MODE>",
        "SQL_PREVIEW_MAX_ROWS": "<SQL_PREVIEW_MAX_ROWS>"
      }
    }
  }
}

Use .cursor/mcp.json in a project root instead to scope it to that project. Cursor merges both. Cursor docs

SQL Preview in other clients