MCPSqlServer
SQL Server MCP Server for Windsurf IDE - A standalone MCP server providing SQL Server integration capabilities
claude mcp add --transport stdio ian-cowley-mcpsqlserver path/to/MCPSqlServer.exe
How to use
This MCP server provides SQL Server integration as an addon for Windsurf IDE. It exposes a JSON-RPC based interface over standard input/output, enabling you to connect to a SQL Server, enumerate databases, inspect schemas, and execute queries and stored procedures directly from Windsurf. Core capabilities include connecting to SQL Server instances, listing databases, listing tables and their columns, enumerating stored procedures, and executing arbitrary SQL queries or stored procedures with parameter support. Debug mode and configurable logging help troubleshoot issues during development or integration work. You can leverage code completion for table and column names, browse database structures, and generate SQL code snippets within Windsurf using this MCP service.
How to install
Prerequisites:\n- .NET 9.0 SDK or higher (for building the source) or a published self-contained executable\n- SQL Server instance (local or remote) with appropriate credentials\n- SQL Server client tools (optional, for connectivity validation)\n\nInstallation steps:\n1) Build the project (from source):\ncmd\ndotnet build\n\n2) Create and modify configuration: copy appsettings.example.json to appsettings.json and set the connection string and other settings as needed. For example:\njson\n{\n "ConnectionStrings": {\n "DefaultConnection": "Server=your-server;Database=master;User ID=your-username;Password=your-password;TrustServerCertificate=True"\n },\n "LogPath": "C:\\\\Path\\\\To\\\\Your\\\\LogDirectory\\\\",\n "DebugMode": "false"\n}\n\n3) Publish as a self-contained executable (optional):\ncmd\ndotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true\n\nThis will produce a single MCPSqlServer.exe executable (if published as self-contained).\n4) Run the server: navigate to the published folder and start MCPSqlServer.exe (or run via your preferred manager). 5) Configure Windsurf to use the MCP server: copy the Windsurf integration configuration (windsurf_mcp_config.json) and point the command/path to the built executable as shown in the examples.\n\nIf you are building from source, ensure the appsettings.json file is correctly configured before starting the service.
Additional notes
Tips and considerations:\n- Ensure the ConnectionStrings:DefaultConnection matches your SQL Server instance and credentials.\n- Set LogPath to a writable directory to enable log file output.\n- If DebugMode is enabled, you may receive more verbose logs; disable in production.\n- When configuring Windsurf, ensure the path to MCPSqlServer.exe is correct and that the MCP server process has the necessary file system permissions.\n- Supported RPC actions include: connect, get_databases, get_tables, get_columns, get_procedures, execute_database_query, execute_system_query, and execute_procedure.\n- Handle sensitive data (credentials) securely in your environment; consider using secure stores or environment-based secrets in production.\n- If you encounter connectivity issues, verify firewall rules, SQL Server network configuration, and that SQL Server accepts connections from the hosting machine.\n- Use the DebugMode and error codes described in the README to diagnose common problems (invalid_request, connection_failed, missing_parameter, etc.).
Related MCP Servers
mssql
MSSQL Server MCP implementation written in C#
McpDotNet.Extensions.SemanticKernel
Microsoft SemanticKernel integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions.
DatabaseMcpServer
MCP server from ttcc666/DatabaseMcpServer
mcp-dataverse
MCP Server for querying Dataverse using SQL
xperience-community
ASP.NET Core MCP server for Xperience by Kentico projects
console-to-http
Example of converting a stdio MCP server to HTTP using ModelContextProtocol.AspNetCore