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.x
Packages
ODBC Driver 17 for SQL Server
CD /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" ] } } }
Explore 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 ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by chroma-core
Offers an MCP server exposing Chroma's vector database capabilities for LLM applications, supporting collection and document management, multiple embedding functions, and flexible client types such as in‑memory, persistent, HTTP, and cloud.
by kiliczsh
Enables LLMs to interact with MongoDB databases via a standardized interface, offering schema inspection, query execution, aggregation, and write capabilities, with optional read‑only mode and smart ObjectId handling.
by domdomegg
Provides read and write access to Airtable bases for AI systems, enabling inspection of schemas and manipulation of records.
by XGenerationLab
A Model Context Protocol (MCP) server that enables natural language queries to databases