MaxCompute MCP Server

MaxCompute MCP Server

site icon
2025.04.28 0
Python数据查询数据库管理数据库
MaxCompute MCP Server 是一个为 MaxCompute 设计的模型上下文协议(MCP)服务器,提供了一系列核心工具来查询和管理 MaxCompute 项目中的数据。
View on GitHub

Overview

基本能力

产品定位

MaxCompute MCP Server 是一个为 MaxCompute 设计的模型上下文协议(MCP)服务器,主要用于查询和管理 MaxCompute 项目中的数据。

核心功能

  1. 查询工具
  2. get_latest_partition:获取指定表的最新分区名称。
  3. read_query:执行 SELECT 查询并返回结果。

  4. 模式工具

  5. list_tables:列出 MaxCompute 项目中的所有表。
  6. describe_table:获取指定表的模式信息。

适用场景

  • 数据分析和查询
  • 数据库管理
  • 数据仓库操作

工具列表

  1. get_latest_partition
  2. 能力:获取指定表的最新分区名称。

  3. read_query

  4. 能力:执行 SELECT 查询并返回结果。

  5. list_tables

  6. 能力:列出 MaxCompute 项目中的所有表。

  7. describe_table

  8. 能力:获取指定表的模式信息。

常见问题解答

使用教程

使用依赖

  • 无明确前置依赖,但需要 MaxCompute 项目的访问权限。

安装教程

# Install maxcompute-mcp-server
cd /path/to/maxcompute-mcp-server
uv pip install .
uv build

调试方式

  • 无明确调试命令,但可以通过配置 cline_mcp_settings.json 文件来设置服务器参数。
# Add the server to your cline_mcp_settings.json
"mcpServers": {
  "maxcompute-mcp-server": {
    "command": "uv",
    "args": [
      "run",
      "--with",
      "maxcompute-mcp-server",
      "maxcompute-mcp-server"
    ],
    "env": {
      "ALIBABA_CLOUD_ACCESS_KEY_ID": "",
      "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "",
      "ALIBABA_CLOUD_MAXCOMPUTE_PROJECT": "",
      "ALIBABA_CLOUD_MAXCOMPUTE_ENDPOINT": "http://service.cn.maxcompute.aliyun.com/api"
    }
  }
}

许可证

该项目遵循 Apache-2.0 开源许可条款,请参阅 Apache-2.0 了解完整条款。