Jewei Mssql Mcp Server

by jeweis

342 downloads
Not rated
GitHub

About

这是一个mssql MCP服务器,专门用于执行Microsoft SQL Server的数据查询和表结构查询操作。该服务器提供了一系列工具,使客户端能够方便地与SQL Server数据库进行交互。

Details

Author
jeweis
Downloads
342
Categories
Database

- Supports multiple MCP-compatible clients (Windsurf, Cursor, Claude, Cline)
- Configured via standard environment variables for database credentials
- Uses the uvx command for simple installation and execution
- Connects to any accessible Microsoft SQL Server instance

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Jewei Mssql Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Configure the server in your client's MCP settings file using the uvx command with the package name jewei-mssql-mcp-server. Provide environment variables for your database connection: DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, and DB_PORT. Supported clients include Windsurf, Cursor, Claude, and Cline.

query_sql

执行SQL查询并返回结果集(仅支持SELECT语句) Args: sql: SQL查询语句(必须是SELECT语句,) Returns: 包含查询结果的字典,格式为: { "columns": [列名列表], "rows": [行数据列表], "row_count": 结果行数 }

get_table_structure

获取指定表的结构信息 Args: table_name: 表名 schema: 架构名,默认为dbo Returns: 包含表结构信息的字典,格式为: { "columns": [列信息列表], "primary_keys": [主键列表], "foreign_keys": [外键信息列表], "indexes": [索引信息列表] }

list_tables

列出数据库中的所有表 Args: schema: 架构名,默认为dbo Returns: 包含表列表的字典,格式为: { "tables": [表信息列表], "count": 表数量 }

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "jewei mssql mcp server": {
            "jewei-mssql": {
                "command": "uvx",
                "args": [
                    "jewei-mssql-mcp-server"
                ],
                "env": {
                    "DB_HOST": "<your_db_host>",
                    "DB_USER": "<your_db_user>",
                    "DB_PASSWORD": "<your_db_password>",
                    "DB_NAME": "<your_db_name>",
                    "DB_PORT": "<your_db_port>"
                }
            }
        }
    }
}

McpServers

{
    "jewei-mssql": {
        "command": "uvx",
        "args": [
            "jewei-mssql-mcp-server"
        ],
        "env": {
            "DB_HOST": "<your_db_host>",
            "DB_USER": "<your_db_user>",
            "DB_PASSWORD": "<your_db_password>",
            "DB_NAME": "<your_db_name>",
            "DB_PORT": "<your_db_port>"
        }
    }
}

MCP 配置

本项目支持通过多种客户端配置 MCP 服务器,以便与各种 IDE 或工具集成。以下是一些常见客户端的配置示例:

Windsurf / Cursor / Claude

对于基于 Windsurf 框架的客户端(如 Cursor 和 Claude),您可以在 ~/.codeium/windsurf/mcp_config.json 文件中配置 MCP 服务器。以下是一个示例配置:

{
  "mcpServers": {
    "jewei-mssql": {
      "disabled": false,
      "command": "uvx",
      "args": [
        "jewei-mssql-mcp-server"
      ],
      "env": {
        "DB_HOST": "your_db_host",
        "DB_USER": "your_db_user",
        "DB_PASSWORD": "your_db_password",
        "DB_NAME": "your_db_name",
        "DB_PORT": "your_db_port"
      }
    }
  }
}

请将 your_db_host, your_db_user, your_db_password, 和 your_db_name 替换为您的实际数据库连接信息。

Cline

对于 Cline 客户端,您可以在其配置文件中添加类似的 MCP 服务器配置。具体的配置方式请参考 Cline 的官方文档。通常,您需要指定服务器的名称、命令、参数和环境变量。

// Cline 配置文件示例 (具体格式请参考 Cline 文档)
{
  "mcpServers": {
    "jewei-mssql": {
      "command": "uvx",
      "args": [
        "jewei-mssql-mcp-server"
      ],
      "env": {
        "DB_HOST": "your_db_host",
        "DB_USER": "your_db_user",
        "DB_PASSWORD": "your_db_password",
        "DB_NAME": "your_db_name",
        "DB_PORT": "your_db_port"
      }
    }
  }
}

请将示例中的占位符替换为您的实际数据库连接信息,并根据 Cline 的具体配置格式进行调整。

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.