mssql-mcp
by Aaronontheweb·★ 145·Score 47
A .NET-powered MCP server for Microsoft SQL Server with robust tools for schema discovery, query execution, and connection validation.
Overview
mssql-mcp is a well-architected .NET implementation of the Model Context Protocol that enables AI agents to interact with Microsoft SQL Server databases. It uses Akka.NET for internal coordination and the official MCP C# SDK for protocol compliance. The server provides three core tools: execute_sql for running queries, list_tables for discovering tables, and list_schemas for exploring database structure. It features comprehensive error handling, table formatting for AI consumption, and Docker support for easy deployment.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this when working specifically with Microsoft SQL Server and need a reliable, production-ready MCP server with robust .NET implementation and Docker support.
When NOT to choose this
Not ideal if you need cross-database support beyond SQL Server or prefer a language-agnostic solution not tied to .NET ecosystem.
Tools this server exposes
3 tools extracted from the READMEexecute_sqlExecute any SQL query against the database
list_tablesList all tables with schema, name, type, and row count
list_schemasList all available schemas/databases in the SQL Server instance
Comparable tools
Installation
Installation
Option 1: Docker (Recommended)
dotnet publish --os linux --arch x64 /t:PublishContainer
docker run -it --rm -e MSSQL_CONNECTION_STRING="Server=host.docker.internal;Database=MyDB;Trusted_Connection=true;" mssql-mcp:latestOption 2: Local Binary
Run the built binary directly:
/path/to/mssql-mcp/src/MSSQL.MCP/bin/Release/net9.0/MSSQL.MCPClaude Desktop Configuration
{
"mcpServers": {
"mssql": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"MSSQL_CONNECTION_STRING",
"mssql-mcp:latest"
],
"env": {
"MSSQL_CONNECTION_STRING": "Server=host.docker.internal,1533; Database=MyDb; User Id=myUser; Password=My(!)Password;TrustServerCertificate=true;"
}
}
}
}FAQ
- What SQL operations are supported?
- The server supports SELECT, INSERT, UPDATE, DELETE, and DDL operations. It also provides schema discovery capabilities.
- How do I handle Docker networking issues on different platforms?
- On Windows and macOS, use 'host.docker.internal'. On Linux, either use '--network host' or add '--add-host=host.docker.internal:host-gateway'. The README provides detailed platform-specific guidance.
Compare mssql-mcp with
Last updated · Auto-generated from public README + GitHub signals.