- Home
- MCP servers
- MSSQL
MSSQL
- typescript
6
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"cwilby-mcp-node-mssql": {
"command": "npx",
"args": [
"-y",
"mcp-node-mssql"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "1433",
"DB_ENCRYPT": "false",
"DB_DATABASE": "mydb",
"DB_PASSWORD": "your_password",
"DB_USERNAME": "sa",
"REQUEST_TIMEOUT": "300000",
"CONNECTION_TIMEOUT": "600000",
"TRUSTED_CONNECTION": "false",
"DB_ENABLE_ARITH_ABORT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "false"
}
}
}
}You can run a MSSQL MCP server locally or in your environment to provide MSSQL data access and actions through MCP clients. This server configuration enables you to connect to a SQL Server instance using standard MCP clients and perform data operations through the MCP protocol with consistent timeouts and security settings.
How to use
Use an MCP client (Cursor, Windsurf, or Claude Code) to connect to the MSSQL MCP server. You run the MCP server process with the provided command, ensure your database connection details are correct, and then perform data queries and actions through the MCP interface just like you would with other MCP servers.
How to install
Prerequisites you need before installing this MCP server:
- Node.js (and npm) installed on your system.
Step-by-step installation and setup:
npm install
npm run build
Create or modify your mcp.json for your chosen MCP client to reference this server:
Configuration for MCP clients
You can configure this MCP server in various MCP clients by providing the following details. The configurations below are identical across clients and use the binary runner npx to launch the MCP server package mcp-node-mssql with a shared environment setup.
{
"mcpServers": {
"mssql": {
"command": "npx",
"args": [
"-y",
"mcp-node-mssql"
],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "1433",
"DB_USERNAME": "<username>",
"DB_PASSWORD": "<password>",
"DB_DATABASE": "<database>",
"CONNECTION_TIMEOUT": 600000,
"REQUEST_TIMEOUT": 300000,
"DB_ENCRYPT": "false",
"DB_ENABLE_ARITH_ABORT": "false",
"DB_TRUST_SERVER_CERTIFICATE": "false",
"TRUSTED_CONNECTION": "false"
}
}
}
}
Run locally and test
After you’ve installed and configured, start your local MCP server with the appropriate client configuration. Use the client’s mechanisms to reference your local build or the npm package, and ensure the environment variables match your database setup.