Execute SELECT queries to read data from the database
Execute INSERT, UPDATE, or DELETE queries to modify data in the database
Create new tables in the database
Get a list of all tables in the database
View schema information for a specific table
Add new business insights to the memo resource
MSSQL Manager provides a powerful interface for interacting with Microsoft SQL Server databases through natural language. It enables running SQL queries, analyzing business data, and automatically generating business insights. The tool bridges the gap between complex database operations and intuitive AI-driven interactions, making database management and analysis more accessible.
MSSQL Manager is a Model Context Protocol (MCP) server that enables AI assistants to interact with Microsoft SQL Server databases. It provides capabilities for executing queries, managing database structures, and generating business insights from your data.
Before installing MSSQL Manager, ensure you have:
git clone https://github.com/daobataotie/mssql-mcp.git
cd mssql-mcp
pip install -r requirements.txt
Create a config.json
file in the same directory as the server.py file with the following structure:
{
"database": {
"driver": "ODBC Driver 17 for SQL Server",
"server": "your_server_ip",
"database": "your_database_name",
"username": "your_username",
"password": "your_password",
"trusted_connection": false
},
"server": {
"name": "mssql-manager",
"version": "0.1.0"
}
}
Replace the placeholder values with your actual SQL Server connection details.
Add the following to your claude_desktop_config.json
file:
{
"mcpServers": {
"mssql": {
"command": "python",
"args": [
"/path/to/mssql-mcp/src/server.py"
]
}
}
}
Replace /path/to/mssql-mcp/src/server.py
with the actual path to the server.py file on your system.
For the new version of Cursor, add the configuration to your JSON configuration file:
{
"mcpServers": {
"mssql": {
"command": "python",
"args": [
"/path/to/mssql-mcp/src/server.py"
]
}
}
}
Replace /path/to/mssql-mcp/src/server.py
with the actual path to the server.py file on your system.
You can test the MCP server using the MCP Inspector tool:
npx -y @modelcontextprotocol/inspector python /path/to/mssql-mcp/src/server.py
Once integrated with your AI assistant, you can use natural language to:
The AI will handle translating your natural language requests into the appropriate SQL queries and commands, even with non-standardized column names.
The AI will execute the appropriate database operations and return the results in a readable format.