AA

aliyun/alibabacloud-hologres-mcp-server

开发工具官方

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

37 stars 17 forks 质量 78 趋势 20Apache-2.0

aliyun/alibabacloud-hologres-mcp-server 是从 https://github.com/aliyun/alibabacloud-hologres-mcp-server. 导入的 MCP 服务器候选

概览

aliyun/alibabacloud-hologres-mcp-server 是从 https://github.com/aliyun/alibabacloud-hologres-mcp-server. 导入的 MCP 服务器候选

概述(AI 翻译)

英文 |中文

全息MCP服务器

Hologres MCP 服务器作为 AI 代理与 Hologres 数据库之间的通用接口。它实现了 AI 代理与 Hologres 之间的无缝通信,帮助 AI 代理检索 Hologres 数据库元数据并执行 SQL 操作。

配置

模式1:使用本地文件

下载

从Github下载

MCP集成

向MCP客户端配置文件添加以下配置:

模式2:使用PIP模式

安装

使用以下软件包安装MCP服务器:

MCP集成

向MCP客户端配置文件添加以下配置:

使用紫外线模式

使用UVX模式

模式3:使用可流式HTTP传输

该服务器支持可流式HTTP传输,适用于无法使用STDIO的远程部署场景。

启动服务器

启动服务器前,设置Hologres连接环境变量:

然后启动服务器:

MCP端点将在http:// : /mcp处提供。

CLI 选项

选项 默认 描述
--transport stdio 运输类型:stdio、streamable-http 或 sse

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

README

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

English | 中文

Hologres MCP Server

Hologres MCP Server serves as a universal interface between AI Agents and Hologres databases. It enables seamless communication between AI Agents and Hologres, helping AI Agents retrieve Hologres database metadata and execute SQL operations.

Configuration

Mode 1: Using Local File

Download

Download from Github

git clone https://github.com/aliyun/alibabacloud-hologres-mcp-server.git

MCP Integration

Add the following configuration to the MCP client configuration file:

{
    "mcpServers": {
        "hologres-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/path/to/alibabacloud-hologres-mcp-server",
                "run",
                "hologres-mcp-server"
            ],
            "env": {
                "HOLOGRES_HOST": "host",
                "HOLOGRES_PORT": "port",
                "HOLOGRES_USER": "access_id",
                "HOLOGRES_PASSWORD": "access_key",
                "HOLOGRES_DATABASE": "database"
            }
        }
    }
}

Mode 2: Using PIP Mode

Installation

Install MCP Server using the following package:

pip install hologres-mcp-server

MCP Integration

Add the following configuration to the MCP client configuration file:

Use uv mode

{
    "mcpServers": {
        "hologres-mcp-server": {
            "command": "uv",
            "args": [
                "run",
                "--with",
                "hologres-mcp-server",
                "hologres-mcp-server"
            ],
            "env": {
                "HOLOGRES_HOST": "host",
                "HOLOGRES_PORT": "port",
                "HOLOGRES_USER": "access_id",
                "HOLOGRES_PASSWORD": "access_key",
                "HOLOGRES_DATABASE": "database"
            }
        }
    }
}

Use uvx mode

{
    "mcpServers": {
        "hologres-mcp-server": {
            "command": "uvx",
            "args": [
                "hologres-mcp-server"
            ],
            "env": {
                "HOLOGRES_HOST": "host",
                "HOLOGRES_PORT": "port",
                "HOLOGRES_USER": "access_id",
                "HOLOGRES_PASSWORD": "access_key",
                "HOLOGRES_DATABASE": "database"
            }
        }
    }
}

Mode 3: Using Streamable HTTP Transport

The server supports Streamable HTTP transport for remote deployment scenarios where STDIO is not available.

Start the server

Before starting the server, set the Hologres connection environment variables:

export HOLOGRES_HOST="your-hologres-instance.hologres.aliyuncs.com"
export HOLOGRES_PORT="80"
export HOLOGRES_USER="your_access_id"
export HOLOGRES_PASSWORD="your_access_key"
export HOLOGRES_DATABASE="your_database"

Then start the server:

# Using pip-installed package
在 GitHub 查看完整 README

安装

uvx hologres-mcp-server
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "hologres-mcp-server": { "command": "uv", "args": [ "--directory", "/path/to/alibabacloud-hologres-mcp-server", "run", "hologres-mcp-server" ], "env": { "HOLOGRES_HOST": "host", "HOLOGRES_PORT": "port", "HOLOGRES_USER": "access_id", "HOLOGRES_PASSWORD": "access_key", "HOLOGRES_DATABASE": "database" } } } }