Power your agent
पब्लिशर की अपनी कमांड। PlugMCP एंडपॉइंट नहीं।
Host a copy with our keys and logs.
npx -y @eamonboyle/[email protected]Claude Code में लोकल कमांड के लिए इंस्टॉल लिंक नहीं है। नीचे दी गई कमांड कॉपी करें और टर्मिनल में चलाएँ।
claude mcp add eamonboyle-mssql-mcp -- npx -y @eamonboyle/mssql-mcp@2.0.0टर्मिनल में चलाएँ।
{ "mcpServers": { "eamonboyle-mssql-mcp": { "command": "npx", "args": [ "-y", "@eamonboyle/[email protected]" ] } }}claude_desktop_config.json
रिमोट URL या आपकी मशीन पर कमांड? दोनों इंस्टॉल में क्या अंतर है
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.
लॉन्चExperimental use only. This server is intended for education and evaluation, not production. Use a dedicated least-privilege SQL login and test all operations.
@eamonboyle/mssql-mcp exposes Microsoft SQL Server tools, resources, and prompts through the Model Context Protocol. The MCP client and its language model interpret natural-language requests and choose tools. This package validates requests, executes SQL Server operations, and returns structured results.
Key capabilities:
Supported clients include Cursor, VS Code, Claude Desktop, and other MCP-compatible hosts.
node --version)Still on Node.js 20? Version 1.6.0 is the last release that runs on Node 20, which reached end-of-life in April 2026. Newer releases stop at startup with a message explaining this. Upgrade Node.js, or pin the older release in your MCP configuration with
npx -y @eamonboyle/[email protected].
The recommended installation runs the published package directly:
npx -y @eamonboyle/mssql-mcp
A global installation also exposes the mssql-mcp command:
npm install -g @eamonboyle/mssql-mcp
mssql-mcp
The one-click links use the minimal configuration shown below. Replace the sample connection values before use.
The badge payloads are generated from src/samples/claude_desktop_config.json. After changing the sample, run npm run docs:update-install-links; use npm run docs:check-install-links to verify they are current.
The standard presets show connection placeholders and keep DDL disabled:
{
"mcpServers": {
"mssql-local": {
"command": "npx",
"args": ["-y", "@eamonboyle/mssql-mcp"],
"env": {
"SERVER_NAME": "localhost",
"DATABASE_NAME": "AppDB",
"DATABASES": "AppDB,ReportingDB",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"TRUST_SERVER_CERTIFICATE": "true",
"READONLY": "false",
"ENABLE_DDL": "false"
}
}
}
}
Cursor uses mcpServers in ~/.cursor/mcp.json or .cursor/mcp.json. Claude Desktop uses the same shape in its configuration file.
Set ENABLE_DDL=true only when the assistant specifically needs to create or remove schema objects.
VS Code uses .vscode/mcp.json or its user MCP configuration with a top-level servers object:
{
"servers": {
"mssql-local": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@eamonboyle/mssql-mcp"],
"env": {
"SERVER_NAME": "localhost",
"DATABASE_NAME": "AppDB",
"DATABASES": "AppDB,ReportingDB",
"DB_USER": "your_username",
"DB_PASSWORD": "your_password",
"TRUST_SERVER_CERTIFICATE": "true",
"READONLY": "false",
"ENABLE_DDL": "false"
}
}
}
}
See src/samples/ for copyable Claude Desktop and VS Code files. Do not commit configuration files containing real credentials.
The server validates these variables before starting. Missing or blank values produce an actionable startup error.
At least one database variable is required: set DATABASE_NAME, DATABASES, or both. With only DATABASE_NAME, that database is both the default and the allowlist. With only DATABASES, the first entry is the default. When both are set, DATABASE_NAME is used if it appears in DATABASES; otherwise the first allowed database is the runtime default.
SQL_AUTH_TYPE selects how the server signs in to SQL Server. The default, sql, uses DB_USER and DB_PASSWORD.
Entra ID types default ENCRYPT to true and TRUST_SERVER_CERTIFICATE to false, because Azure SQL requires TLS and presents publicly trusted certificates. For Azure SQL with azure-default after az login:
SERVER_NAME=myserver.database.windows.net
DATABASE_NAME=mydb
SQL_AUTH_TYPE=azure-default
Do not include the port in
SERVER_NAME. Values such aslocalhost,1434are not supported by the Node.jsmssqldriver configuration used by this package. SetSERVER_NAMEto the hostname and useSERVER_PORTseparately.
{
"SERVER_NAME": "localhost",
"SERVER_PORT": "1434"
}
For a Docker port mapping such as:
ports:
- "1434:1433"
use the published host port:
SERVER_NAME=localhost
SERVER_PORT=1434
The container still listens on 1433, but the MCP process connects through host port 1434.
Optional variables do not need empty placeholders. In-code defaults apply when they are absent.
Blank optional values use their documented defaults. Explicit nonblank invalid integers, booleans, ports, URLs, or transport names fail validation rather than falling back silently.
ENCRYPT=false preserves the existing unencrypted connection behavior. Set ENCRYPT=true for TLS. With encryption enabled, keep TRUST_SERVER_CERTIFICATE=false for certificates that chain to a trusted authority. Use TRUST_SERVER_CERTIFICATE=true only when explicitly accepting a self-signed or otherwise untrusted certificate, such as local development.
DATABASES is an allowlist. Every tool accepts an optional databaseName. When a tool omits it, the server uses DATABASE_NAME if that name is allowed, otherwise it uses the first entry in DATABASES. A requested database outside the allowlist is rejected.
READONLY=true removes insert, update, delete, and DDL tools. Read-only preview tools remain available because they do not modify data.
When writes are enabled:
insert_data, update_data, delete_data, and DDL tools ask the user to confirm through MCP elicitation when the client supports it (Cursor, VS Code, Claude). Clients without elicitation must pass confirmed: true. Over HTTP, prompts work for 2026-07-28 clients; 2025-era HTTP clients must pass confirmed: true because the stateless transport cannot carry their elicitation round trip.update_data and delete_data require nonempty structured filters, not raw SQL WHERE text.REQUIRE_WRITE_PREVIEW=true, call preview_update or preview_delete first and pass its previewToken to the matching write.MAX_WRITE_ROWS rejects oversized operations, and update/delete execution applies a row cap.Supported filter operators are =, !=, >, >=, <, <=, LIKE, IN, IS NULL, and IS NOT NULL.
DDL tools are registered when READONLY=false, but calls fail with DDL_DISABLED unless ENABLE_DDL=true.
For insert_data, pass the table in tableName and the schema separately in schemaName. Do not use a dotted schema.table value for tableName.
The default transport is stdio. To run the stateless HTTP transport from a directory containing a configured .env:
MCP_TRANSPORT=http npx -y @eamonboyle/mssql-mcp
The default endpoint is:
http://127.0.0.1:3333/mcp
The HTTP endpoint serves both the 2026-07-28 MCP protocol and 2025-era clients. A client must accept application/json, text/event-stream. Each HTTP request creates a fresh MCP server instance; preview tokens, stored query results, and query plans use process-wide stores, so they stay valid across requests to the same process.
HTTP security:
/mcp is served. Host and Origin headers are checked against MCP_HTTP_ALLOWED_HOSTS (by default loopback names, the bind host, and the MCP_BASE_URL host) to block DNS-rebinding attacks from web pages.MCP_HTTP_AUTH_TOKEN to require Authorization: Bearer <token>.MCP_BASE_URL to its https:// address. Startup logs a warning when a non-loopback bind has no https:// MCP_BASE_URL.MCP_HTTP_HOST to anything other than loopback fails at startup unless MCP_HTTP_AUTH_TOKEN is set, or MCP_HTTP_ALLOW_UNAUTHENTICATED=true acknowledges that another layer (reverse proxy, network policy) protects the endpoint.For a reverse proxy or externally published path, set MCP_BASE_URL to the public base without the final /mcp segment:
MCP_BASE_URL=https://example.com/services/mssql
The server continues binding to MCP_HTTP_HOST:MCP_HTTP_PORT, logs https://example.com/services/mssql/mcp as its public endpoint, and exposes that URL through mssql://config/server. MCP_E2E_BASE_URL is a separate test-harness variable used only by scripts/e2e-mcp-tools.mjs.
Cursor HTTP configuration:
{
"mcpServers": {
"mssql-http": {
"url": "http://127.0.0.1:3333/mcp",
"headers": { "Authorization": "Bearer ${env:MSSQL_MCP_TOKEN}" }
}
}
}
Omit headers when MCP_HTTP_AUTH_TOKEN is not set.
Clients with MCP resource support can discover:
mssql://config/servermssql://config/promptsmssql://database/{databaseName}/tablesmssql://database/{databaseName}/objectsmssql://database/{databaseName}/schema-summarymssql://database/{databaseName}/foreign-keysmssql://table/{databaseName}/{schemaName}/{tableName}mssql://object/{databaseName}/{schemaName}/{objectName}mssql://database/{databaseName}/object/{schemaName}/{objectName}/dependenciesmssql://query-plan/{planId}mssql://query-result/{resultId}ui://mssql/query-results.html (MCP Apps view)Table and object listings are cached for 30 seconds. Query plan and large query result resources are temporary process-local artifacts.
read_data and search_data declare an MCP Apps view. Hosts that support MCP Apps (Claude, VS Code, Cursor 2.6+, and others) render results as a sortable, filterable grid inline in the conversation. Other clients ignore the view and use the normal text and structured result.
read_data accepts one SELECT statement, optionally preceded by common table expressions (WITH ...). String literals, comments, and bracketed or quoted identifiers are ignored when checking for disallowed keywords, so [Update] columns or 'Update pending' values are fine. Statements that modify data, execute code (EXEC, sp_/xp_ procedures), declare variables, or read server identity (@@ variables, SUSER_SNAME()) are rejected.
Every query also runs inside a transaction that is always rolled back, and results stream until MAX_ROWS rows have been read, at which point the query is cancelled and the result is marked truncated. SQL Server error messages (for example Invalid column name) are returned so the model can correct the query. Cancelling a tool call in the client cancels the running SQL request.
Available prompts:
explore_schemadraft_safe_selectreview_write_operationFor local source development only:
git clone https://github.com/eamonboyle/mssql-mcp.git
cd mssql-mcp
npm install
npm run build
node /path/to/mssql-mcp/dist/index.js
The repository includes a seeded SQL Server 2022 Docker environment:
cp .env.example .env
npm run db:up
npm run test:e2e # every tool over HTTP, then protocol checks (2026-07-28 + 2025 stdio)
See docs/dev-database.md for database and E2E details and CONTRIBUTING.md for build, lint, and test commands.
SERVER_PORT must be a valid TCP port: use a whole number from 1 to 65535.getaddrinfo ENOTFOUND localhost,1434: move 1434 from SERVER_NAME to SERVER_PORT.DDL_DISABLED: set ENABLE_DDL to "true" only when DDL access is intended.PREVIEW_TOKEN_INVALID: create a new matching preview and use its token once within 10 minutes.403 Forbidden: the request's Host or Origin is not in MCP_HTTP_ALLOWED_HOSTS; add the public hostname (or set MCP_BASE_URL).401 Unauthorized: send Authorization: Bearer <MCP_HTTP_AUTH_TOKEN>.DATABASES and use the exact allowed name in databaseName.READONLY=true whenever writes are unnecessary.ENABLE_DDL=false unless schema changes are explicitly needed.MCP_HTTP_AUTH_TOKEN and MCP_HTTP_ALLOWED_HOSTS when exposing it. Prefer TLS termination at a reverse proxy.read_data validation and its rolled-back transaction are defense in depth; a least-privilege login is still the primary control.ENCRYPT=true for TLS deployments and keep TRUST_SERVER_CERTIFICATE=false when the server certificate is publicly or privately trusted.MCP server for Microsoft SQL Server - query and manage your database with natural language in Cursor, Claude, and VS Code
{ "mcpServers": { "eamonboyle-mssql-mcp": { "command": "npx", "args": [ "-y", "@eamonboyle/[email protected]" ] } }}टूल
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
@eamonboyle/mssql stdio पर लोकल चलता है।
पिछली जाँच 2026-10-28 को हुई। MCP server for Microsoft SQL Server - query and manage your database with natural language in Cursor, Claude, and VS Code