loading…
Search for a command to run...
loading…
7 SQL tools (validate, format, parse, lint, security scan, metadata extraction, full analysis) over Streamable HTTP. Public remote server at mcp.gosqlx.dev - no
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.

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 latency | 85% SQL-99 | 8 dialects | 0 race conditions |
|---|
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)))
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.
}
📦 Go Library
🖥️ CLI Tool
|
💻 VS Code Extension
Bundles the binary - zero setup. Learn more → 🤖 MCP Server (AI Integration)
7 SQL tools in Claude, Cursor, or any MCP client. Guide → |
⚡ ParserZero-copy tokenizerRecursive descent parser Full AST generation Multi-dialect engine |
🛡️ AnalysisSQL injection scanner30 lint rules (L001–L030) 20 optimizer rules Metadata extraction |
🔧 ToolingAST-based formatterQuery transforms API VS Code extension GitHub Action |
🌐 Multi-DialectPostgreSQL · MySQL · MariaDBSQL Server · Oracle SQLite · Snowflake · ClickHouse |
🤖 AI-ReadyMCP server (7 tools)Public remote endpoint Streamable HTTP |
🧪 Battle-Tested20K+ concurrent opsZero race conditions ~85% SQL-99 compliance |
| 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 |
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)
maintask check - must pass before PR📋 Contributing Guide · 📜 Code of Conduct · 🏛️ Governance
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 / Company | Use Case |
|---|---|
| Your project here | Add 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.
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 ⭐
Выполни в терминале:
claude mcp add ajitpratap0-gosqlx -- npx pro-tip
Поставил ajitpratap0/GoSQLX? Скажи Claude: «запомни почему я установил ajitpratap0/GoSQLX и что хочу попробовать» — попадёт в твой Vault.
как это работает →CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.