MCP Catalogs
Home

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.

databasedeveloper-toolsops-infra
23
Forks
11
Open issues
4 mo ago
Last commit
2d ago
Indexed

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:

you:AI-powered data analysis where AI agents can explore and query SQL databases directly
you:Database administration automation through natural language interfaces
you:Integration with AI coding assistants to provide database context during development
you:What SQL operations are supported?
you:How do I handle Docker networking issues on different platforms?

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 README
  • execute_sql

    Execute any SQL query against the database

  • list_tables

    List all tables with schema, name, type, and row count

  • list_schemas

    List all available schemas/databases in the SQL Server instance

Comparable tools

postgresql-mcpmysql-mcpshell-mcp

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:latest
Option 2: Local Binary

Run the built binary directly:

/path/to/mssql-mcp/src/MSSQL.MCP/bin/Release/net9.0/MSSQL.MCP
Claude 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

GitHub →

Last updated · Auto-generated from public README + GitHub signals.