SQL Server

v1.0.0Databasesstable

SQL Server MCP Server for Windsurf IDE - A standalone MCP server providing SQL Server integration capabilities

mcpsqlservermcpai-integration
Share:
18
Stars
0
Downloads
0
Weekly
0/5

What is SQL Server?

SQL Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to sql server mcp server for windsurf ide - a standalone mcp server providing sql server integration capabilities

SQL Server MCP Server for Windsurf IDE - A standalone MCP server providing SQL Server integration capabilities

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • SQL Server MCP Server for Windsurf IDE - A standalone MCP se

Use Cases

Query and manage SQL Server databases from Windsurf IDE. Execute SQL operations and manage database schema. Integrate SQL Server with AI development workflows.
ian-cowley

Maintainer

LicenseMIT
Languagec#
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcpsqlserver

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use SQL Server

MCPSqlServer is a standalone MCP server written in C# that provides AI assistants with direct SQL Server integration for schema exploration, query execution, and stored procedure management. It exposes eight tools covering database listing, table and column inspection, stored procedure enumeration and execution, and both database-scoped and server-level SQL query execution. A dynamic project connection resolver automatically switches to the correct database connection string based on the active file in your editor, making it practical for multi-project workspaces with different databases.

Prerequisites

  • .NET 10.0 SDK or higher installed (https://dot.net)
  • A SQL Server instance accessible from your development machine (local or remote)
  • SQL Server credentials (username/password or Windows Authentication) with appropriate read/write permissions
  • An MCP-compatible client such as Windsurf, Cursor, Cline, or Claude Desktop
1

Clone and build the MCPSqlServer project

Clone the repository and build the C# project using the .NET CLI. This compiles the server binary that your MCP client will launch.

git clone https://github.com/ian-cowley/MCPSqlServer.git
cd MCPSqlServer
dotnet build
2

Configure the connection string and settings

Copy appsettings.example.json to appsettings.json and update the DefaultConnection string with your SQL Server host, database, username, and password. Set LogPath to a directory where the server can write log files.

cp appsettings.example.json appsettings.json
# Then edit appsettings.json:
{
  "ConnectionStrings": {
    "DefaultConnection": "Server=your-server;Database=master;User ID=your-username;Password=your-password;TrustServerCertificate=True"
  },
  "LogPath": "C:\\Logs\\MCPSqlServer\\",
  "DebugMode": "false",
  "AllowWorkspaceOverride": "true"
}
3

Publish as a self-contained executable (optional)

For production use, publish the server as a single self-contained executable that includes all .NET dependencies so your MCP client does not need .NET installed on PATH.

dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true
4

Add the server to your MCP client configuration

Configure your MCP client to launch the compiled MCPSqlServer executable. Point the command path to your built binary.

{
  "mcpServers": {
    "sqlMcpService": {
      "command": "C:\\path\\to\\MCPSqlServer.exe",
      "args": [],
      "description": "SQL Server MCP Service"
    }
  }
}
5

Restart your MCP client and test the connection

Restart your IDE or MCP client. Verify the SQL Server tools appear (get_databases, get_tables, execute_database_query, etc.) and run a test query to confirm connectivity.

SQL Server Examples

Client configuration

Example MCP client configuration pointing to the published MCPSqlServer self-contained executable.

{
  "mcpServers": {
    "sqlMcpService": {
      "command": "C:\\Projects\\MCPSqlServer\\publish\\MCPSqlServer.exe",
      "args": [],
      "description": "SQL Server MCP Service"
    }
  }
}

Prompts to try

Example prompts for SQL Server database exploration and query execution through your AI assistant.

- "List all non-system databases on the SQL Server instance"
- "Show me all tables in the AdventureWorks database under the dbo schema"
- "Get the column definitions for the Person.Person table"
- "Run SELECT TOP 10 * FROM Sales.SalesOrderHeader and show the results"
- "List all stored procedures in AdventureWorks and show the definition of uspGetEmployeeManagers"

Troubleshooting SQL Server

Connection refused or timeout when connecting to SQL Server

Verify the server name, port (default 1433), and that SQL Server's TCP/IP protocol is enabled in SQL Server Configuration Manager. For local instances use 'localhost' or '.' as the server name. Add TrustServerCertificate=True for self-signed certificates.

Server binary fails to start in the MCP client

Ensure the path in your MCP config points to the actual compiled .exe file (or the dotnet runtime binary for non-published builds). Test the binary directly in a terminal first: run it manually and check for any error output.

Wrong database is being queried in a multi-project workspace

The dynamic project connection resolver looks for appsettings.json files up the directory tree from the active file. Place a project-specific appsettings.json containing the correct ConnectionStrings:DefaultConnection in each project's root folder. Set AllowWorkspaceOverride to 'true' in the main config.

Frequently Asked Questions about SQL Server

What is SQL Server?

SQL Server is a Model Context Protocol (MCP) server that sql server mcp server for windsurf ide - a standalone mcp server providing sql server integration capabilities It connects AI assistants to external tools and data sources through a standardized interface.

How do I install SQL Server?

Follow the installation instructions on the SQL Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with SQL Server?

SQL Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is SQL Server free to use?

Yes, SQL Server is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcpsqlserver": { "command": "npx", "args": ["-y", "mcpsqlserver"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use SQL Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides