SQL Server
SQL Server MCP Server for Windsurf IDE - A standalone MCP server providing SQL Server integration capabilities
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
Maintainer
Works with
Installation
Manual Installation
npx mcpsqlserverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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 buildConfigure 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"
}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=trueAdd 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"
}
}
}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.
SQL Server Alternatives — Similar Databases Servers
Looking for alternatives to SQL Server? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
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.
Set Up SQL Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.