{"id":43232,"library":"mssql-mcp","title":"MSSQL MCP Server","description":"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.","status":"active","version":"2.3.2","language":"javascript","source_language":"en","source_url":"https://github.com/BYMCS/mssql-mcp","tags":["javascript","mcp","mssql","sql-server","database","claude","cursor","windsurf","vscode","typescript"],"install":[{"cmd":"npm install mssql-mcp","lang":"bash","label":"npm"},{"cmd":"yarn add mssql-mcp","lang":"bash","label":"yarn"},{"cmd":"pnpm add mssql-mcp","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Pinned to 1.28.0 for MCP protocol support","package":"@modelcontextprotocol/sdk","optional":false},{"reason":"Microsoft SQL Server client driver","package":"mssql","optional":false},{"reason":"TDS driver for SQL Server (used by mssql)","package":"tedious","optional":false}],"imports":[{"note":"Run as an MCP server via npx; no code import required. Use global install only for local testing.","symbol":"mssql-mcp","correct":"npx -y mssql-mcp@latest"},{"note":"Configure as an MCP server tool, not a library import.","symbol":"MCP Server","correct":"Configuration in claude_desktop_config.json or .vscode/mcp.json"},{"note":"HTTP transport is optional; default is stdio via npx.","symbol":"HTTP transport","correct":"Set type: 'http' and url in mcp.json for remote hosting"}],"quickstart":{"code":"// Add to claude_desktop_config.json or .vscode/mcp.json:\n// JSON configuration for MS SQL Server MCP server\n{\n  \"mcpServers\": {\n    \"mssql\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mssql-mcp@latest\"],\n      \"env\": {\n        \"DB_SERVER\": \"your-server.com\",\n        \"DB_DATABASE\": \"your-database\",\n        \"DB_USER\": \"your-username\",\n        \"DB_PASSWORD\": \"your-password\",\n        \"DB_ENCRYPT\": \"true\",\n        \"DB_TRUST_SERVER_CERTIFICATE\": \"true\"\n      }\n    }\n  }\n}","lang":"json","description":"MCP server configuration for Claude Desktop shows environment-based authentication required for SQL Server."},"warnings":[{"fix":"Update tool calls to use the new mssql_ prefixed names (e.g., mssql_run_sql_query instead of execute_query).","message":"Tool names changed between v2.0 and v2.3: Old names like execute_query, get_schema, describe_table are deprecated and will be removed in v3. Use prefixed names (mssql_run_sql_query, etc.)","severity":"breaking","affected_versions":"<2.3.0"},{"fix":"Migrate to the new mssql_ prefix tools (e.g., mssql_run_sql_query).","message":"Deprecated tool aliases (execute_query, get_schema, etc.) still work but emit warnings. They will be removed in v3.","severity":"deprecated","affected_versions":">=2.0.0,<3.0.0"},{"fix":"Set DB_* environment variables in the MCP server configuration. Validate environment before starting.","message":"Credentials are only read from environment variables at server startup, not from tool call parameters. Never pass DB_PASSWORD etc. as arguments.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Use mssql_read_table_rows for read-only access when possible.","message":"mssql_run_sql_query is NOT read-only; it can modify data. Always verify SQL before execution.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Call mssql_connect_database first after server starts.","message":"Connection must be established with mssql_connect_database before other tools work. The server does not auto-connect.","severity":"gotcha","affected_versions":">=2.0.0"},{"fix":"Upgrade Node.js to >=18.0.0.","message":"Node.js >=18.0.0 required. Older versions may fail to install or run.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"search_vec":"'18.0.0':71 'activ':21 'allow':25 'claud':12,26,79 'code':18 'credenti':47 'cursor':14,80 'databas':78 'deprec':60 'describ':35 'desktop':13 'differenti':24 'direct':28 'environ':44 'execut':29 'gradual':65 'http':58 'integr':10 'javascript':72 'key':23 'legaci':61 'list':32 'maintain':22 'mcp':2,4,73 'microsoft':7 'mssql':1,74 'name':63 'never':48 'node':70 'npx':56 'object':34 'paramet':52 'pass':49 'phase':67 'procedur':42 'queri':31 'read':37 'requir':69 'row':38 'run':40 'schema':33 'server':3,5,9,77 'sql':8,30,76 'sql-server':75 'stabl':19 'stdio':55 'store':41 'support':53 'tabl':36 'tool':51,62 'transport':59 'typescript':83 'use':43 'v2.3.2':20 'variabl':45 'vs':17 'vscode':82 'windsurf':15,81","created_at":"2026-06-05T16:58:48.900418+00:00","updated_at":"2026-06-05T16:58:48.900418+00:00","problems":[{"fix":"Use 'npx -y mssql-mcp@latest' or install globally with 'npm install -g mssql-mcp'","cause":"Missing optional dependency 'mssql' when using npx without npm install","error":"Error: Cannot find module 'mssql'"},{"fix":"Check DB_SERVER and port (default 1433). Ensure SQL Server allows remote connections and TCP/IP is enabled.","cause":"SQL Server not running, firewall blocking, or wrong server address in DB_SERVER","error":"Error: Connection refused: connect ECONNREFUSED xxx.xxx.xxx.xxx:1433"},{"fix":"Verify credentials in environment variables. Enable 'SQL Server and Windows Authentication mode' in SQL Server.","cause":"Invalid DB_USER or DB_PASSWORD, or SQL Authentication not enabled on server","error":"Login failed for user '...'."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/BYMCS/mssql-mcp#readme","github":"https://github.com/BYMCS/mssql-mcp","docs":null,"changelog":null,"pypi":null,"npm":"mssql-mcp","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}