SQL Server MCP
Resumen
Descripción del creador (original en inglés)
MCP server for DBAs running dozens of SQL Server instances: grouped connections, plans, indexes
Los tres pilares de PopNx MCP
Estos tres nunca se combinan en una sola puntuación: las opiniones, las mediciones y la popularidad son cosas distintas.
- Opinión de usuariosiAún no hay reseñasLas reseñas se abrirán junto con las cuentas en una etapa posterior
- Nuestras revisiones básicasi1 de 1 superadasRevisado con información pública; el código aún no se ha escaneado
- UsoiMuy nuevo↓ 70/sem · ★ –
Qué puedes hacer con él
Todavía no escribimos un resumen sencillo para este. Abajo están los datos que leímos del registro.
- Conexión: Se ejecuta en tu computadora
- Transporte: stdio
- Categoría: Bases de datos y conjuntos de datos
- Debes completar: MSSQL_MCP_CONNECTIONS_JSON
Instalación
Elige la app de IA que usas y copia la configuración.
Antes de instalar
- Revisiones básicas: 1 de 1 superadas
- Se ejecuta en tu computadora con los permisos de tu usuario (archivos, red, apps).
- Debes completar tú:
MSSQL_MCP_CONNECTIONS,MSSQL_MCP_CONNECTIONS_JSON
Los valores marcados como secretos son llaves de tu cuenta. Nunca los compartas ni los pegues en un chat.
Necesitas
- npmNode.js instalado (para el comando npx)
¿Qué app usas?
Elige tu app arriba. La recordamos, así que la próxima vez el botón dirá “Instalar en …”.
Abre Claude Desktop → Settings → Developer → Edit Config y pega esto en claude_desktop_config.json
{
"mcpServers": {
"sqlserver": {
"command": "npx",
"args": [
"-y",
"@cevelas/mcp-sqlserver"
],
"env": {
"MSSQL_MCP_CONNECTIONS": "your-value",
"MSSQL_MCP_CONNECTIONS_JSON": "your-value"
}
}
}
}Ejecuta esto en tu terminal
claude mcp add sqlserver --env MSSQL_MCP_CONNECTIONS=your-value --env MSSQL_MCP_CONNECTIONS_JSON=your-value -- npx -y @cevelas/mcp-sqlserverCompleta los valores vacíos antes de ejecutarlo.
O copia la configuración tú
Pégalo en .cursor/mcp.json de tu proyecto, o en ~/.cursor/mcp.json
{
"mcpServers": {
"sqlserver": {
"command": "npx",
"args": [
"-y",
"@cevelas/mcp-sqlserver"
],
"env": {
"MSSQL_MCP_CONNECTIONS": "your-value",
"MSSQL_MCP_CONNECTIONS_JSON": "your-value"
}
}
}
}Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.
O copia la configuración tú
Pégalo en .vscode/mcp.json de tu proyecto
{
"servers": {
"sqlserver": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@cevelas/mcp-sqlserver"
],
"env": {
"MSSQL_MCP_CONNECTIONS": "your-value",
"MSSQL_MCP_CONNECTIONS_JSON": "your-value"
}
}
}
}Tu navegador te pide permiso para abrir la app; luego la app muestra la configuración y te pide confirmar. Los valores de las claves quedan vacíos para que los completes tú.
Este se ejecuta en tu computadora, y ChatGPT solo puede conectarse a servidores en internet. Elige otra app.
Tu elección se guarda en una cookie en este dispositivo; no necesitas cuenta.
Valores que debes completar
MSSQL_MCP_CONNECTIONSenvPath to connections.json. Defaults to ~/.mcp-sqlserver/connections.json; create one with --init.- The connections JSON inline, for setups that keep credentials out of the filesystem.
Esta configuración se genera a partir de la ficha del creador en el registro. Si el README dice otra cosa, sigue el README.
Qué puede hacer
Se ejecuta en tu computadora; la lista de herramientas aparece en tu app de IA después de instalarlo.
Revisiones básicasi
Revisamos información que cualquiera puede ver; no hemos leído el código. Las revisiones que no aplican no se cuentan. · Revisado el 8 nov 2026
- ✓ Superada
El creador coincide con el repo
El nombre en el registro se verificó con la cuenta de GitHub cvelasquez, dueña del repo
- … Aún sin revisar
Sigue en mantenimiento
Todavía no hemos leído este repo en GitHub
- … Aún sin revisar
Tiene licencia
Todavía no hemos leído este repo en GitHub
- – No aplica
El endpoint responde
Este se ejecuta en tu computadora; no hay endpoint en internet
- – No aplica
Inicio de sesión con OAuth
Se ejecuta en tu computadora y usa ajustes locales en su lugar
- … Aún sin revisar
Sin instrucciones ocultas en las descripciones de herramientas
Se ejecuta en tu computadora; solo podemos leer listas de herramientas de endpoints en internet
Comparado con otros en Bases de datos y conjuntos de datosi
- Más estrellas que el 0% de los otros 1146 servidores de esta categoría
- Publicado en el registro más recientemente que el 64% de los otros 1146 servidores de esta categoría
- Revisiones básicas iguales o mejores que el 100% de los otros 1146 servidores de esta categoría
Comparado con todos los servidores activos de esta categoría en el registro. Las estrellas solo cuentan cuando quien lo publica es dueño del repo.
Preguntas frecuentes
¿Es seguro SQL Server MCP?
Superó 1 de 1 revisiones básicas aplicables. No hemos leído el código. Antes de agregar una clave o un token, revisa qué acceso pide el servidor y usa una clave que tenga solo los permisos que necesitas.
¿Qué claves o códigos necesita?
Debes completar: MSSQL_MCP_CONNECTIONS_JSON
¿Se ejecuta en mi computadora o en la nube?
Se ejecuta en tu computadora. Tu app de IA lo inicia cuando hace falta, y los datos no pasan por los servidores del creador (a menos que el propio servidor llame a un servicio en línea).
¿Sigue en mantenimiento?
El repo de GitHub cambió por última vez –, y la última versión (3.3.0) llegó al registro hace 27 días.
¿Qué apps pueden usarlo?
Las apps compatibles con MCP, como Claude Desktop, Claude Code, Cursor y VS Code. También necesitas Node.js en tu computadora.
¿Qué puedo usar en su lugar?
En la misma categoría: Supabase, MongoDB MCP Server, Elasticsearch MCP Server
Alternativas
Servidores de la misma categoría hechos por otros creadores, ordenados por estrellas.
Cómo leer una tarjeta:↓ Descargas por semanai★ Estrellas de GitHubiTres pilares: reseñas · revisiones · usoiActualizado = fecha en que se publicó la última versión en el registroi
README del creador
Abrir el README
Copiado tal cual del repo del creador. PopNx MCP no lo ha revisado ni lo respalda. Se quitaron HTML, imágenes y scripts. Los enlaces llevan fuera de este sitio.
SQL Server MCP for people who manage dozens of instances
One MCP entry, every SQL Server you administer. Connections live in a single connections.json, grouped by client or environment, hot-reloaded without restarting your AI agent — plus execution plans, index audits and stored-procedure analysis.
Built for DBAs and consultants, not for a demo against a single localhost database.
Install
Add this to your AI agent's MCP configuration:
{
"mcpServers": { "sqlserver": { "command": "npx", "args": ["-y", "@cevelas/mcp-sqlserver"] } } }
Then create your connections file and restart the agent:
npx -y @cevelas/mcp-sqlserver --init
That writes ~/.mcp-sqlserver/connections.json from a commented template. Edit it, and ask your agent to *"list all SQL Server connections"*.
Needs Node.js 22 or newer.
Where each agent keeps its MCP config
| Agent | Config file |
|---|---|
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Code | claude mcp add sqlserver -- npx -y @cevelas/mcp-sqlserver |
| VS Code / Copilot | .vscode/mcp.json |
| Cursor | ~/.cursor/mcp.json |
Any MCP-compatible agent works — ChatGPT, Gemini, Copilot, Cline, Zed and others all take the same command / args pair.
Why this one
Most SQL Server MCP servers take a single connection string. That is fine for one database. It falls apart when you administer thirty across eight clients, because every instance needs its own entry in the agent config, its own credentials, and its own restart when something changes.
| Single-DSN servers | This one | |
|---|---|---|
| Instances per MCP entry | 1 | all of them |
| Organised by client or environment | — | connectionGroup |
| Add or change a connection | edit agent config, restart | edit a file, reload_connections |
| Which server answered? | you assume | in every response's metadata |
Beyond SELECT | — | execution plans, index layout, SP source |
| Read-only safety rail | — | "readOnly": true per connection |
Connections
{
"connections": [ { "name": "acme-prod", "connectionGroup": "Acme Corp", "description": "Production - head office", "server": "192.168.1.10\\SQLEXPRESS", "database": "AcmeDB_Prod", "user": "app_reader", "password": "${env:ACME_PROD_PASSWORD}", "port": 1433, "encrypt": true, "trustServerCertificate": false, "readOnly": true } ] }
| Field | Required | Notes |
|---|---|---|
name | yes | Unique; this is what you say to the agent |
server | yes | Hostname, IP, or host\instance |
connectionGroup | no | Client, project or environment. Groups the listing |
description | no | Shown in list_connections and in every response |
database | no | Defaults to the login's default database |
user, password | no | Omit for domain or Entra ID auth |
port | no | Defaults to 1433 |
encrypt, trustServerCertificate | no | encrypt defaults to true |
readOnly | no | Rejects writing statements — see below |
Anything else you put here is passed straight to mssql, so requestTimeout, connectionTimeout, pool, authentication and a nested options object all work.
Keeping passwords out of the file
Any string may reference an environment variable:
"password": "${env:ACME_PROD_PASSWORD}"
A connection that references a variable you have not set is disabled, and list_connections names both the connection and the missing variable. Leaving the literal in place would only move the failure to connect time, where it arrives as Login failed for user and tells you nothing.
You can also skip the file entirely and pass the whole thing through the agent config, which keeps credentials in one place with the rest of your MCP secrets:
{
"mcpServers": { "sqlserver": { "command": "npx", "args": ["-y", "@cevelas/mcp-sqlserver"], "env": { "MSSQL_MCP_CONNECTIONS_JSON": "{\"connections\":[{\"name\":\"prod\",\"server\":\"10.0.0.1\",\"database\":\"App\",\"user\":\"reader\",\"password\":\"...\"}]}" } } } }
Where the file is looked for
In order, first hit wins:
--connections$MSSQL_MCP_CONNECTIONS— a path$MSSQL_MCP_CONNECTIONS_JSON— the JSON itself, inline./connections.jsonin the working directory~/.mcp-sqlserver/connections.jsonconnections.jsonnext to the installed package
A path given explicitly via 1 or 2 that does not exist is an error — the server will not quietly fall back to a different file and talk to the wrong database.
Checking every connection at once
npx -y @cevelas/mcp-sqlserver --check
Connects to every entry in parallel, runs SELECT 1, and lists which ones fail and why. Exits non-zero if any did, so it works in a scheduled task. Useful after a password rotation, or before blaming the agent.
Windows domain and Entra ID authentication
The bundled tedious driver supports NTLM and the Entra ID (Azure AD) family. Add domain for NTLM:
{
"name": "warehouse", "server": "dwh.corp.local", "database": "DWH", "domain": "CORP", "user": "svc_analytics", "password": "${env:DWH_PASSWORD}" }
{
"name": "azure-sql", "server": "myserver.database.windows.net", "database": "reporting", "encrypt": true, "authentication": { "type": "azure-active-directory-password", "options": { "userName": "${env:AZURE_USER}", "password": "${env:AZURE_PASSWORD}" } } }
Fully integrated auth — a trusted connection with no password at all — needs the native msnodesqlv8 driver, which is not bundled because it would break the one-line install on machines without a build toolchain. NTLM with an explicit service account is the supported path.
Tools
| Tool | Arguments | What it does |
|---|---|---|
list_connections | — | Every connection, grouped |
reload_connections | — | Re-read the file, drop open pools |
query | connection, sql, maxRows?, format? | Run a query |
get_schema | connection, table? | Columns, types, nullability, defaults |
get_indexes | connection, table | Indexes, types, key and included columns |
get_execution_plan | connection, sql | SHOWPLAN_XML — the plan, without running the query |
get_stored_procedure | connection, name | Source of a stored procedure |
Every response carries the connection it came from:
{
"metadata": { "connection": "acme-prod", "connectionGroup": "Acme Corp", "description": "Production - head office", "server": "192.168.1.10\\SQLEXPRESS", "database": "AcmeDB_Prod" }, "data": [ ... ] }
With thirty connections in play, that line is what tells you the answer came from the client you meant.
Query results that fit in a context window
An agent that runs SELECT * FROM Orders does not need four million rows, and neither does its context window.
- Row cap.
queryreturns at most 1000 rows across all result sets.maxRowschanges that, up to 10000. When the cap is hit the query is *cancelled on the server*, not trimmed afterwards. - A truncated result says so, first. The response opens with
"truncated": trueand a note stating that more rows exist, that the total is unknown, and how to get it. It sits *before* the rows on purpose: a 10000-row response runs to hundreds of KB, and a client that cuts long output keeps the beginning. An agent must never conclude "the table has 10000 rows" from a capped result. Asking for more than 10000 is not an error — the cap is lowered to 10000, and if rows were left out the note says what was asked for. - `format: "csv"`. JSON repeats every column name on every row. With
csvthe response is one JSON header line with the metadata, a blank line, then the rows.NULLis an empty cell and an empty string is"", so the two stay distinguishable. - Server messages.
PRINToutput andSET STATISTICS IO, TIME ONresults come back inmessages, so the agent can read logical reads and CPU time instead of guessing. - Every result set. A batch with several
SELECTs returns them all inrecordsets.datais still the first one. - Binary columns come back as hex (
0x8f3a...), truncated after 64 bytes, instead of a JSON array with one number per byte.
rowCount is always present; truncated, messages and recordsets only appear when they have something to say. Responses are compact JSON.
What this gets you
Things that are tedious by hand and become one sentence to the agent:
- *"Why is this stored procedure slow?"* —
get_stored_procedurefor the source,get_execution_planfor the plan,get_indexesfor what is missing. - *"Compare the Orders schema between acme-prod and acme-qa"* —
get_schemaon both, agent diffs them. - *"Which indexes on this table are never covering anything?"* —
get_indexesplus the queries you care about. - *"I added a client to connections.json"* —
reload_connections, no restart.
Read-only connections
"readOnly": true
Rejects INSERT, UPDATE, DELETE, MERGE, DROP, TRUNCATE, ALTER, CREATE, GRANT, EXEC, BACKUP, DBCC, OPENQUERY, DISABLE/ENABLE and friends before the query leaves your machine. It also requires the batch to *start* with something that reads — SELECT, WITH, DECLARE, SET, IF and so on — because T-SQL lets you call a procedure without EXEC, and sp_rename 'dbo.Users','Users_old' contains no blocked keyword at all.
String literals, comments and bracketed identifiers are ignored, so WHERE note = 'please delete this', SELECT [delete] FROM [Audit] and DECLARE @Create DATETIME all pass. get_execution_plan still works, because SHOWPLAN_XML returns the plan without executing anything.
Anything other than an explicit false turns the guard on — a hand-written "readOnly": "false" locks the connection down rather than silently opening it, and says so in list_connections.
This is a guard rail, not a security boundary. It stops an agent from "helpfully" fixing a row in production. It will not stop someone determined to write. The real protection is a SQL login that only has db_datareader:
CREATE LOGIN mcp_reader WITH PASSWORD = '...';
CREATE USER mcp_reader FOR LOGIN mcp_reader; ALTER ROLE db_datareader ADD MEMBER mcp_reader; GRANT VIEW DEFINITION TO mcp_reader; -- for get_stored_procedure GRANT SHOWPLAN TO mcp_reader; -- for get_execution_plan
Use both.
Security notes
connections.jsonholds credentials. Keep it out of version control — the bundled.gitignorecoversconnections*.json.- Prefer
${env:VAR}over literal passwords. - Give each connection the least privilege it needs. Do not use
sa. - Restrict file permissions:
icacls connections.json /inheritance:r /grant:r "%USERNAME%:F"on Windows,chmod 600 connections.jsonelsewhere. - The
querytool runs whatever SQL the agent writes. That is the point of the tool — treat the connection's permissions as the boundary, not the tool.
Web UI
`web/conne
Solo se muestra el principio; lee el resto en el repo