Model Context Protocol (MCP) server for SQL Server database integration with AI assistants
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"sql-server-mcp-server": {
"args": [
"-y",
"@modelcontextprotocol/inspector"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
A Model Context Protocol (MCP) server that provides AI assistants like Claude with secure, structured access to SQL Server databases through natural language queries.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@modelcontextprotocol/inspector' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
MCP Inspector is Vulnerable to Potential Command Execution via XSS When Connecting to an Untrusted MCP Server
An XSS flaw exists in the MCP Inspector local development tool when it renders a redirect URL returned by a remote MCP server. If the Inspector connects to an untrusted server, a crafted redirect can inject script into the Inspector context and, via the built-in proxy, be leveraged to trigger arbitrary command execution on the developer machine. Version 0.16.6 hardens URL handling/validation and prevents script execution. > Thank you to the following researchers for their reports and contributi
MCP Inspector proxy server lacks authentication between the Inspector client and proxy
Versions of MCP Inspector below 0.14.1 are vulnerable to remote code execution due to lack of authentication between the Inspector client and proxy, allowing unauthenticated requests to launch MCP commands over stdio. Users should immediately upgrade to version 0.14.1 or later to address these vulnerabilities. Credit: Rémy Marot <bughunters@tenable.com>
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in data
Query and manage PostgreSQL databases directly from AI assistants
An official Qdrant Model Context Protocol (MCP) server implementation
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients.
Manage Supabase projects — databases, auth, storage, and edge functions
MCP Security Weekly
Get CVE alerts and security updates for Sql Server Mcp Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
A Model Context Protocol (MCP) server that provides AI assistants like Claude with secure, structured access to SQL Server databases through natural language queries.
Model Context Protocol (MCP) is an open protocol that standardizes how AI applications connect to data sources. Instead of building custom integrations for each AI assistant, you build one MCP server that works with any MCP-compatible client.
Key Benefits:
┌─────────────────┐
│ Claude Desktop │ (MCP Client)
└────────┬────────┘
│ JSON-RPC over stdio
│
┌────────▼────────┐
│ MCP Server │ (This Project)
│ (C# .NET 9) │
└────────┬────────┘
│ Entity Framework Core
│
┌────────▼────────────┐
│ SQL Server │
│ (AdventureWorks2025)│
└─────────────────────┘
User: "What are our top 5 best-selling products?"
Claude: [Calls get_top_selling_products tool]
Result: Detailed product list with sales metrics
User: "Show me bikes under $1000"
Claude: [Calls search_products with filters]
Result: Filtered product list
User: "What's the average price of our top 10 sellers?"
Claude: [Calls get_top_selling_products, then analyzes]
Result: Calculated insights with context
Download the backup file from Microsoft SQL Server Samples and restore it:
RESTORE DATABASE AdventureWorks2025
FROM DISK = 'path\to\AdventureWorksLT2025.bak'
git clone <your-repo-url>
cd SqlServerMcpServer
Copy the example configuration and update with your connection string:
copy appsettings.example.json appsettings.json
Edit appsettings.json:
{
"ConnectionStrings": {
"AdventureWorks": "Server=YOUR_SERVER\\SQLEXPRESS;Database=AdventureWorks2025;Trusted_Connection=True;TrustServerCertificate=True;"
}
}
dotnet restore
dotnet build
dotnet publish -c Release -o publish
Edit Claude Desktop's configuration file:
%APPDATA%\Claude\claude_desktop_config.jsonAdd your MCP server:
{
"mcpServers": {
"sql-server": {
"command": "dotnet",
"args": ["<full-path-to-project>\\publish\\SqlServerMcpServer.dll"],
"cwd": "<full-path-to-project>\\publish"
}
}
}
Close and reopen Claude Desktop. You should see a hammer icon (🔨) in the input box indicating MCP tools are available.
⚠️ Important: This is a demonstration project using public sample data.