MCP server for Microsoft SQL Server integration with Claude Desktop, Cursor, Windsurf, and VS Code. Stable v2.3.2, actively maintained. Key differentiator: allows Claude to directly execute SQL queries, list schema objects, describe tables, read rows, and run stored procedures. Uses environment variables for credentials (never passed as tool parameters). Supports both stdio (npx) and HTTP transport. Deprecated legacy tool names are gradually being phased out. Requires Node >=18.0.0.
npm install mssql-mcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
MCP server configuration for Claude Desktop shows environment-based authentication required for SQL Server.
Update tool calls to use the new mssql_ prefixed names (e.g., mssql_run_sql_query instead of execute_query).
Migrate to the new mssql_ prefix tools (e.g., mssql_run_sql_query).
Set DB_* environment variables in the MCP server configuration. Validate environment before starting.
Use mssql_read_table_rows for read-only access when possible.
Call mssql_connect_database first after server starts.
Upgrade Node.js to >=18.0.0.
Use 'npx -y mssql-mcp@latest' or install globally with 'npm install -g mssql-mcp'
Check DB_SERVER and port (default 1433). Ensure SQL Server allows remote connections and TCP/IP is enabled.
Verify credentials in environment variables. Enable 'SQL Server and Windows Authentication mode' in SQL Server.