Mssql Mcp banner
Aaronontheweb Aaronontheweb

Mssql Mcp

Development community

Description

MSSQL Server MCP implementation written in C#

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

mssql-mcp

A .NET-powered Model Context Protocol (MCP) server for Microsoft SQL Server.

Abstract

Why does this exist? Because the other MCP solutions in market for this are generally janky pieces of shit that don't work - certainly not on Windows.

This MCP server provides AI agents with robust, reliable access to Microsoft SQL Server databases through a clean, well-architected .NET application using Akka.NET for internal coordination and the official MCP C# SDK for protocol compliance.

Features

  • Schema Discovery: AI agents can explore database structure without writing complex SQL
  • Query Execution: Full SQL support for SELECT, INSERT, UPDATE, DELETE, and DDL operations
  • Connection Validation: Automatic database connectivity validation on startup
  • Error Handling: Comprehensive error handling with clear, actionable error messages
  • Table Formatting: Query results formatted in readable tables for AI consumption
  • Docker Support: Easy deployment with built-in .NET Docker tooling

Available Tools

Tool Description
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

Configuration

Required Environment Variables

The MCP server requires a single environment variable:

  • MSSQL_CONNECTION_STRING: Complete SQL Server connection string

Example Connection Strings

**Windows Authentication:**

MSSQL_CONNECTION_STRING="Server=localhost;Database=MyDatabase;Trusted_Connection=true;"

**SQL Server Authentication:**

MSSQL_CONNECTION_STRING="Server=localhost;Database=MyDatabase;User Id=myuser;Password=mypassword;"

**Azure SQL Database:**

MSSQL_CONNECTION_STRING="Server=myserver.database.windows.net;Database=mydatabase;User Id=myuser;Password=mypassword;Encrypt=true;"

Running the MCP Server

Opt