Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/A-Point-Systems-ltd/ms-sql-mcp/llms.txt

Use this file to discover all available pages before exploring further.

VS Code with GitHub Copilot Agent supports MCP servers via the mcp.servers section in Settings JSON. You can register MSSQL MCP Server at either User scope (applies to every workspace on the machine) or Workspace scope (stored in .vscode/settings.json and scoped to the open folder). Both approaches use identical JSON — only the file location differs.
1

Build or publish the server

Follow the steps in Build and Publish to produce a MssqlMcp.exe binary. Note the full path to the executable — you will need it in the next step.
2

Open VS Code Settings JSON

Open the Command Palette (Ctrl+Shift+P) and choose one of:
  • Preferences: Open User Settings (JSON) — edits the global user settings file.
  • Preferences: Open Workspace Settings (JSON) — edits .vscode/settings.json in the current workspace.
Both files support the mcp key shown in the next step.
3

Add the server configuration

Inside the settings JSON object, add (or merge) the following block, replacing the command path and connection string with values for your environment:
"mcp": {
  "servers": {
    "MSSQL MCP": {
      "type": "stdio",
      "command": "C:\\path\\to\\MssqlMcp.exe",
      "env": {
        "CONNECTION_STRING": "Server=.;Database=test;Trusted_Connection=True;TrustServerCertificate=True"
      }
    }
  }
}
You can add optional environment variables to the env block as needed:
"mcp": {
  "servers": {
    "MSSQL MCP": {
      "type": "stdio",
      "command": "C:\\path\\to\\MssqlMcp.exe",
      "env": {
        "CONNECTION_STRING": "Server=.;Database=test;Trusted_Connection=True;TrustServerCertificate=True",
        "USE_INSIGHTS_LAYER": "true",
        "INSIGHTS_AUTOPOPULATE": "true",
        "LOG_FILE_PATH": "C:\\Logs\\mssql-mcp.log"
      }
    }
  }
}
4

Reload VS Code or restart the Copilot extension

Save the settings file. VS Code should detect the change automatically. If the server does not appear immediately, reload the window (Ctrl+Shift+PDeveloper: Reload Window) or restart the GitHub Copilot extension from the Extensions panel.
5

Verify the server in Copilot Agent mode

Open a Copilot Chat panel and switch to Agent mode. The MSSQL MCP tools (such as ListObjects, ReadData, and DescribeTable) should appear in the tool list. Send a prompt to confirm:
List tables in the database
The agent should call ListObjects with objectType=Table and return your table names.
For workspace-scoped configurations, avoid storing real connection strings in .vscode/settings.json if the workspace is committed to source control. Instead, use a .env file (loaded via the VS Code DotENV extension) to keep credentials out of committed settings, or use Windows Authentication (Trusted_Connection=True) so no password appears in the config at all.

Build docs developers (and LLMs) love