Database · Developer Tools

Mssqlclient MCP Server logo

Mssqlclient MCP Server

aadversteeg/mssqlclient-mcp-server

A comprehensive Microsoft SQL Server client implementing the Model Context Protocol (MCP). This server provides extensive SQL Server capabilities including query execution, schema discovery, and stored procedure management through a simple MCP interface.

Install

docker run -d --name mssql-mcp -e "MSSQL_CONNECTIONSTRING=<value> Id=<value> mssqlclient-mcp-server:latest

Client configuration

{
  "mcpServers": {
    "server": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "<value>",
        "-e",
        "<value>",
        "-e",
        "<value>",
        "-e",
        "MSSQL_CONNECTIONSTRING=Server=your_server;...",
        "<value>"
      ]
    }
  }
}

Environment variables

MSSQL_CONNECTIONSTRING
GitHub stars
1
Category
Database, Developer Tools
License
MIT
Updated
Oct 6, 2026

About Mssqlclient MCP Server

Breaking Change in 0.0.5: Query and stored procedure execution tools are now disabled by default for security. If you were relying on the previous defaults, you must now explicitly enable them by setting the corresponding environment variables to "true":

Features

  • Execute SQL queries on connected SQL Server databases

  • List all tables with schema and row count information

  • Retrieve detailed schema information for specific tables

  • Comprehensive stored procedure management and execution

  • Parameter Discovery: Get detailed parameter information in table or JSON Schema format

  • Type-Safe Execution: Automatic JSON-to-SQL type conversion based on parameter metadata

  • Rich Metadata: Support for input/output parameters, default values, and data type constraints

  • Cross-Database Operations: Execute procedures across different databases (Server Mode)

  • JSON Schema Output: Parameter metadata compatible with validation tools

  • Case-Insensitive Parameters: Flexible parameter naming with @ prefix normalization

Tools (30)

  • DatabaseConfiguration__EnableExecuteQuery

    Enable execute_query / execute_query_in_database tools

  • DatabaseConfiguration__EnableExecuteStoredProcedure

    Enable execute_stored_procedure / execute_stored_procedure_in_database tools

  • DatabaseConfiguration__EnableStartQuery

    Enable start_query / start_query_in_database session tools

  • DatabaseConfiguration__EnableStartStoredProcedure

    Enable start_stored_procedure / start_stored_procedure_in_database session tools

  • DatabaseConfiguration__MaxCellOutputLength

    Maximum characters displayed per cell in query results.

  • server_capabilities

    Returns detailed information about the capabilities and features of the connected SQL Server instance.

  • get_command_timeout

    Returns current timeout configuration settings.

  • set_command_timeout

    Updates the default command timeout for all new operations.

  • get_session_status

    Check the status of a running query or stored procedure session.

  • get_session_results

    Get results from a completed or running query/stored procedure session.

  • stop_session

    Stop a running query or stored procedure session.

  • list_sessions

    List all query and stored procedure sessions.

  • execute_query

    Executes a SQL query on the connected SQL Server database.

  • list_tables

    Lists all tables in the connected SQL Server database with schema and row count information.

  • get_table_schema

    Gets the schema of a table from the connected SQL Server database.

  • list_stored_procedures

    Lists all stored procedures in the current database with detailed information.

  • get_stored_procedure_definition

    Gets the SQL definition of a stored procedure.

  • get_stored_procedure_parameters

    Gets parameter information for a stored procedure in table or JSON Schema format.

  • execute_stored_procedure

    Executes a stored procedure with automatic parameter type conversion.

  • start_query

    Start a SQL query in the background on the connected database.

  • start_stored_procedure

    Start a stored procedure execution in the background.

  • list_databases

    Lists all databases on the SQL Server instance.

  • execute_query_in_database

    Executes a SQL query in a specific database.

  • list_tables_in_database

    Lists all tables in a specific database.

  • get_table_schema_in_database

    Gets the schema of a table from a specific database.

  • list_stored_procedures_in_database

    Lists all stored procedures in a specific database.

  • get_stored_procedure_definition_in_database

    Gets the SQL definition of a stored procedure from a specific database.

  • execute_stored_procedure_in_database

    Executes a stored procedure in a specific database with automatic parameter type conversion.

  • start_query_in_database

    Start a SQL query in the background for a specific database.

  • start_stored_procedure_in_database

    Start a stored procedure execution in the background for a specific database.

Details on this page are taken from the project's README. Open README

Supported clients

Clients mentioned in this server's README:

View all
Claude Desktop logo

Claude Desktop

Desktop · Freemium · Proprietary

Anthropic's official Claude AI desktop application. Supports MCP servers to extend functionality.

WindowsMacOS

Related MCP servers

More servers
Supabase MCP logo

Supabase MCP

supabase-community/supabase-mcp

1.3k

The Model Context Protocol (MCP) standardizes how Large Language Models (LLMs) talk to external services like Supabase. It connects AI assistants directly with your Supabase project and allows them to perform tasks like managing tables, fetching config, and querying data. See the full list of tools.

Database
Genai Toolbox logo

Genai Toolbox

googleapis/genai-toolbox

769

MCP Toolbox for Databases is an open source Model Context Protocol (MCP) server that connects your AI agents, IDEs, and applications directly to your enterprise databases.

Database
Supabase MCP Server logo

Supabase MCP Server

alexander-zuev/supabase-mcp-server

677

Query MCP is an open-source MCP server that lets your IDE safely run SQL, manage schema changes, call the Supabase Management API, and use Auth Admin SDK — all with built-in safety controls.

Database
Awesome MCP List logo

Awesome MCP List

MobinX/awesome-mcp-list

645

This is a continuously updated curated list of MCP servers, covering categories such as browser control, arts and culture, cloud platforms, command line, communication, customer data platforms, databases, developer tools, data science tools, file systems, finance and fintech, gaming, knowledge and memory, location services, marketing, monitoring, search and utilities. Each project includes a GitHub link and star count for quick reference and use.

Database
PostgreSQL Model Context Protocol (PG MCP) Server logo

PostgreSQL Model Context Protocol (PG MCP) Server

stuzero/pg-mcp-server

440

PG-MCP is a server implementation of the Model Context Protocol for PostgreSQL databases. It provides a comprehensive API for AI agents to discover, connect to, query, and understand PostgreSQL databases through MCP's resource-oriented architecture.

Database
dbhub logo

dbhub

bytebase/dbhub

332

[!NOTE] If you need an enterprise-level database MCP server with built-in guardrails like approval flow, access control, data masking, and audit logging beyond what DBHub offers, check out Bytebase.

Database