GoSQLX

GoSQLX

7 SQL tools (validate, format, parse, lint, security scan, metadata extraction, full analysis) over Streamable HTTP. Supports 6 SQL dialects with 1.25M+ ops/sec.

Category
Visit Server

README

GoSQLX

<div align="center">

<img src="https://raw.githubusercontent.com/ajitpratap0/GoSQLX/main/.github/logo.png" alt="GoSQLX Logo" width="180"/>

Parse SQL at the speed of Go

Go Version Release License PRs Welcome

Website VS Code MCP Lint Action

Tests Go Report GoDoc Stars

<br/>

๐ŸŒ Try the Playground ย ยทย  ๐Ÿ“– Read the Docs ย ยทย  ๐Ÿš€ Get Started ย ยทย  ๐Ÿ“Š Benchmarks

<br/>

1.25M+ ops/sec <1ฮผs latency 85% SQL-99 6 dialects 0 race conditions

</div>

<br/>

What is GoSQLX?

GoSQLX is a production-ready SQL parsing SDK for Go. It tokenizes, parses, and generates ASTs from SQL with zero-copy optimizations and intelligent object pooling - handling 1.25M+ operations per second with sub-microsecond latency.

ast, _ := gosqlx.Parse("SELECT u.name, COUNT(*) FROM users u JOIN orders o ON u.id = o.user_id GROUP BY u.name")
// โ†’ Full AST with statements, columns, joins, grouping - ready for analysis, transformation, or formatting

Why GoSQLX?

  • Not an ORM - a parser. You get the AST, you decide what to do with it.
  • Not slow - zero-copy tokenization, sync.Pool recycling, no allocations on hot paths.
  • Not limited - PostgreSQL, MySQL, SQL Server, Oracle, SQLite, Snowflake. CTEs, window functions, MERGE, set operations.
  • Not just a library - CLI, VS Code extension, GitHub Action, MCP server, WASM playground, Python bindings.

<br/>

Get Started in 60 Seconds

go get github.com/ajitpratap0/GoSQLX
package main

import (
    "fmt"
    "github.com/ajitpratap0/GoSQLX/pkg/gosqlx"
)

func main() {
    // Parse any SQL dialect
    ast, _ := gosqlx.Parse("SELECT * FROM users WHERE active = true")
    fmt.Printf("%d statement(s)\n", len(ast.Statements))

    // Format messy SQL
    clean, _ := gosqlx.Format("select id,name from users where id=1", gosqlx.DefaultFormatOptions())
    fmt.Println(clean)
    // SELECT
    //   id,
    //   name
    // FROM users
    // WHERE id = 1

    // Catch errors before production
    if err := gosqlx.Validate("SELECT * FROM"); err != nil {
        fmt.Println(err) // โ†’ expected table name
    }
}

<br/>

Install Everywhere

<table> <tr> <td width="50%">

๐Ÿ“ฆ Go Library

go get github.com/ajitpratap0/GoSQLX

๐Ÿ–ฅ๏ธ CLI Tool

go install github.com/ajitpratap0/GoSQLX/cmd/gosqlx@latest
gosqlx validate "SELECT * FROM users"
gosqlx format query.sql
gosqlx lint query.sql

</td> <td width="50%">

๐Ÿ’ป VS Code Extension

code --install-extension ajitpratap0.gosqlx

Bundles the binary - zero setup. Learn more โ†’

๐Ÿค– MCP Server (AI Integration)

claude mcp add --transport http gosqlx \
  https://mcp.gosqlx.dev/mcp

7 SQL tools in Claude, Cursor, or any MCP client. Guide โ†’

</td> </tr> </table>

<br/>

Features at a Glance

<table> <tr> <td align="center" width="33%"><h3>โšก Parser</h3>Zero-copy tokenizer<br/>Recursive descent parser<br/>Full AST generation<br/>Multi-dialect engine</td> <td align="center" width="33%"><h3>๐Ÿ›ก๏ธ Analysis</h3>SQL injection scanner<br/>10 lint rules (L001โ€“L010)<br/>Query complexity scoring<br/>Metadata extraction</td> <td align="center" width="33%"><h3>๐Ÿ”ง Tooling</h3>AST-based formatter<br/>Query transforms API<br/>VS Code extension<br/>GitHub Action</td> </tr> <tr> <td align="center"><h3>๐ŸŒ Multi-Dialect</h3>PostgreSQL ยท MySQL<br/>SQL Server ยท Oracle<br/>SQLite ยท Snowflake</td> <td align="center"><h3>๐Ÿค– AI-Ready</h3>MCP server (7 tools)<br/>Public remote endpoint<br/>Streamable HTTP</td> <td align="center"><h3>๐Ÿงช Battle-Tested</h3>20K+ concurrent ops<br/>Zero race conditions<br/>~85% SQL-99 compliance</td> </tr> </table>

<br/>

Documentation

Resource Description
๐ŸŒ gosqlx.dev Website with interactive playground
๐Ÿš€ Getting Started Parse your first SQL in 5 minutes
๐Ÿ“– Usage Guide Comprehensive patterns and examples
๐Ÿ“„ API Reference Complete API documentation
๐Ÿ–ฅ๏ธ CLI Guide Command-line tool reference
๐ŸŒ SQL Compatibility Dialect support matrix
๐Ÿค– MCP Guide AI assistant integration
๐Ÿ—๏ธ Architecture System design deep-dive
๐Ÿ“Š Benchmarks Performance data and methodology
๐Ÿ“ Release Notes What's new in each version

<br/>

Contributing

GoSQLX is built by contributors like you. Whether it's a bug fix, new feature, documentation improvement, or just a typo - every contribution matters.

git clone https://github.com/ajitpratap0/GoSQLX.git && cd GoSQLX
task check    # fmt โ†’ vet โ†’ lint โ†’ test (with race detection)
  1. Fork & branch from main
  2. Write tests - we use TDD and require race-free code
  3. Run task check - must pass before PR
  4. Open a PR - we review within 24 hours

๐Ÿ“‹ Contributing Guide ยท ๐Ÿ“œ Code of Conduct ยท ๐Ÿ›๏ธ Governance

<br/>

Community

<div align="center">

Got questions? Ideas? Found a bug?

<a href="https://github.com/ajitpratap0/GoSQLX/discussions"><img src="https://img.shields.io/badge/๐Ÿ’ฌ_Discussions-Ask_&Share-purple?style=for-the-badge" alt="Discussions"></a> <a href="https://github.com/ajitpratap0/GoSQLX/issues/new/choose"><img src="https://img.shields.io/badge/๐Ÿ›_Issues-Report&_Request-red?style=for-the-badge" alt="Issues"></a> <a href="https://gosqlx.dev/blog/"><img src="https://img.shields.io/badge/๐Ÿ“_Blog-Release_Notes-green?style=for-the-badge" alt="Blog"></a>

</div>

<br/>

License

Apache License 2.0 - see LICENSE for details.


<div align="center">

<sub>Built with โค๏ธ by the GoSQLX community</sub>

gosqlx.dev ยท Playground ยท Docs ยท MCP Server ยท VS Code

<br/>

If GoSQLX helps your project, consider giving it a โญ

</div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured