MSSQL MCP Server
@c0h1b4
About MSSQL MCP Server
No overview available yet
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mssql-mcp-server-c0h1b4": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@c0h1b4/mssql-mcp-server",
"--client",
"claude"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is MSSQL MCP Server?
A Model Context Protocol (MCP) server that connects to Microsoft SQL Server databases. It provides tools for executing SQL queries and managing database connections, primarily for AI assistants like Claude.
How to use MSSQL MCP Server?
Install via npm (npm install mssql-mcp-server) or using Smithery. Add the server to your MCP settings configuration file with environment variables for either a full connection string or individual connection parameters (host, port, database, user, password). Then invoke the query tool to run SQL queries.
Key features of MSSQL MCP Server
- Execute SQL queries on Microsoft SQL Server databases
- Supports connection string or individual connection parameters
- Blocks dangerous SQL commands (DROP, TRUNCATE, ALTER, etc.)
- Validates input parameters and database names
- Implements connection pooling for performance and security
- Runs locally or in Docker container
Use cases of MSSQL MCP Server
- Let an AI assistant query a SQL Server database in natural language
- Automate database reporting through an AI agent
- Build intelligent workflows that read and analyze database tables
- Provide a secure, sandboxed SQL interface for LLM-based tools
FAQ from MSSQL MCP Server
What is MSSQL MCP Server?
It is an MCP server that enables AI assistants to connect to and query Microsoft SQL Server databases using the Model Context Protocol.
How do I install MSSQL MCP Server?
You can install it via npm with npm install mssql-mcp-server or automatically through Smithery using npx -y @smithery/cli install @c0h1b4/mssql-mcp-server --client claude.
How do I configure the database connection?
Set environment variables in your MCP settings file: either MSSQL_CONNECTION_STRING with a full connection string, or individual parameters like MSSQL_HOST, MSSQL_PORT, MSSQL_DATABASE, MSSQL_USER, and MSSQL_PASSWORD.
What safety measures does MSSQL MCP Server include?
It blocks potentially harmful commands such as DROP, TRUNCATE, ALTER, CREATE, and EXEC. It also validates input parameters, limits query length and timeout, and uses connection pooling.
Can I run MSSQL MCP Server with Docker?
Yes. A docker-compose.yml is provided to start both SQL Server and the MCP server, or you can build the image manually with docker build -t mssql-mcp-server . and run the container.
Frequently asked questions
What is MSSQL MCP Server?
It is an MCP server that enables AI assistants to connect to and query Microsoft SQL Server databases using the Model Context Protocol.
How do I install MSSQL MCP Server?
You can install it via npm with `npm install mssql-mcp-server` or automatically through Smithery using `npx -y @smithery/cli install @c0h1b4/mssql-mcp-server --client claude`.
How do I configure the database connection?
Set environment variables in your MCP settings file: either `MSSQL_CONNECTION_STRING` with a full connection string, or individual parameters like `MSSQL_HOST`, `MSSQL_PORT`, `MSSQL_DATABASE`, `MSSQL_USER`, and `MSSQL_PASSWORD`.
What safety measures does MSSQL MCP Server include?
It blocks potentially harmful commands such as DROP, TRUNCATE, ALTER, CREATE, and EXEC. It also validates input parameters, limits query length and timeout, and uses connection pooling.
Can I run MSSQL MCP Server with Docker?
Yes. A `docker-compose.yml` is provided to start both SQL Server and the MCP server, or you can build the image manually with `docker build -t mssql-mcp-server .` and run the container.
Basic information
More Databases MCP servers
MCP Alchemy
runekaagaardA MCP (model context protocol) server that gives the LLM access to and knowledge about relational databases like SQLite, Postgresql, MySQL & MariaDB, Oracle, and MS-SQL.

PostgreSQL
modelcontextprotocolModel Context Protocol Servers
Elasticsearch/OpenSearch MCP Server
cr7258A Model Context Protocol (MCP) server implementation that provides Elasticsearch and OpenSearch interaction.
Meilisearch MCP Server
meilisearchA Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
MySQL MCP Server
designcomputerA Model Context Protocol (MCP) server that enables secure interaction with MySQL databases
Comments