ajitpratap0/GoSQLX

๐Ÿ’ป Developer Tools๐ŸŸข Verified Active
0 Views
0 Installs

๐ŸŽ๏ธ โ˜๏ธ ๐Ÿ  - 7 SQL tools (validate, format, parse, lint, security scan, metadata extraction, full analysis) over Streamable HTTP. Public remote server at mcp.gosqlx.dev - no install needed. 1.25M+ ops/sec, 6 SQL dialects.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "ajitpratap0-gosqlx": {
      "command": "npx",
      "args": [
        "-y",
        "ajitpratap0-gosqlx"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

GoSQLX

GoSQLX Logo

Parse SQL at the speed of Go

Go Version Release License PRs Welcome

Website VS Code MCP Glama MCP Server Lint Action

Tests Go Report GoDoc Stars OpenSSF Scorecard


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


1.38M+ ops/sec<1ฮผs latency85% SQL-998 dialects0 race conditions

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.38M+ operations per second with sub-microsecond latency.

// v1.15+ recommended entry point: ParseTree returns an opaque Tree,
// so you don't need to import pkg/sql/ast just to get started.
tree, _ := gosqlx.ParseTree(ctx, "SELECT u.name, COUNT(*) FROM users u JOIN orders o ON u.id = o.user_id GROUP BY u.name",
    gosqlx.WithDialect("postgresql"))
fmt.Println("Tables:", tree.Tables())
fmt.Println(tree.Format(gosqlx.WithIndent(2), gosqlx.WithUppercaseKeywords(true)))

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, MariaDB, SQL Server, Oracle, SQLite, Snowflake, ClickHouse. CTEs, window functions, MERGE, set operations.
  • Not just a library - CLI, VS Code extension, GitHub Action, MCP server, WASM playground, Python bindings.

Get Started in 60 Seconds

go get github.com/ajitpratap0/GoSQLX
package main

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

func main() {
    ctx := context.Background()

    // ParseTree (v1.15+) is the recommended entry point. It returns an
    // opaque handle with built-in helpers โ€” no need to import pkg/sql/ast.
    tree, err := gosqlx.ParseTree(ctx, "SELECT id, name FROM users WHERE active = true",
        gosqlx.WithDialect("postgresql"))
    if err != nil {
        // Sentinel errors work with errors.Is
        if errors.Is(err, gosqlx.ErrSyntax) {
            log.Fatalf("syntax error: %v", err)
        }
        log.Fatal(err)
    }
    fmt.Println("Tables:", tree.Tables())
    fmt.Println(tree.Format(gosqlx.WithIndent(2), gosqlx.WithUppercaseKeywords(true)))

    // Walk the AST โ€” typed walkers avoid the type-assertion dance:
    tree.WalkSelects(func(s *ast.SelectStatement) bool {
        fmt.Printf("  SELECT with %d columns\n", len(s.Columns))
        return true
    })

    // The legacy Parse/Format/Validate API still works for v1.x code.
    // See docs/MIGRATION.md for the Tree migration guide.
}

Install Everywhere

๐Ÿ“ฆ 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

๐Ÿ’ป 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 โ†’


Features at a Glance

โšก Parser

Zero-copy tokenizer
Recursive descent parser
Full AST generation
Multi-dialect engine

๐Ÿ›ก๏ธ Analysis

SQL injection scanner
30 lint rules (L001โ€“L030)
20 optimizer rules
Metadata extraction

๐Ÿ”ง Tooling

AST-based formatter
Query transforms API
VS Code extension
GitHub Action

๐ŸŒ Multi-Dialect

PostgreSQL ยท MySQL ยท MariaDB
SQL Server ยท Oracle
SQLite ยท Snowflake ยท ClickHouse

๐Ÿค– AI-Ready

MCP server (7 tools)
Public remote endpoint
Streamable HTTP

๐Ÿงช Battle-Tested

20K+ concurrent ops
Zero race conditions
~85% SQL-99 compliance

Documentation

ResourceDescription
๐ŸŒgosqlx.devWebsite with interactive playground
๐Ÿš€Getting StartedParse your first SQL in 5 minutes
๐Ÿ“–Usage GuideComprehensive patterns and examples
๐Ÿ“„API ReferenceComplete API documentation
๐Ÿ–ฅ๏ธCLI GuideCommand-line tool reference
๐ŸŒSQL CompatibilityDialect support matrix
๐Ÿค–MCP GuideAI assistant integration
๐Ÿ—๏ธArchitectureSystem design deep-dive
๐Ÿ“ŠBenchmarksPerformance data and methodology
๐Ÿ“Release NotesWhat's new in each version

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


Who's Using GoSQLX?

GoSQLX is downloaded and cloned by developers worldwide -- 595 unique cloners in just 14 days. If you're using GoSQLX in your project or organization, we'd love to hear about it!

Project / CompanyUse Case
Your project hereAdd yourself via PR or tell us in Discussions

Using GoSQLX at work? Building something cool with it? Share your story in GitHub Discussions -- it helps the community grow and motivates continued development.


Community

Got questions? Ideas? Found a bug?

Discussions Issues Blog


License

Apache License 2.0 - see LICENSE for details.


Built with โค๏ธ by the GoSQLX community

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


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

Related MCP Servers

Moxie-Docs-MCPโ˜… Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

๐Ÿ’ป Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

๐Ÿ“‡ โ˜๏ธ ๐ŸŽ ๐ŸชŸ ๐Ÿง - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

๐Ÿ’ป Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

๐Ÿ’ป Developer Tools0 views
a-25/ios-mcp-code-quality-server

๐Ÿ“‡ ๐Ÿ  ๐ŸŽ - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

๐Ÿ’ป Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Active

Recent health check succeeded.

Last checked: 7/28/2026, 10:45:07 AM

Unclaimed listing (imported or pending owner verification). Claim it โ†’
โ˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.