MCP server for Microsoft SQL Server (v3.0.0) providing 11 introspection and query tools, table resources, and guided prompts. Supports single and multi-database modes, read-only by default with opt-in write support, and runs over stdio or Streamable HTTP. Breaking changes from v2.x include renamed tools, persistent connection pooling, and removal of bespoke REST API.
npm install mssql-mcp-nodeNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an MCP server for MSSQL with one tool and connects over stdio.
Use execute_read_query for read-only and execute_write_query for writes (requires MSSQL_ENABLE_WRITES=true)
Call describe_table instead of get_table_schema
No action needed, but connections are now reused. Ensure pool cleanup on server shutdown.
Switch to MCP client sending POST requests to /mcp endpoint
Set environment variable MSSQL_ENABLE_WRITES=true to enable execute_write_query
Use only single-database MSSQL_* variables OR multi-database MSSQL_<NAME>_* variables, not both
npm install @modelcontextprotocol/sdk
Ensure correct import path: import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'Kill the process using port 3000 or set a different port via environment variable