SqlToAi
Local Windows MCP server for SQL Server schema discovery, queries and plan comparison
SqlToAi is an open-source MCP server for databases. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- Windows, CLI, Self-hosted
- Runs
- Locally
- What it can do
- Can change data (1 tool)
- Version
- 1.0.34
Similar MCP servers
Install
In Claude Desktop → Settings → Extensions
https://github.com/RalfHuesing/SqlToAi/releases/download/v1.0.34/SqlToAi-win-x64.mcpbDownload the bundle and open it with Claude Desktop, or drag it onto Settings → Extensions and click Install. This server is only published as a Claude Desktop bundle.
Using several servers? Build one config file with the MCP config generator.
About SqlToAi
Built on .NET 10 and run over stdio, this server targets Microsoft SQL Server on Windows x64. It reads version, edition and compatibility level, inspects tables, views, routines, triggers, keys and indexes, and exports the schema as linked Markdown files for offline reading, even without starting the server.
Beyond metadata it can show estimated execution plans without running a query, run parameterized queries and .sql scripts with GO batches, stream results into CSV or JSONL files, and measure CPU time, elapsed time and reads so a baseline query can be compared with a candidate, including missing-index suggestions.
Access is configured per database: schema-only, read-only, read-write, and anonymized variants that mask strings or swap them for reversible tokens. The README stresses that these checks complement SQL Server permissions, that masking is not a guarantee, and that a restricted login should still be used.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 3 tools changes data.
From the server's own tool labels and tool names; not verified by us.
- sql_list_databasesName suggests: reads
- List databases on a configured server.
- sql_execute_queryName suggests: changes
- Run a query on a configured database.
- sql_explain_queryName suggests: reads
- Show the estimated execution plan for a query.
What it does
- Schema inspection
- Reads tables, views, routines, triggers, keys, indexes and references.
- Execution plans
- Shows estimated plans with warnings without executing queries.
- Query benchmarking
- Compares CPU, elapsed time and reads between two queries.
- File streaming
- Writes query results straight to CSV or JSONL.
- Access levels
- Schema-only through read/write, per database.
- String masking
- Masks or tokenizes string results in anonymized databases.
Good for
- Document a SQL Server database as Markdown
- Compare an optimized query with its original
- Let an assistant explore a reporting database read-only
- Export query results to CSV without pasting them into chat
Pricing
Open source
MIT licensed
SqlToAi FAQ
Which platforms are supported?
Windows x64; the package is self-contained and needs no separate .NET runtime.
Where is SqlToAi configured?
In %LOCALAPPDATA%\SqlToAi\appsettings.json, created manually from the template.
Is read-only mode enough?
The README says application checks complement SQL Server permissions, so use a restricted login too.
Does masking guarantee privacy?
No. Numbers, dates and plan content can remain visible.
Is SqlToAi free?
Yes. SqlToAi is open source, so you can use and self-host it for free.
What are the best alternatives to SqlToAi?
The closest alternatives to SqlToAi are Midplane, Datatomcp, Gulliver, GaussDB Read-Only MCP and Zektor.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.