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
访问服务器

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>

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选