Skip to main content

A MCP server for MaxCompute(tapdb revised)

Project description

MaxCompute MCP Server

本项目是基于阿里云的MCP的修改版,对业务进行了加固以及迭代
阿里云项目地址: https://github.com/datafe/maxcompute-mcp-server
主要修改:
1. 增加了sqlglot的依赖,实现对sql的专业化解析和处理,而不是简单的字符串查找
2. 移除了describe_table这个tool。实际上AI是完全自己能知道使用desc来获得表描述,
   这个方法有点多此一举。
3. 相应的readme文案调整   

Overview

A Model Context Protocol (MCP) server for MaxCompute.

Components

Tools

The server offers 3 core tools:

Query Tools

  • get_latest_partition

    • Get the latest partition name for a specific table
    • Input:
      • table_name (string): Name of the table
    • Returns: The latest partition name
  • read_query

    • Execute a read-only query on the MaxCompute project, such as SELECT or DESC query is allowed.
    • Input:
      • query (string): The read only SQL query
      • save_file_path (string,opitional): local file that save the query results as json list
    • Returns: Query results as array of objects

Schema Tools

  • list_tables
    • List all tables in the MaxCompute project
    • No input required
    • Returns: Array of table objects with name and comment

Build from source

cd /path/to/tapdb-maxcompute-mcp
uv pip install .
uv build

Usage with Cline

  • maxcompute endpoints can view in endpoint

  • maxcompute projects can view in projects

# Add the server to your cline_mcp_settings.json
"mcpServers": {
  "tapdb-maxcompute-mcp": {
    "command": "uv",
    "args": [
      "run",
      "--with",
      "tapdb-maxcompute-mcp",
      "tapdb-maxcompute-mcp"
    ],
    "env": {
      "ALIBABA_CLOUD_ACCESS_KEY_ID": "",
      "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "",
      "ALIBABA_CLOUD_MAXCOMPUTE_PROJECT": "",
      "ALIBABA_CLOUD_MAXCOMPUTE_ENDPOINT": "https://service.cn-shanghai.maxcompute.aliyun.com/api"
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tapdb_maxcompute_mcp-0.1.10.tar.gz (55.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tapdb_maxcompute_mcp-0.1.10-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file tapdb_maxcompute_mcp-0.1.10.tar.gz.

File metadata

  • Download URL: tapdb_maxcompute_mcp-0.1.10.tar.gz
  • Upload date:
  • Size: 55.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for tapdb_maxcompute_mcp-0.1.10.tar.gz
Algorithm Hash digest
SHA256 7ce49bc7bf203bda9e63c63a6d4d69a2596d372165eaf949d0327f6dc4b152f2
MD5 105a49e7e3c505b9fe499166e39ce2aa
BLAKE2b-256 fbb56908d9160693c3086168b46b5b00ab88e73fc8ded009f7e0a6ecea087e21

See more details on using hashes here.

File details

Details for the file tapdb_maxcompute_mcp-0.1.10-py3-none-any.whl.

File metadata

File hashes

Hashes for tapdb_maxcompute_mcp-0.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 f5bd37dd868a1ceaf48eb1e36bcd3c4b1b163ff7049cefd9b7f3cee8c830ed66
MD5 aa52f68044939d3acba3dbc934b18e82
BLAKE2b-256 aa1b45814abee6286ced9f6a9860ee466a104a204dd6c286e76ab70d32703144

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page