MSSQL MCP Server
@ConnorDaytonaHolmes
About MSSQL MCP Server
MCP server to interact with MSSQL
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mssql-mcp-server-connordaytonaholmes": {
"command": "python",
"args": [
"-m",
"mssql_mcp.server"
]
}
}
}Tools
2List all accessible databases
List tables in the current database
Overview
What is MSSQL MCP Server?
An MCP server for read-only Microsoft SQL Server interactions, providing safe, read-only access to MSSQL databases through the Model Context Protocol. It is designed for developers who need to explore database schemas and run validated SELECT queries without modifying data.
How to use MSSQL MCP Server?
Install the package with pip install -e ., create a .env file with connection details (e.g., MSSQL_SERVER, MSSQL_DATABASE, MSSQL_USERNAME, MSSQL_PASSWORD), then run the server in development mode with mcp dev src/mssql_mcp/server.py, integrate with Claude Desktop via mcp install src/mssql_mcp/server.py --name "MSSQL Server", or execute directly with python -m mssql_mcp.server.
Key features of MSSQL MCP Server
- Read-only operations: only SELECT, DECLARE, and SET allowed
- Schema exploration: browse databases, tables, columns, and indexes
- SQL injection protection and query validation
- Secure connection handling with proper cleanup
- Accessible via MCP resources and tools
Use cases of MSSQL MCP Server
- Developers exploring MSSQL schemas safely without write access
- Building MCP-enabled applications requiring read-only database access
- Safe integration of MSSQL into AI assistants for schema browsing
- Database teams providing read-only access for analysis or reporting
FAQ from MSSQL MCP Server
What operations are allowed?
Only SELECT, DECLARE, and SET (for local variables) statements; no DDL or DML operations are permitted.
What are the system requirements?
Python 3.9+, access to a Microsoft SQL Server instance, and the pymssql library (installed automatically with the package).
How is the database connection configured?
Connection details are set in a .env file in the current directory, using environment variables like MSSQL_SERVER, MSSQL_DATABASE, MSSQL_USERNAME, and MSSQL_PASSWORD.
Does the server support authentication via credentials?
Yes, it uses MSSQL_USERNAME and MSSQL_PASSWORD environment variables, with secure connection handling.
What resources are available for schema exploration?
Resources such as db://schemas, db://tables/{database}, db://schema_tables/{schema_name}, db://columns/{schema_name}/{table_name}, and db://indexes/{database}/{schema_name}/{table_name} are provided.
Frequently asked questions
What operations are allowed?
Only SELECT, DECLARE, and SET (for local variables) statements; no DDL or DML operations are permitted.
What are the system requirements?
Python 3.9+, access to a Microsoft SQL Server instance, and the pymssql library (installed automatically with the package).
How is the database connection configured?
Connection details are set in a `.env` file in the current directory, using environment variables like `MSSQL_SERVER`, `MSSQL_DATABASE`, `MSSQL_USERNAME`, and `MSSQL_PASSWORD`.
Does the server support authentication via credentials?
Yes, it uses `MSSQL_USERNAME` and `MSSQL_PASSWORD` environment variables, with secure connection handling.
What resources are available for schema exploration?
Resources such as `db://schemas`, `db://tables/{database}`, `db://schema_tables/{schema_name}`, `db://columns/{schema_name}/{table_name}`, and `db://indexes/{database}/{schema_name}/{table_name}` are provided.
Basic information
More Databases MCP servers

Local YDB MCP
astandrikSafety-first stdio MCP server with 38 tools for operating Docker-based local-ydb environments locally or over SSH.
Sail MCP Server for Spark SQL
lakehqDrop-in Apache Spark replacement written in Rust, unifying batch processing, stream processing, and compute-intensive AI workloads.
Xata MCP Server
The Xata MCP server lets AI assistants and agents interact with your Xata organizations, projects, and Postgres database branches.
Dbhub
bytebaseZero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, SQLite.
mcp_mysql_server
xwb602625136Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
Comments