SQLike

SQLike

Deterministic SQL static analysis and query-equivalence checking for Postgres, MySQL, SQLite, and SQL Server. Tokenizes locally before forwarding to the API.

Category
Visit Server

README

sqlike: MCP server & clients

@sqlike/mcp @sqlike/cli license

Deterministic SQL static analysis and query-equivalence checking for Postgres, MySQL, SQLite, and SQL Server, as an MCP server, a CLI, and a shared client library. Part of sqlike.

These are thin remote clients. They tokenize your SQL locally (identifiers and literals are masked before anything leaves your machine) and forward the tokenized query to the sqlike API for analysis. They contain no analysis engine; that runs server-side and is closed.

Install the MCP server

Add it to any MCP client (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "sqlike": { "command": "npx", "args": ["-y", "@sqlike/mcp"] }
  }
}

Or install via Smithery. An optional SQLIKE_API_KEY environment variable raises rate limits; without it you get the open anonymous tier.

Tools

analyze

Static analysis of one SQL query: validity, anti-patterns, suggested rewrites, and schema/index advice. Returns the JSON analysis envelope.

Argument Type Description
sql string The SQL query to analyze. Required.
schema string Optional DDL (CREATE TABLE / CREATE INDEX) for column- & type-aware checks.
dialect string postgres (default), mysql, sqlite, or mssql.
allow_raw boolean Only used when a query fails to parse (so can't be tokenized): send raw SQL for a parse diagnostic. Default false.

diff

Check whether two SQL queries are equivalent (result-preserving), for verifying a rewrite or refactor. Returns a verdict (Equivalent / EquivalentWithNotes / Differs / Undecided), a confidence level, and a per-property report (columns, rows, cardinality, order). Undecided never means equivalent. This is a judgement an LLM cannot reliably self-grade.

Argument Type Description
sql_a string The original query. Required.
sql_b string The rewritten query to check against sql_a. Required.
schema string Optional DDL both queries resolve against (one shared schema).
dialect string postgres (default), mysql, sqlite, or mssql.

CLI

crates/cli builds sqlike, a command-line client:

sqlike check "SELECT * FROM users WHERE id = 1" --remote https://api.sqlike.com

What's here

  • crates/mcp: sqlike-mcp, the MCP server. Ships to npm as @sqlike/mcp.
  • crates/cli: sqlike, the command-line client.
  • crates/client: the shared, engine-free forwarder: tokenize → call API → detokenize.
  • crates/core-parse: the SQL parser, stage model, tokenizer, and result types.
  • packages/: the npm packaging for @sqlike/mcp (per-platform prebuilt binaries).

Privacy

Tokenization happens here, on your machine, before any request. If a query can't be parsed it can't be tokenized; the client then refuses to send it rather than transmit raw SQL, unless you explicitly opt in (allow_raw / --allow-raw).

Note

This repository is generated from the upstream monorepo (the source of truth). Please file issues here; code changes are made upstream and mirrored.

License

MIT OR Apache-2.0, at your option.

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
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
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
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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured