SQL Server MCP

Integrations

  • Enables Windsurf (Codeium's AI assistant) to connect to and interact with Microsoft SQL Server databases.

  • Offers GitHub integration for issue reporting and troubleshooting related to the MCP server functionality.

mcp-node-mssql

用法

光标

请参阅官方 Cursor 文档以了解更多信息。

  1. 打开(或创建) mcp.json文件(它应该位于~/.cursor/mcp.json<project-root>/.cursor/mcp.json中,但有关更多详细信息,请参阅 Cursor 文档)。
  2. 添加以下详细信息并保存文件:
{ "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>" } } } }

风帆冲浪

请参阅官方 Windsurf 文档以了解更多信息。

  1. 打开Windsurf MCP Configuration Panel
  2. 单击Add custom server
  3. 添加以下详细信息并保存文件:
{ "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>" } } } }

克劳德·科德

请参阅官方 Claude Code 文档以了解更多信息。

您可以从 Claude Code CLI 添加新的 MCP 服务器。但直接修改 json 文件更简单!

  1. 打开 Claude Code 配置文件(它应该在~/.claude.json中)。
  2. 找到projects > mcpServers部分并添加以下详细信息并保存文件:
{ "projects": { "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>" } } } } }

问题和故障排除

在执行任何其他操作之前,请确保您正在运行最新版本!

如果您在使用此 MCP 服务器时遇到问题,请在GitHub上打开一个问题!

发展

安装

npm install

建造

npm run build

本地运行开发服务器

要测试 MCP 服务器的本地开发版本(而不是使用已发布的包),请按照以下步骤操作:

  1. 构建项目:
npm run build
  1. 创建或修改您的mcp.json文件以引用您的本地构建:
{ "mcpServers": { "mssql": { "command": "node", "args": [ "/path/to/your/local/mcp-node-mssql/dist/index.js" ], "env": { "DB_HOST": "localhost", "DB_PORT": "1433", "DB_USERNAME": "<username>", "DB_PASSWORD": "<password>", "DB_DATABASE": "<database>" } } } }
  1. 将此mcp.json文件放置在以下位置之一:
    • 对于 Cursor:在您的主目录( ~/.cursor/mcp.json )或项目目录( .cursor/mcp.json )中
    • 对于 Windsurf:使用 MCP 配置面板添加自定义服务器
  2. 重新启动您的 AI 助手(Cursor 或 Windsurf)以加载新配置。

这使您可以立即测试 MCP 服务器的更改,而无需发布新版本。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器,通过环境可配置连接提供连接,使 AI 助手(Cursor、Windsurf、Claude Code)能够与 Microsoft SQL Server 数据库进行交互。

  1. Usage
    1. Cursor
    2. Windsurf
    3. Claude Code
  2. Issues and Troubleshooting
    1. Development
      1. Installation
      2. Build
      3. Running the Development Server Locally

    Related MCP Servers

    • -
      security
      A
      license
      -
      quality
      A Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.
      Last updated -
      12
      Python
      MIT License
      • Linux
      • Apple
    • A
      security
      A
      license
      A
      quality
      A Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.
      Last updated -
      1
      30
      Python
      MIT License
      • Linux
      • Apple
    • -
      security
      -
      license
      -
      quality
      A Model Context Protocol server that enables AI assistants to securely interact with ClickHouse databases, supporting table exploration and SQL query execution through a controlled interface.
      Last updated -
      6
      Python
      Apache 2.0
    • -
      security
      A
      license
      -
      quality
      A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
      Last updated -
      6
      TypeScript
      MIT License

    View all related MCP servers

    ID: o4qk49s0sp