Get the FREE Ultimate OpenClaw Setup Guide →

maxcompute

Alibaba cloud MaxCompute (ODPS) MCP server implemented by python

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio datafe-maxcompute-mcp-server uv run --with maxcompute-mcp-server maxcompute-mcp-server \
  --env ALIBABA_CLOUD_ACCESS_KEY_ID="" \
  --env ALIBABA_CLOUD_ACCESS_KEY_SECRET="" \
  --env ALIBABA_CLOUD_MAXCOMPUTE_PROJECT="" \
  --env ALIBABA_CLOUD_MAXCOMPUTE_ENDPOINT="https://service.cn-shanghai.maxcompute.aliyun.com/api"

How to use

This MCP server provides a set of MaxCompute tools that allow you to query data and inspect schema within a MaxCompute project through the MCP interface. The four core tools are: get_latest_partition (to fetch the most recent partition name for a given table), read_query (to execute SELECT queries within the project), list_tables (to list all tables with their comments), and describe_table (to retrieve the schema information of a specific table). You can call these tools via the MCP protocol, providing the required inputs (such as table_name or query) and receiving structured responses like partition names, query results, and table metadata. The server enforces that read_query only executes SELECT statements, helping to mitigate unintended data changes. Use list_tables to discover available tables and then describe_table to understand their schema before crafting queries.

How to install

Prerequisites:

  • Python environment (3.8+)
  • Git installed
  • uv (Model Context Protocol runtime) available in your Python environment

Installation steps:

  1. Clone or download the repository: git clone https://github.com/datafe/maxcompute-mcp-server.git cd maxcompute-mcp-server

  2. Install the package from source (the project likely exposes a setup.py or pyproject). uv pip install . or uv install . depending on your environment

  3. Build the project (if the build step is required by the project): uv build

  4. Run the MCP server via UV using the provided configuration example (adjust environment variables as needed): uv run --with maxcompute-mcp-server maxcompute-mcp-server

  5. Verify the server is running by checking logs or querying a test endpoint in your MCP client.

Notes:

  • Ensure your environment variables for Alibaba Cloud MaxCompute credentials and endpoint are correctly set before starting.
  • If you clone a fork or different branch, follow the repository’s README for any project-specific setup steps.

Additional notes

Tips and considerations:

  • The ALIBABA_CLOUD_MAXCOMPUTE_ENDPOINT defaults to the Shanghai region; adjust if your project uses a different region.
  • Keep credentials secure; do not commit them in code or configuration files.
  • The server exposes four tools (get_latest_partition, read_query, list_tables, describe_table). For read_query, ensure your query string is a valid SELECT statement to pass the server’s restrictions.
  • Use list_tables to quickly discover available tables and their comments before inspecting schemas with describe_table.
  • If you encounter connection issues, verify network access to the MaxCompute endpoint and confirm that the endpoint URL matches your region and project configuration.
  • When deploying in different environments (dev, staging, prod), consider providing separate ALIBABA_CLOUD_* environment sets to isolate credentials and projects.

Related MCP Servers

Sponsor this space

Reach thousands of developers