by daobataotie
Provides database interaction and business intelligence capabilities for Microsoft SQL Server, enabling execution of queries, table management, and automatic generation of business insight memos.
Enables running SELECT, INSERT, UPDATE, DELETE statements against a MSSQL database, managing tables, and automatically generating business‑insight memos based on query results.
pip install -r requirements.txt (Python 3.x required).config.json next to server.py containing database connection details and server metadata.npx -y @modelcontextprotocol/inspector python C:\mssql-mcp\src\server.py
Q: Which ODBC driver is required? A: ODBC Driver 17 for SQL Server.
Q: Can the server run on Windows and Linux? A: Yes, as long as Python 3.x and the appropriate ODBC driver are installed.
Q: How are SQL errors handled? A: Execution errors are caught and the server attempts self‑correction before returning a response.
MSSQL MCP Server, provides database interaction and business intelligence capabilities. This server enables running SQL queries, analyzing business data, and automatically generating business insight memos.
Refer to the official website's SQLite for modifications to adapt to MSSQL
read_query
write_query
create_table
list_tables
describe-table
append_insight
The database table is as follows. The column names are not standardized, and AI will match them on its own. Errors during SQL execution will self correct.

The following is the demo.

Python 3.xPackages
ODBC Driver 17 for SQL ServerCD /d ~/mssql-mcp
pip install -r requirements.txt
#with server.py same folder create config.json,add:
{
"database": {
"driver": "ODBC Driver 17 for SQL Server",
"server": "server ip",
"database": "db name",
"username": "username",
"password": "password",
"trusted_connection": false
},
"server": {
"name": "mssql-manager",
"version": "0.1.0"
}
}
# add to claude_desktop_config.json. Note:use your path
{
"mcpServers": {
"mssql": {
"command": "python",
"args": [
# your path,e.g.:"C:\\mssql-mcp\\src\\server.py"
"~/server.py"
]
}
}
}
# Add according to the following diagram Cursor MCP. Note:use your path

Note:The new version of cursor has also been changed to JSON configuration, please refer to the previous section
# Note:use your path
npx -y @modelcontextprotocol/inspector python C:\\mssql-mcp\\src\\server.py
mssql-mcp
├── .git
├── .gitignore
├── LICENSE
├── README.md
├── README_en.md
├── README_zh.md
├── imgs
│ ├── cursor_config.png
│ ├── table.png
│ └── demo.gif
├── requirements.txt
└── src
├── __init__.py
└── server.py
MIT License
Please log in to share your review and rating for this MCP.
{
"mcpServers": {
"mssql-mcp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/inspector",
"python",
"C:\\mssql-mcp\\src\\server.py"
]
}
}
}claude mcp add mssql-mcp npx -y @modelcontextprotocol/inspector python C:\mssql-mcp\src\server.pyExplore related MCPs that share similar capabilities and solve comparable challenges
by googleapis
An MCP server that streamlines database tool development by handling connection pooling, authentication, observability, and secure access, allowing agents to interact with databases via natural language.
by bytebase
Provides a universal gateway that lets MCP‑compatible clients explore and query MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite databases through a single standardized interface.
by designcomputer
Enables secure interaction with MySQL databases via the Model Context Protocol, allowing AI applications to list tables, read contents, and execute queries safely.
by benborla
Provides read‑only access to MySQL databases for large language models, allowing schema inspection and safe execution of SQL queries.
by neo4j-contrib
Enables natural‑language interaction with Neo4j databases, allowing large language models to query, modify, and manage graph data through multiple transport modes.
by mongodb-js
Provides a Model Context Protocol server that enables interaction with MongoDB databases and MongoDB Atlas clusters through a unified API.
by ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by neondatabase
Interact with Neon Postgres databases using natural language commands through the Model Context Protocol, enabling conversational database creation, migration, and query execution.
by motherduckdb
Enables SQL analytics on DuckDB and MotherDuck databases via a Model Context Protocol server, allowing AI assistants and IDEs to query data directly.