# GoSQLX

Remote MCP server exposing 7 SQL tools: validation, formatting, linting and injection scanning.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 120
- Author: ajitpratap0
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ajitpratap0/GoSQLX
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/gosqlx

## What it does

GoSQLX is a pure-Go SQL parser that hands your agent 7 tools over MCP. Under the hood: a zero-copy tokenizer, a recursive descent parser and full AST generation. On top of that sit a formatter, 30 lint rules (L001–L030), 20 optimizer rules, an SQL injection scanner and metadata extraction. Eight dialects are covered: PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, SQLite, Snowflake and ClickHouse.

The server is remote, so there is nothing to install locally. One command wires it into Claude, and the agent can then validate queries, reformat them and flag risky patterns inside the conversation. The same endpoint, `https://mcp.gosqlx.dev/mcp`, works in Cursor, Codex, GitHub Copilot and other MCP clients.

Beyond the server the project ships a CLI, a VS Code extension, a GitHub Action and a Claude plugin with skills and slash commands. It runs over HTTP transport, so no network means no tools.

## Requirements
- Remote server: `https://mcp.gosqlx.dev/mcp`
- Works with: PostgreSQL

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add gosqlx --url https://mcp.gosqlx.dev/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "gosqlx": {
            "url": "https://mcp.gosqlx.dev/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "gosqlx": {
            "type": "http",
            "url": "https://mcp.gosqlx.dev/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http gosqlx https://mcp.gosqlx.dev/mcp
```

## When to use it
- validate a SQL query before running a migration
- turn a one-line query into indented, readable SQL
- scan someone else's code for SQL injection patterns
- pull the table and column list out of a query
- lint `*.sql` files in CI

## Example prompts
- Validate this query for PostgreSQL and show me the syntax errors
- Format `query.sql` with 2-space indent and uppercase keywords
- Check this query for SQL injection patterns

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
