{"id":43931,"library":"sql-preview","title":"SQL Preview","description":"SQL Preview is a VS Code extension and standalone MCP database server that provides a local-first SQL workspace for humans and AI agents. Version 0.6.4 supports PostgreSQL, MySQL, SQLite, DuckDB, Trino/Presto, Snowflake, BigQuery, and SQL Server with a connection manager, AG Grid-powered result grid, daemon-backed execution, and an MCP server for Claude Desktop, Cursor, etc. Released under MIT license, it differentiates by offering governed read-only database access through MCP tools while keeping credentials local and telemetry opt-in. Updates are frequent (multiple releases per month).","status":"active","version":"0.6.4","language":"javascript","source_language":"en","source_url":"https://github.com/fadnavismehul/sql-preview","tags":["javascript","sql","database","query","postgresql","postgres","mysql","sqlite","duckdb"],"install":[{"cmd":"npm install sql-preview","lang":"bash","label":"npm"},{"cmd":"yarn add sql-preview","lang":"bash","label":"yarn"},{"cmd":"pnpm add sql-preview","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Extension API for VS Code integration; engines field requires ^1.80.0","package":"vscode","optional":false}],"imports":[{"note":"This is a VS Code extension; there is no programmatic API import. Use 'extension' activation via VS Code.","wrong":"","symbol":"default","correct":"const sqlPreview = require('sql-preview');"}],"quickstart":{"code":"// No JavaScript code needed; install extension from marketplace.\n// To use MCP server programmatically:\nconst { MCPServer } = require('sql-preview/daemon');\nconst server = new MCPServer({ dbType: 'sqlite', connection: { path: './test.db' } });\nawait server.start();\n// Then process requests from MCP clients.","lang":"javascript","description":"Shows how to programmatically start the SQL Preview MCP server for custom integrations."},"warnings":[{"fix":"Ensure passwords are stored via the 'Set Password' command in the SQL Preview panel.","message":"Extension may silently fail if VS Code Secret Storage is unavailable or password is missing for a connection profile.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Run 'SQL Preview: Migrate Legacy Settings' from Command Palette and use the connection manager UI.","message":"Legacy settings (sqlPreview.host, etc.) were deprecated; migration is required for version 0.4+.","severity":"gotcha","affected_versions":">=0.4.0"},{"fix":"Update to version 0.6.0+ or follow migration guide for Trino connector configuration.","message":"The bundled Trino/Presto driver uses an older connector; users are advised to switch to the native Trino connector if available.","severity":"deprecated","affected_versions":"<0.6.0"},{"fix":"Reset VS Code zoom to default via View > Appearance > Zoom Out.","message":"Result grid may display incorrectly if VS Code zoom level is not 100% due to AG Grid pixel-snapping.","severity":"gotcha","affected_versions":">=0.5.0"},{"fix":"Set `safe: false` in MCP configuration or pass `--unsafe` flag to daemon CLI.","message":"Safe mode (read-only) is enabled by default for MCP server; users must explicitly disable safety to allow write operations if needed.","severity":"gotcha","affected_versions":">=0.3.0"}],"env_vars":null,"search_vec":"'0.6.4':29 'access':77 'ag':45 'agent':27 'ai':26 'back':53 'bigqueri':37 'claud':60 'code':8 'connect':43 'credenti':83 'cursor':62 'daemon':52 'daemon-back':51 'databas':13,76,99 'desktop':61 'differenti':69 'duckdb':34,105 'etc':63 'execut':54 'extens':9 'first':20 'frequent':92 'govern':72 'grid':47,50 'grid-pow':46 'human':24 'javascript':97 'keep':82 'licens':67 'local':19,84 'local-first':18 'manag':44 'mcp':12,57,79 'mit':66 'month':96 'multipl':93 'mysql':32,103 'offer':71 'opt':88 'opt-in':87 'per':95 'postgr':102 'postgresql':31,101 'power':48 'preview':2,4 'provid':16 'queri':100 'read':74 'read-on':73 'releas':64,94 'result':49 'server':14,40,58 'snowflak':36 'sql':1,3,21,39,98 'sqlite':33,104 'standalon':11 'support':30 'telemetri':86 'tool':80 'trino/presto':35 'updat':90 'version':28 'vs':7 'workspac':22","created_at":"2026-06-05T17:02:10.224359+00:00","updated_at":"2026-06-05T17:02:10.224359+00:00","problems":[{"fix":"Change connector type from 'postgresql' to 'postgres' in the connection profile.","cause":"Using incorrect connector name; PostgreSQL expects 'postgres', not 'postgresql'.","error":"Could not find connector for database type 'postgresql'"},{"fix":"Install the `@google-cloud/bigquery` package locally or add it to your environment's PATH.","cause":"BigQuery driver is lazy-loaded and not bundled; requires manual installation.","error":"Failed to connect: missing driver for BigQuery"},{"fix":"Use the 'Set Password' action in SQL Preview panel for the profile.","cause":"Connection profile has no password stored in Secret Storage.","error":"Password is empty or not set"},{"fix":"Run 'SQL Preview: Migrate Legacy Settings' from Command Palette.","cause":"Extension upgraded from old settings format (pre-v0.4) and refuses to use them.","error":"Legacy settings detected. Please migrate."},{"fix":"Disable safe mode via configuration: `safe: false` or `--unsafe` daemon flag.","cause":"MCP client attempted a write operation on a read-only server.","error":"MCP server refused connection: safe mode enabled"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/fadnavismehul/sql-preview#readme","github":"https://github.com/fadnavismehul/sql-preview","docs":null,"changelog":null,"pypi":null,"npm":"sql-preview","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops","database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}