mcp-node-mssql
MCP Server for SQL Server using node-mssql
Documentation
mcp-node-mssql
Usage
Cursor
See the official Cursor docs for more information.
1. Open (or create) the `mcp.json` file (it should be in `~/.cursor/mcp.json` or `/.cursor/mcp.json`, but see Cursor docs for more details).
2. Add the following details and save the file:
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": [
"-y",
"mcp-node-mssql"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "1433",
"DB_USERNAME": "",
"DB_PASSWORD": "",
"DB_DATABASE": "",
"CONNECTION_TIMEOUT": 600000,
"REQUEST_TIMEOUT": 300000
"DB_ENCRYPT": "false",
"DB_ENABLE_ARITH_ABORT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "false",
"TRUSTED_CONNECTION": "false"
}
}
}
}Windsurf
See the official Windsurf docs for more information.
1. Open the `Windsurf MCP Configuration Panel`
2. Click `Add custom server`.
3. Add the following details and save the file:
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": [
"-y",
"mcp-node-mssql"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "1433",
"DB_USERNAME": "",
"DB_PASSWORD": "",
"DB_DATABASE": "",
"CONNECTION_TIMEOUT": 600000,
"REQUEST_TIMEOUT": 300000
"DB_ENCRYPT": "false",
"DB_ENABLE_ARITH_ABORT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "false",
"TRUSTED_CONNECTION": "false"
}
}
}
}Claude Code
See the official Claude Code docs for more information.
_You can add a new MCP server from the Claude Code CLI. But modifying the json file directly is simpler!_
1. Open the Claude Code configuration file (it should be in `~/.claude.json`).
2. Find the `projects` > `mcpServers` section and add the following details and save the file:
{
"projects": {
"mcpServers": {
"mssql": {
"command": "npx",
"args": [
"-y",
"mcp-node-mssql"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "1433",
"DB_USERNAME": "",
"DB_PASSWORD": "",
"DB_DATABASE": "",
"CONNECTION_TIMEOUT": 600000,
"REQUEST_TIMEOUT": 300000
"DB_ENCRYPT": "false",
"DB_ENABLE_ARITH_ABORT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "false",
"TRUSTED_CONNECTION": "false"
}
}
}
}
}Issues and Troubleshooting
Before doing anything else, please make sure you are running the latest version!
If you run into problems using this MCP server, please open an issue on GitHub!
Development
Installation
npm installBuild
npm run buildRunning the Development Server Locally
To test your local development version of the MCP server rather than using the published package, follow these steps:
1. Build the project:
npm run build2. Create or modify your `mcp.json` file to reference your local build:
{
"mcpServers": {
"mssql": {
"command": "node",
"args": [
"/path/to/your/local/mcp-node-mssql/dist/index.js"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "1433",
"DB_USERNAME": "",
"DB_PASSWORD": "",
"DB_DATABASE": "",
"CONNECTION_TIMEOUT": 600000,
"REQUEST_TIMEOUT": 300000
"DB_ENCRYPT": "false",
"DB_ENABLE_ARITH_ABORT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "false",
"TRUSTED_CONNECTION": "false"
}
}
}
}3. Place this `mcp.json` file in one of the following locations:
4. Restart your AI assistant (Cursor or Windsurf) to load the new configuration.
This allows you to instantly test changes to the MCP server without having to publish a new version.
Frequently asked questions
What is mcp-node-mssql?
mcp-node-mssql is MCP Server for SQL Server using node-mssql
How do I install mcp-node-mssql?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-node-mssql open source?
Yes — it is hosted on GitHub at https://github.com/cwilby/mcp-node-mssql and has 8 stars.
Related MCP tools
Model Context Protocol Servers
The Open-Source Multimodal AI Agent Stack: Connecting Cutting-Edge AI Models and Agent Infra
A MCP for Claude Desktop / Claude Code / Windsurf / Cursor to build n8n workflows for you
MCP server to provide Figma layout information to AI coding agents like Cursor
The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Instant is the best backend for AI-coded apps. You get auth, permissions, storage, presence, and streams — everything you need to ship apps your users will love.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP