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.

MSSQL MCP Server is a .NET 9 stdio MCP server that connects AI coding assistants — Cursor, VS Code Copilot, Claude Desktop, and any MCP-compatible client — directly to Microsoft SQL Server and Azure SQL Database. Agents can list tables, describe schemas, run SELECT queries, execute DDL/DML, and build up a persistent AI Insights cache to reduce repeated schema investigation.

Quickstart

Clone, build, and point your MCP client at the server in under five minutes.

Configuration

All environment variables: connection string, insights layer, log file path.

Tools Reference

Complete reference for all 19 MCP tools — inspection, write, and insights.

AI Insights Layer

Cache LLM-authored summaries, track DDL changes, and enrich baselines.

What the server provides

The server exposes 19 tools organised into three groups:

Inspection

List objects, describe tables and views, retrieve stored procedure and function definitions, and run arbitrary SELECT queries.

Write & DDL

Create and drop tables, insert, update, and execute any DDL/DML statement — all flagged destructive in MCP metadata.

AI Insights

Install a schema-level cache, upsert and retrieve object summaries, track DDL history, and rebuild baselines in bulk.

Set up your MCP client

Cursor

Project-level or user-level mcp.json config.

VS Code Copilot

Add the server under mcp.servers in Settings JSON.

Claude Desktop

Edit claude_desktop_config.json to register the server.

Key design decisions

1

Strict read/write routing

ReadData accepts only SELECT statements. ExecuteSQL rejects any SELECT and redirects to ReadData. This prevents accidental full-table scans through the write path.
2

AI Insights cache

An optional AIInsights schema stores LLM-authored summaries of every database object. A DDL audit trigger automatically invalidates stale entries when schemas change.
3

Connection validation at startup

The server validates CONNECTION_STRING and opens a real test connection before the MCP transport starts. A failed connection exits immediately with code 1 and a diagnostic log entry.
4

Single-file publish

Run publish-release.ps1 to produce a self-contained MssqlMcp.exe with no external .NET runtime dependency on the target machine.

Build docs developers (and LLMs) love