MSSQL MCP Server

MSSQL MCP Server is an MCP server that provides tools for connecting to and interacting with Microsoft SQL Server instances. Built for developers, database administrators, and data analysts using Model Context Protocol clients like Claude Desktop, it allows users to inspect database contents, retrieve records, and run custom queries directly from an AI chat interface. The server connects via standard connection strings or granular configuration parameters including host, port, user, and password. To prevent unintended modifications and protect data integrity, the server includes built-in security protections that filter out destructive DDL and execution commands such as DROP, TRUNCATE, ALTER, CREATE, and EXEC. It features connection pooling, query timeout controls, parameter validation, and support for TLS encryption settings. By exposing a dedicated query tool, the server enables language models to examine schema data, fetch operational records, and answer contextual database questions without requiring external SQL management applications.

Category: Databases & Data Stores

Tags: database, microsoft, mssql, SQL, sql server

Visit MSSQL MCP Server

How to install and configure MSSQL MCP Server

Follow these steps to set up the MSSQL MCP Server: 1. Install the server package using npm or Smithery: bash npm install mssql-mcp-server Or via Smithery for Claude Desktop: bash npx -y @smithery/cli install @c0h1b4/mssql-mcp-server --client claude 2. Open your client's MCP configuration file and register the server under the mcpServers block: json { "mcpServers": { "mssql": { "command": "mssql-mcp-server", "env": { "MSSQL_HOST": "localhost", "MSSQL_PORT": "1433", "MSSQL_DATABASE": "master", "MSSQL_USER": "sa", "MSSQL_PASSWORD": "yourpassword", "MSSQL_ENCRYPT": "false", "MSSQL_TRUST_SERVER_CERTIFICATE": "true" } } } } 3. Alternatively, supply a full connection string via the MSSQL_CONNECTION_STRING environment variable in the same configuration block, then restart your client.

What you can do with MSSQL MCP Server

  • Running read-only SQL queries to extract and analyze relational data stored across Microsoft SQL Server tables. - Validating table contents and exploring database records directly within conversational AI sessions for rapid debugging. - Querying system views and metadata to inspect database structures and table relationships without opening an external client. - Integrating corporate SQL Server databases with LLM workflows while blocking destructive commands like DROP or TRUNCATE.

Key facts

  • https://github.com/c0h1b4/mssql-mcp-server
  • Databases & Data Stores
  • database, microsoft, mssql, SQL, sql server

Part of MCP Servers

Related MCP servers

  • MCP Memory Keeper — MCP Memory Keeper is an MCP server that provides persistent context management and memory storage for Claude AI coding assistants.…
  • MCP Notes — MCP Notes is an MCP server that provides note-taking and note-management capabilities to AI models using Amazon Web Services DynamoDB…
  • MCP Neo4j Server — MCP Neo4j Server is an MCP server that provides an integration between the Neo4j graph database and Model Context Protocol…
  • MCP Memory Toolkit — MCP Memory Toolkit is an MCP server that provides persistent memory capabilities for Claude and other compatible assistants using ChromaDB.…
  • MCP Memory Server — MCP Memory Server is an MCP server that integrates Claude Desktop with Azure Cosmos DB and OpenAI embeddings to provide…
  • MCP MS SQL Server — MCP MS SQL Server is an MCP server that provides a standardized Model Context Protocol interface for AI models to…

How do I install MSSQL MCP Server?

You can install the server via npm with the command npm install mssql-mcp-server, or use the Smithery CLI to install it directly for Claude Desktop using npx -y @smithery/cli install @c0h1b4/mssql-mcp-server --client claude.

What can MSSQL MCP Server do?

It provides a query tool to execute SQL queries on Microsoft SQL Server databases. You can pass explicit credentials or rely on environment variables, while built-in protections restrict destructive statements like DROP and ALTER.

Which MCP clients work with MSSQL MCP Server?

It works with any Model Context Protocol compliant client, such as Claude Desktop, that supports running command-based local MCP server processes through standard configuration files.

Does MSSQL MCP Server permit schema modifications?

The server includes security safeguards that actively block potentially harmful commands, including DROP, TRUNCATE, ALTER, CREATE, and EXEC, focusing access on safe read and data operations.

Is MSSQL MCP Server open source?

Yes, MSSQL MCP Server is open source and distributed under the MIT license, with source code available on GitHub.

  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories