Microsoft SQL Server MCP
@adriancy/mcp-mssql
MCP-Server (stdio) für Microsoft SQL Server. Stellt Tools bereit, damit Cursor (oder jeder andere MCP-Client) Tabellen auflisten, Spalten beschreiben und leseorientiertes T-SQL ausführen kann.
Verwendung in Cursor
Öffnen Sie Cursor Settings → MCP (oder bearbeiten Sie Ihre MCP-JSON-Datei).
Fügen Sie einen Server-Block hinzu. Setzen Sie
envauf Ihre Datenbank (siehe.env.example).
Von npm (nachdem das Paket veröffentlicht wurde):
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": ["-y", "@adriancy/mcp-mssql"],
"env": {
"MSSQL_SERVER": "localhost",
"MSSQL_USER": "your_user",
"MSSQL_PASSWORD": "your_password",
"MSSQL_DATABASE": "your_database",
"MSSQL_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}Von einem lokalen Klon (führen Sie zuerst pnpm install && pnpm build aus):
{
"mcpServers": {
"mssql": {
"command": "node",
"args": ["/absolute/path/to/mssql-mcp/dist/index.js"],
"env": {
"MSSQL_SERVER": "localhost",
"MSSQL_USER": "your_user",
"MSSQL_PASSWORD": "your_password",
"MSSQL_DATABASE": "your_database",
"MSSQL_TRUST_SERVER_CERTIFICATE": "true"
}
}
}
}Verwenden Sie node für lokale Dateien. Vermeiden Sie pnpm als MCP-command – zusätzliche Ausgaben auf stdout können das Protokoll unterbrechen.
Bestätigen Sie, dass der Installationsname mit npm übereinstimmt: npm view @adriancy/mcp-mssql version.
Related MCP server: MSSQL Database MCP Server
Umgebung
Alle Variablen werden aus der MCP-Prozessumgebung gelesen (z. B. Cursor env). Boolesche Werte behandeln 1, true, yes, on (Groß-/Kleinschreibung ignoriert) als wahr und 0, false, no, off als falsch. Ungültige boolesche Werte und Ganzzahlen führen zum Abbruch der Startvalidierung.
Variable | Erforderlich | Standard | Bedeutung |
| ja | — | Hostname oder IP des SQL Servers |
| ja† | — | Anmeldebenutzer (SQL-Authentifizierung, NTLM, Azure AD-Passwort); nicht verwendet für |
| ja*† | — | Anmeldekennwort (*kann bei einigen Setups leer sein) |
| ja | — | Ursprüngliche Datenbank |
| nein |
| TCP-Port; weglassen bei Verwendung von |
| nein |
| TLS |
| nein |
| Selbstsigniertes Zertifikat vertrauen / Zertifikatsvalidierung überspringen (nur Entwicklung) |
| nein | — | Hostname für TLS-Validierung, wenn er von |
| nein | — | Pfad zur CA-PEM-Datei; übergeben via |
| nein | — | Optionales Client-Zertifikat PEM (gegenseitiges TLS) |
| nein | — | Optionaler privater Client-Schlüssel PEM |
| nein | — | Passphrase für verschlüsselten Client-Schlüssel |
| nein | (Treiber-Standard) | Pool |
| nein | — | Domänen-Login ( |
| nein | — | Benannte Instanz ( |
| nein |
| Failover-Hinweis im Stil von Verfügbarkeitsgruppen |
| nein |
| Schreibgeschütztes Routing für AG-Sekundärserver |
| nein | — | Tedious |
| nein | — | Tedious |
| nein |
| Maximale Pool-Verbindungen |
| nein |
| Minimale Pool-Verbindungen |
| nein |
|
|
| nein | — |
|
| nein |
|
|
| nein | — |
|
| nein | — |
|
| nein‡ | — | Azure AD App (Client) ID, falls erforderlich |
| nein‡ | — | Tenant ID (optional für Passwort-Authentifizierung, Standard |
| nein‡ | — | Service Principal Secret |
| nein‡ | — | Vorab erhaltenes Token für Access-Token-Authentifizierung |
| nein |
| Wenn falsch/nicht gesetzt, werden gängige Schreib-/DDL-/Exec-Muster in |
| nein | (Treiber-Standard) | Anfrage-Timeout in ms für den Treiber. |
† Erforderlich für SQL-Authentifizierung und für Authentifizierungstypen, die eine interaktive Benutzeranmeldung verwenden.
‡ Erforderlich je nach MSSQL_AUTH_TYPE; siehe .env.example. NTLM unter Node 17+ benötigt möglicherweise --openssl-legacy-provider (siehe tedious FAQ).
Siehe auch .env.example.
Tools
Tool | Zweck |
| T-SQL ausführen; gibt Zeilen und |
| Tabellen in |
| Spalten-Metadaten |
Wenn MSSQL_ALLOW_WRITES nicht gesetzt/falsch ist, werden offensichtliche Schreib-/DDL-Muster blockiert (nur heuristisch; verwenden Sie Datenbankberechtigungen für echte Sicherheit).
Entwicklung
pnpm install
pnpm check
pnpm test
pnpm build && pnpm start
pnpm devVerwenden Sie pnpm format, um Biome-Formatierungskorrekturen anzuwenden, und pnpm lint, um Lint-Regeln ohne Formatierung auszuführen.
Verwenden Sie für den täglichen Gebrauch ein schreibgeschütztes SQL-Login oder eines mit minimalen Berechtigungen.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Explore, query, and inspect SQLite databases with ease. List tables, preview results, and view det…
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Run SOQL queries to explore and retrieve Salesforce data. Access accounts, contacts, opportunities…
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to interact with Microsoft SQL Server databases through query execution, schema discovery, CRUD operations, stored procedures, and data export with built-in safety controls.18Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely interact with Microsoft SQL Server databases to query data, inspect schemas, and retrieve metadata with read-only operations by default and optional write capabilities.1MIT
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Microsoft SQL Server databases using both SQL Server and Windows Authentication. It supports flexible connection configurations, including read-only modes and encrypted communication for secure data management.3,338MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Microsoft SQL Server databases via introspection and query tools. Supports single or multiple databases with read-only mode by default and an optional write capability.4084MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AdrianCY/mssql-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server