MS SQL Server MCP Server

# MS SQL Server MCP Server v2.3.5 πŸš€ **Model Context Protocol (MCP) server** for Microsoft SQL Server - compatible with Claude Desktop, Cursor

Remote serverstreamable-httpTypeScript

What is the MS SQL Server MCP server?

Most database access work still happens through a UI a human drives. MS SQL Server MCP server moves it into the conversation instead. # MS SQL Server MCP Server v2.3.5 πŸš€ Model Context Protocol (MCP) server for Microsoft SQL Server - compatible with Claude Desktop, Cursor, Windsurf and VS Code.

The tools it exposes

The server publishes 10 tools. What each one is for:

  • mssql_connect_database β€” No
  • mssql_disconnect_database β€” No
  • mssql_connection_status β€” βœ…
  • mssql_run_sql_query β€” ⚠️ No
  • mssql_list_schema_objects β€” βœ…
  • mssql_describe_table_columns β€” βœ…
  • mssql_read_table_rows β€” βœ…
  • mssql_execute_stored_procedure β€” ⚠️ No
  • mssql_list_databases β€” βœ…
  • Transport β€” The Transport tool exposed by this server

What it needs from you

Configuration is passed through the environment: DB_SERVER, DB_DATABASE, DB_USER, DB_PASSWORD, DB_ENCRYPT, DB_TRUST_SERVER_CERTIFICATE. Treat anything key-shaped as a real credential β€” scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Getting it running

Because this one is hosted, setup is mostly authentication β€” you point your client at the endpoint and approve access. Nothing runs on your machine, so there is no runtime to keep patched.

How it compares

Plenty of database access servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. MS SQL Server's toolset β€” mssql_connect_database, mssql_disconnect_database, mssql_connection_status and 7 more β€” is a fair guide to whether it matches your workflow. It is maintained by bymcs; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • Your data travels to the provider's service, so the usual questions apply about what you send and what they retain.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch MS SQL Server.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
mssql_connect_databaseNo
mssql_disconnect_databaseNo
mssql_connection_statusβœ…
mssql_run_sql_query⚠️ No
mssql_list_schema_objectsβœ…
mssql_describe_table_columnsβœ…
mssql_read_table_rowsβœ…
mssql_execute_stored_procedure⚠️ No
mssql_list_databasesβœ…
TransportThe Transport tool exposed by this server.

How to install the MS SQL Server MCP server

{
  "mcpServers": {
    "mssql-mcp-bymcs": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/inspector"],
      "env": {
        "DB_SERVER": "your-value",
        "DB_DATABASE": "your-value",
        "DB_USER": "your-value",
        "DB_PASSWORD": "your-value",
        "DB_ENCRYPT": "your-value",
        "DB_TRUST_SERVER_CERTIFICATE": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
DB_SERVERConfiguration value read at startup.Optional
DB_DATABASEConfiguration value read at startup.Optional
DB_USERConfiguration value read at startup.Optional
DB_PASSWORDConfiguration value read at startup.Optional
DB_ENCRYPTConfiguration value read at startup.Optional
DB_TRUST_SERVER_CERTIFICATEConfiguration value read at startup.Optional

Example prompts to try

  • β€œUse MS SQL Server to mssql connect database.”
  • β€œUse MS SQL Server to mssql disconnect database.”
  • β€œUse MS SQL Server to mssql connection status.”

Frequently asked questions

Node.js (via npm) and a network‑accessible SQL Server instance. The server uses the `@modelcontextprotocol/sdk` pinned to 1.28.0.