GoSQLX
Pure-Go SQL parser, formatter, linter and security scanner for 8 dialects.
Power your agent
URL của chính nhà phát hành. Không phải endpoint của PlugMCP.
Host a copy with our keys and logs.
https://mcp.gosqlx.dev/mcpNút Claude ở trên mở Claude với tên và URL đã được điền sẵn. Bạn vẫn cần xác nhận tại đó.
claude mcp add --transport http io.github.ajitpratap0-gosqlx https://mcp.gosqlx.dev/mcpRun in a terminal.
{ "mcpServers": { "io.github.ajitpratap0-gosqlx": { "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.gosqlx.dev/mcp" ] } }}claude_desktop_config.json
URL từ xa hay một lệnh trên máy của bạn? Hai cách cài đặt khác nhau thế nào
Chạy trên PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
MởPlayground · Docs · Benchmarks · VS Code · MCP server
† Parse stage only (pre-tokenized input to AST), SELECT id, name FROM users, Apple M4, Go 1.27, median of 20 runs of BenchmarkPerformanceBaseline. Complex queries take longer (see performance_baselines.json). Reproduce: go test -run ^$ -bench BenchmarkPerformanceBaseline -benchmem -count=20 ./pkg/sql/parser/.
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 - parsing a simple SELECT in about 349 ns (~2.9M parses/sec).
go get github.com/ajitpratap0/GoSQLX
go install github.com/ajitpratap0/GoSQLX/cmd/gosqlx@latest
code --install-extension ajitpratap0.gosqlx
The extension bundles the binary, so there is no extra setup. Learn more.
claude mcp add --transport http gosqlx https://mcp.gosqlx.dev/mcp
7 SQL tools in Claude, Cursor, or any MCP client. MCP guide.
Claude Code plugin (skills, slash commands, SQL reviewer agent): /plugin marketplace add ajitpratap0/GoSQLX then /plugin install gosqlx@gosqlx - details.
ChatGPT app: add https://mcp.gosqlx.dev/mcp as a connector in developer mode for an interactive analysis widget - details.
- uses: ajitpratap0/GoSQLX@v1
with:
files: '**/*.sql'
validate: true
Source: examples/readme_quickstart/main.go, compiled in CI against HEAD and the latest release.
package main
import (
"context"
"errors"
"fmt"
"log"
"github.com/ajitpratap0/GoSQLX/pkg/gosqlx"
"github.com/ajitpratap0/GoSQLX/pkg/sql/ast"
)
func main() {
ctx := context.Background()
// ParseTree is the recommended entry point. It returns an
// opaque handle with built-in helpers.
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.
}
Output:
Tables: [users]
SELECT id, name
FROM users
WHERE active = true
SELECT with 2 columns
Formatting turns one-line SQL into a readable query:
gosqlx highlight query.sql or gosqlx.HighlightANSI(sql).--dialect flag and WithDialect accept 11 names: those 8 (postgresql, mysql, mariadb, sqlserver, oracle, sqlite, snowflake, clickhouse) plus generic, bigquery and redshift. BigQuery and Redshift have no dialect-specific keyword set (they use the generic keywords) and only capability-gated grammar, such as BigQuery's QUALIFY, PIVOT/UNPIVOT, UNNEST in FROM and (struct).field access.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 PRQuestions or ideas: Discussions. Found a bug or want a feature: Issues.
Apache License 2.0 - see LICENSE for details.
gosqlx.dev · Playground · Docs · MCP Server · VS Code
SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.
{ "mcpServers": { "io.github.ajitpratap0-gosqlx": { "url": "https://mcp.gosqlx.dev/mcp", "headers": {} } }}Công cụ
Chưa có danh sách công cụ. Máy chủ từ xa sẽ có danh sách sau lần kiểm tra tình trạng đầu tiên.
Câu hỏi thường gặp
Sao chép cấu hình http cho Cursor, Claude Desktop, Claude Code hoặc VS Code trên trang này. Cấu hình dùng bản cài đặt của nhà phát hành, không phải proxy của PlugMCP.
Bản ghi này không liệt kê biến môi trường bắt buộc nào.
GoSQLX được truy cập qua HTTP.
Kiểm tra lần cuối: 2026-11-13. SQL validation, formatting, parsing, metadata extraction, linting, and security analysis.