MSSQL MCP Server
Overview
MSSQL MCP Server is a Model Context Protocol (MCP) server designed for connecting to Microsoft SQL Server databases, providing tools for executing SQL queries and managing database connections.
To use MSSQL MCP Server, install it via npm and configure it in your MCP settings with the necessary database connection parameters.
- Connects to Microsoft SQL Server databases. - Executes SQL queries with customizable parameters. - Supports both full connection strings and individual connection parameters.
- Executing SQL queries on a Microsoft SQL Server database.
- Managing database connections in a structured manner.
- Integrating SQL Server functionalities into applications using MCP.
Add to your AI client
Use these steps to connect MSSQL MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mssql-mcp-server-c0h1b4": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mssql-mcp-server-c0h1b4"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mssql-mcp-server-c0h1b4": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mssql-mcp-server-c0h1b4"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mssql-mcp-server-c0h1b4": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mssql-mcp-server-c0h1b4"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mssql-mcp-server-c0h1b4": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mssql-mcp-server-c0h1b4"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mssql-mcp-server-c0h1b4": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mssql-mcp-server-c0h1b4"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mssql-mcp-server-c0h1b4": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mssql-mcp-server-c0h1b4"
]
}
}
}FAQ
What is the installation process?
You can install MSSQL MCP Server using npm with the command `npm install mssql-mcp-server`.
How do I configure the server?
You need to add the server to your MCP settings configuration file with the required connection parameters.
Can I use a connection string instead of individual parameters?
Yes, you can provide either a full connection string or individual parameters for connection.