mcp-mssql
This document provides a guide to setting up a Model Context Protocol (MCP) server for MSSQL and connecting it to a cursor editor.
GUIDE
-
Create the Virtual Environment: Run the following command to create a virtual environment named
venv
:python3.10 -m venv venv
-
Activate the Virtual Environment:
- On macOS and Linux:
source venv/bin/activate
- On macOS and Linux:
-
Verify the Python Version: After activation, verify that the virtual environment is using Python 3.10 by running:
python --version
-
Enter Connection String Details:
- Create a
.env
file and add the following connection details:
MSSQL_SERVER=localhost MSSQL_USER=SA MSSQL_PASSWORD=YourStrong@Passw0rd MSSQL_DATABASE=localdatabase MSSQL_PORT=1433
- Create a
-
Connect MSSQL MCP Server to Your Cursor Editor:
- Create or edit the file in folder:
.cursor/mcp.json
{ "mcpServers": { "mssql": { "command": "uv", "args": [ "--directory", "path/to/mssql_mcp_server", "run", "mssql_mcp_server" ], "env": { "MSSQL_SERVER": "localhost", "MSSQL_USER": "your_username", "MSSQL_PASSWORD": "your_password", "MSSQL_DATABASE": "your_database" } } } }
- Create or edit the file in folder:
-
Select AGENT mode in your editor and check connection
- you can prompt the Cursor with something like this "Use MSSQL MCP server to check connection"
Related MCP Servers
View all databases servers →gateway
by centralmind
CentralMind Gateway is a tool designed to expose databases to AI agents via MCP or OpenAPI protocols, providing secure, LLM-optimized APIs.
supabase-mcp
by supabase-community
Connect your Supabase projects to AI assistants using the Model Context Protocol (MCP) server.
mindsdb
by mindsdb
MindsDB is an open-source server that enables seamless interaction with large-scale federated data using the Model Context Protocol (MCP).
azure-mcp
by Azure
The Azure MCP Server implements the MCP specification to create a seamless connection between AI agents and Azure services.
genai-toolbox
by googleapis
MCP Toolbox for Databases is an open source MCP server for databases, designed to simplify and secure the development of database tools.
prisma
by prisma
Prisma is a next-generation ORM for Node.js and TypeScript, providing tools for data modeling, migrations, and querying databases.
mcp-notion-server
by suekou
MCP Server for the Notion API, enabling LLM to interact with Notion workspaces. Additionally, it employs Markdown conversion to reduce context size when communicating with LLMs, optimizing token usage and making interactions more efficient.