CM

cwilby/mcp-node-mssql

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

8 stars 6 forks 质量 71 趋势 16MIT

MCP Server for SQL Server using node-mssql

概览

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: 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: 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: Before doing anything else, please make sure you are running the latest version!

README

以下为原文 README 节选,完整内容请查看原文。

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!

在 GitHub 查看完整 README

安装

npx -y mcp-node-mssql
新手?先看 mcpskill.org 教程 →

配置

{ "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" } } } }