SQL Preview MCP Server
by fadnavismehulio.github.fadnavismehul/sql-previewv0.6.28
Run governed SQL queries and inspect database schemas from MCP agents.
context tax
queued
security
queued
cold start
queued
freshness
Maintained52d ago
Install SQL Preview MCP server
Install in Claude Code
claude mcp add sql-preview -e SQL_PREVIEW_CONNECTIONS='<sql-preview-connections>' -- npx -y sql-previewInstall in Cursor
{
"mcpServers": {
"sql-preview": {
"command": "npx",
"args": [
"-y",
"sql-preview"
],
"env": {
"SQL_PREVIEW_CONNECTIONS": "<sql-preview-connections>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"sql-preview": {
"command": "npx",
"args": [
"-y",
"sql-preview"
],
"env": {
"SQL_PREVIEW_CONNECTIONS": "<sql-preview-connections>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"sql-preview": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"sql-preview"
],
"env": {
"SQL_PREVIEW_CONNECTIONS": "<sql-preview-connections>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"sql-preview": {
"command": "npx",
"args": [
"-y",
"sql-preview"
],
"env": {
"SQL_PREVIEW_CONNECTIONS": "<sql-preview-connections>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| SQL_PREVIEW_CONNECTIONS | — | yes | JSON array of SQL Preview connection profiles for headless use. |
| SQL_PREVIEW_MCP_SAFE_MODE | — | — | Set to false to allow mutating SQL. Defaults to true. |
| SQL_PREVIEW_MAX_ROWS | — | — | Maximum rows returned by query tools. Defaults to 10000. |
Freshness
Maintained — last maintenance signal 52d ago. The newest of the signals below sets the band.
Last commit (default branch)
no data · GitHub
Latest release
no data · GitHub
Package published
no data · npm/PyPI
Registry entry updated
2026-08-19 · 52d ago · official registry · v0.6.28
FAQ
›How do I install the SQL Preview MCP server in Claude Code?
Run: claude mcp add sql-preview -e SQL_PREVIEW_CONNECTIONS='<sql-preview-connections>' -- npx -y sql-preview. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does SQL Preview require an API key?
Yes. It expects SQL_PREVIEW_CONNECTIONS, of which 1 is a secret.
›Can I use SQL Preview as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is SQL Preview in the official MCP registry?
Yes, as io.github.fadnavismehul/sql-preview.
Alternatives to SQL Preview
Other database MCP servers.