by daobataotie
Provides SQL query execution, table management, and automatic business insight memo generation for Microsoft SQL Server databases.
Mssql Mcp delivers a server that interacts with Microsoft SQL Server to run SELECT, INSERT, UPDATE, DELETE queries, manage tables, describe schemas, and append business insights to a memo resource. It integrates with Model Context Protocol clients to enable AI‑driven data analysis and insight generation.
cd /d ~/mssql-mcp
pip install -r requirements.txt
config.json
in the same directory as server.py
with database connection details and server metadata.npx -y @modelcontextprotocol/inspector python C:\mssql-mcp\src\server.py
SELECT
) queries.INSERT
, UPDATE
, DELETE
).Q: Which ODBC driver is required? A: ODBC Driver 17 for SQL Server.
Q: What Python version is supported? A: Python 3.x.
Q: Can I use Windows authentication?
A: Yes, set "trusted_connection": true
in config.json
and omit username/password.
Q: How do I integrate with Cursor?
A: Follow the illustrated configuration steps in the README and provide the path to server.py
.
Q: Do I need an API key for the MCP server? A: No API key is required for the core Python server; only the optional inspector wrapper may need environment variables for external services.
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" ], "env": {} } } }
Discover more MCP servers with similar functionality and use cases
by googleapis
Provides a configurable MCP server that abstracts connection pooling, authentication, observability, and tool management to accelerate development of database‑backed AI tools.
by bytebase
DBHub is a universal database gateway that implements the Model Context Protocol (MCP) server interface, enabling MCP-compatible clients to interact with various databases.
by neo4j-contrib
Provides Model Context Protocol servers for interacting with Neo4j databases, managing Aura instances, and handling personal knowledge graph memory through natural‑language interfaces.
by mongodb-js
Provides a Model Context Protocol server that connects to MongoDB databases and Atlas clusters, exposing a rich set of tools for querying, managing, and administering data and infrastructure.
by benborla
A Model Context Protocol (MCP) server that provides read-only access to MySQL databases, enabling Large Language Models (LLMs) to inspect database schemas and execute read-only queries.
by ClickHouse
Provides tools that let AI assistants run read‑only SQL queries against ClickHouse clusters or the embedded chDB engine, plus a health‑check endpoint for service monitoring.
by elastic
Provides direct, natural‑language access to Elasticsearch indices via the Model Context Protocol, allowing AI agents to query and explore data without writing DSL.
by motherduckdb
Provides an MCP server that enables SQL analytics on DuckDB and MotherDuck databases, allowing AI assistants and IDEs to execute queries via a unified interface.
by redis
Provides a natural language interface for agentic applications to manage and search data in Redis efficiently.