Standalone C# SQL Server MCP for Windsurf IDE enables schema exploration and query execution
The SQL Server MCP (Model Context Protocol) Server is a standalone C# application designed to integrate SQL Server databases with the Windsurf IDE, enhancing its capabilities by providing extended functionality and connectivity. This server adheres to the Model Context Protocol (MCP), which serves as a universal adapter for AI applications such as Claude Desktop, Continue, and Cursor. By implementing MCP, this server ensures seamless communication between AI tools and specific data sources or tools, enabling robust integration without the need for custom development.
The SQL Server MCP Server offers a comprehensive set of features designed to meet the needs of developers and data scientists working with SQL Server databases. Key capabilities include:
The SQL Server MCP Server architecture is carefully designed to ensure seamless communication with MCP clients. It follows the Model Context Protocol (MCP), which leverages JSON-RPC for protocol implementation. The server’s core structure includes:
The protocol flow is illustrated using a Mermaid diagram, showcasing the interaction between AI applications (MCP clients) and the SQL Server MCP Server:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram highlights the protocol flow, emphasizing the essential components and their interactions.
To set up and use the SQL Server MCP Server with Windsurf IDE, follow these steps:
Build the Project
dotnet build
Configure the Application
appsettings.example.json
to appsettings.json
:
copy appsettings.example.json appsettings.json
appsettings.json
with your SQL Server details:
{
"ConnectionStrings": {
"DefaultConnection": "Server=your-server;Database=master;User ID=your-username;Password=your-password;TrustServerCertificate=True"
},
"LogPath": "C:\\Path\\To\\Your\\LogDirectory\\",
"DebugMode": "false"
}
Configure the MCP Server in Windsurf
windsurf_mcp_config.json
to your Windsurf MCP configuration file (typically located at ~/.codeium/windsurf/mcp_config.json
):
{
"mcpServers": {
"sqlMcpService": {
"command": "path/to/your/MCPSqlServer.exe",
"args": [],
"description": "SQL Server MCP Service"
}
}
}
Set Up GitHub Integration
git init
.git remote add origin <repository-url>
git push -u origin master
This SQL Server MCP Server is particularly valuable for integrating structured data from SQL databases into AI workflows. Here are two realistic use cases:
Data Preparation for Machine Learning: Using the server’s capabilities, developers can easily prepare datasets by querying SQL Server databases and transforming them into a format suitable for machine learning models.
Model Deployment & Monitoring: The server allows real-time data ingestion from SQL databases, making it easier to deploy and monitor AI models in production environments.
{
"action": "connect",
"parameters": {
"connectionString": "Data Source=server;Initial Catalog=master;Integrated Security=True;"
}
}
{
"action": "execute_database_query",
"parameters": {
"database": "AdventureWorks",
"query": "SELECT TOP 10 * FROM Person.Person"
}
}
This SQL Server MCP Server is compatible with several MCP clients, including:
The following matrix provides detailed information on the compatibility status of each client.
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | ✅ |
Cursor | ❌ | ✅ | ❌ |
The SQL Server MCP Server is designed to perform efficiently across various environments. Here’s a compatibility matrix highlighting its performance and support for different platforms:
Operating System | Support Status |
---|---|
Windows | ✅ |
macOS | ✅ |
Linux | ❌ (Partial) |
Advanced users can configure the server by modifying the appsettings.json
file. For example, changing the logging path or enabling debug mode:
{
"ConnectionStrings": {
"DefaultConnection": "Server=your-server;Database=master;User ID=your-username;Password=your-password;TrustServerCertificate=True"
},
"LogPath": "C:\\Path\\To\\Your\\LogDirectory\\",
"DebugMode": "false"
}
Ensure that environment variables and additional configurations are set appropriately to secure sensitive data.
LogPath
. Review these to troubleshoot issues effectively.appsettings.json
file for additional flexibility.The SQL Server MCP Server is designed with technical accuracy and completeness in mind, ensuring a robust solution for integrating SQL Server databases into AI workflows. It features 100% English content, originality, and careful implementation of all documented MCP features.
By following the detailed documentation provided here, users can successfully integrate this server into their development environments, leveraging its powerful capabilities to streamline data access and manipulation in AI projects.
RuinedFooocus is a local AI image generator and chatbot image server for seamless creative control
Simplify MySQL queries with Java-based MysqlMcpServer for easy standard input-output communication
Build stunning one-page websites track engagement create QR codes monetize content easily with Acalytica
Learn to set up MCP Airflow Database server for efficient database interactions and querying airflow data
Explore CoRT MCP server for advanced self-arguing AI with multi-LLM inference and enhanced evaluation methods
Access NASA APIs for space data, images, asteroids, weather, and exoplanets via MCP integration