blehew-augeo/mssql-mcp-server
If you are the rightful owner of mssql-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server for executing SQL queries against Microsoft SQL Server databases.
mssql-mcp-server
A Model Context Protocol (MCP) server for executing SQL queries against Microsoft SQL Server databases.
⚠️ Security Warning: This tool can execute any SQL query you provide. Use with caution and ensure proper database permissions.
Installation
- Download the latest
mcp-server.exe
from the releases page - Place
mcp-server.exe
anywhere you like (e.g.,C:\tools\mcp-server.exe
orC:\Users\YourName\Desktop\mcp-server.exe
)
Configuration
Add to your Cursor MCP configuration at C:\Users\<username>\.cursor\mcp.json
:
{
"mcpServers": {
"go-mcp-server": {
"command": "C:\\path\\to\\your\\mcp-server.exe",
"env": {
"MSSQL_CONNECTION_STRING": "server=localhost\\SQLEXPRESS;database=YourDatabase;trusted_connection=true;encrypt=false;trustservercertificate=true;"
}
}
}
}
Update the connection to replace the server and the database with the one you're trying to connect to. Windows Authentication SHOULD work with it, but if not you can add a User ID/Password like this:
server={SOME SERVER};database={SOME DATABASE};User ID={USER NAME};Password={PASSWORD};encrypt=false;trustservercertificate=true;Connection Timeout=180;MultipleActiveResultSets=True
Replace C:\\path\\to\\your\\mcp-server.exe
with the actual path where you saved the file.
Restart Cursor and the server will be available with SQL execution tools.
Usage
Ask Cursor to use the execute_sql
tool to query your database:
- "How many tables are in the database?"
- "Show me the top 10 rows from the users table"
Development
go build -o mcp-server.exe