PluginBench
MCP Server
Maintained
MIT

SQL MCP Server

io.github.Abhishekkumar2021/sql

What is the SQL MCP server?

Read-only SQL querying + schema introspection over Postgres & SQLite, with a gated write mode.

How to install SQL

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • DB_CONN_default
    secret

    Connection URL for the 'default' connection (postgres://… or sqlite:/abs/path). Additional connections use DB_CONN_<name>. Carries credentials — treated as secret.

  • DB_WRITABLE

    Set to 1 or true to enable the write tools (execute, execute_script).

Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "sql": {
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/sql"
      ],
      "env": {
        "DB_CONN_default": "<YOUR_DB_CONN_DEFAULT>",
        "DB_WRITABLE": "<YOUR_DB_WRITABLE>"
      }
    }
  }
}
Cursor
~/.cursor/mcp.json
{
  "mcpServers": {
    "sql": {
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/sql"
      ],
      "env": {
        "DB_CONN_default": "<YOUR_DB_CONN_DEFAULT>",
        "DB_WRITABLE": "<YOUR_DB_WRITABLE>"
      }
    }
  }
}
Windsurf
~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "sql": {
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/sql"
      ],
      "env": {
        "DB_CONN_default": "<YOUR_DB_CONN_DEFAULT>",
        "DB_WRITABLE": "<YOUR_DB_WRITABLE>"
      }
    }
  }
}
VS Code
.vscode/mcp.json
{
  "servers": {
    "sql": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@abhishekmcp/sql"
      ],
      "env": {
        "DB_CONN_default": "<YOUR_DB_CONN_DEFAULT>",
        "DB_WRITABLE": "<YOUR_DB_WRITABLE>"
      }
    }
  }
}
Claude Code
claude mcp add sql --env DB_CONN_default=<YOUR_DB_CONN_DEFAULT> --env DB_WRITABLE=<YOUR_DB_WRITABLE> -- npx -y @abhishekmcp/sql

Related MCP servers

Files

Maintained

Sandboxed local filesystem: read, search, edit, copy, archive, and safely manage files.

1
TypeScript
MIT
View repository →

Git

Maintained

Local Git via MCP: status, log, diff, file history, branches, and gated stage/commit. Pure-JS.

1
TypeScript
MIT
View repository →

GitHub

Maintained

GitHub via MCP: search, repos, issues, PRs, files, notifications. OAuth device flow or token.

1
TypeScript
MIT
View repository →

HTTP

Maintained

HTTP/REST client with saved collections, env secrets, and SSRF-safe host allowlisting.

1
TypeScript
MIT
View repository →

Notes

Maintained

Local markdown notes: ranked + semantic search, tags, todos, and a wiki-link knowledge graph.

1
TypeScript
MIT
View repository →
SQL MCP Server | PluginBench