MaxCompute MCP Server (MCMCP) implements the Model Context Protocol (MCP) to package MaxCompute's metadata, compute, and table management capabilities as structured tools that AI Agents can understand and invoke. Using MCMCP, AI Agents can perform large-scale data analytics, multimodal data transformation, and intelligent Operations and Maintenance (O&M).
This topic describes the hosted Remote MCP Server (recommended) and the local MCP Server.
To ensure security, review and follow the Security precautions before you start.
If you have questions or suggestions, you can provide feedback through the following channels.
Function Overview
Agents invoke structured tools provided by MCMCP using the standard MCP protocol—no extra SDK or driver is required. MCMCP covers the full data operation workflow, from metadata browsing and SQL analysis to table management.
Core capabilities
Catalog metadata browsing and search: Browse projects, schemas, tables, fields, and partitions hierarchically. Supports natural language search.
Table management and metadata maintenance: Create tables (with options for lifecycle, primary key, and partial column updates), insert small amounts of data, and update table comments, tags, or column descriptions.
Identity and permission checks: View the current account identity and use MaxCompute authorization information to troubleshoot access issues.
Authentication and authorization:
The Remote MCP Server uses Alibaba Cloud OAuth for authorization.
The local MCP Server supports AccessKey/SecretKey (AK/SK), Security Token Service (STS), Credentials URI, ECS RAM Role, and the default Alibaba Cloud credential chain.
Read-only SQL analysis: Estimate costs, run asynchronous jobs, query instance statuses, and retrieve results. The read-only query path is protected on the server side. Write and metadata modification capabilities are listed separately and require user confirmation.
Quota discovery: View the list and details of MaxCompute Quotas available to the current account.
Knowledge base search and Q&A: The Remote MCP Server has a built-in MaxCompute documentation knowledge base that supports keyword searches and natural language Q&A, and returns answers with citations.
Skill discovery and reading: The Remote MCP Server has built-in MCP Skill resources. Clients can discover and retrieve Skill content using
tools/listfor scenarios such as Information Schema semantic analysis and feedback guidance.Information Schema O&M and governance analysis:
The Remote MCP Server has a built-in Information Schema semantic package.
The local MCP Server requires you to install the corresponding Skill.
Architecture overview

MCMCP uses a layered architecture, from top to bottom:
User Agent ecosystem: Supports multiple Agent clients including OpenClaw, DataWorks Agent, Qwen Code, QoderWork, and MaxAgent.
MaxCompute Skills collection: A universal skill package for Agents, containing semantic packs, common commands, development templates, and usage limits. Extends Agent capabilities via MaxCompute OpenAPI, InfraAgent, and CatalogAI.
MCMCP service: Wraps MaxCompute OpenAPI, StorageAPI, and CatalogAPI into structured tools directly callable by Agents.
MaxCompute core capabilities:
Metadata:
Catalog / Schema / Table / Partition. Features include authorization, auditing, data discovery, data exporting, masking, row-level permissions, and data sharing.
Compute Engines:
MaxCompute SQL, MaxFrame, MC Spark. Compute types include heterogeneous CU/GU, AI functions, and models.
Storage:
Table (Append / PK Delta Table); data types include BLOB, JSON, ARRAY, MAP, STRUCT. Features include automatic storage tiering, multi-replica, multi-AZ disaster recovery, recycle bin/Time Travel, data snapshots, and storage encryption.
Connection methods
The Remote MCP Server is the recommended connection method. It does not require you to run an MCP Server locally or store an AccessKey in a local MCP process.
The local MCP Server is for self-hosting, stdio, local development and debugging, or scenarios where you need direct control over credentials.
Scenario | Recommended method | Description |
Accessing MaxCompute from clients such as Claude Code, Codex, or Qwen Code | Remote MCP Server | This is the recommended method. You do not need to run an MCP Server locally or configure an AccessKey in a local MCP process. |
Accessing a hosted service in an enterprise VPC environment | VPC endpoint of the Remote MCP Server | This method uses the same OAuth and tool semantics as the public endpoint, but with a different domain name. |
Local development, debugging MCP Server code, or requiring stdio or self-hosting | Local MCP Server | This is an optional advanced method. It requires a local Python environment and MaxCompute credential configuration. |
Modifying local server code or submitting a bug for the local server | GitHub repository | Use the local issue template in the |
If you are unsure which method to choose, start with the Remote MCP Server.
Remote MCP Server (recommended)
The production Remote MCP Server uses MCP Streamable HTTP. The client must support HTTP MCP Servers and be able to handle the OAuth authorization flow.
Supported regions
Choose an endpoint based on your client's network.
A single connection, OAuth authorization, and subsequent calls must always use the same endpoint domain name. Do not mix public and VPC domain names during the authorization process.
Public endpoints
Public MCP endpoints are available by service region. The currently available regions are as follows:
Region type | Service region | MCP Endpoint |
The Chinese mainland public cloud |
|
|
Hong Kong (China) and outside China |
|
|
Finance Cloud | Not yet available | - |
Alibaba Gov Cloud | Not yet available | - |
Cross-region access is allowed within the same region type. To access a project in a different service region, specify the region in the conversation. For example: "Show me the tables in the
<project>project in thecn-shanghairegion" or "Show me the tables in the<project>project in theap-southeast-1region".The Hong Kong (China) service provides endpoints for both the Alibaba Cloud China Website (www.aliyun.com) and the Alibaba Cloud International Website (www.alibabacloud.com). When you log on with an account from the China website, use the endpoint with the
mcpprefix. When you log on with an account from the international website, use the endpoint with themcp-intlprefix. A single connection, OAuth authorization, and subsequent calls must always use the same endpoint domain name. Do not mix the two sites.If a Region ID is not listed under "Service region", the public MCP endpoint for that region is not yet available. Do not try to construct the domain name directly.
VPC endpoints
Region type | Service region | MCP Endpoint |
The Chinese mainland public cloud |
|
|
Hong Kong (China) and outside China |
|
|
Whether you choose a public or VPC endpoint, the service defaults to the current connection's service region if the region is not specified in the conversation or tool parameters. For example, if you connect to the cn-hangzhou endpoint, the default region is cn-hangzhou. If you connect to the cn-hongkong endpoint, the default region is cn-hongkong.
Prerequisites
A network environment that can access the endpoint domain names listed above.
An MCP client that supports MCP Streamable HTTP and browser-based OAuth authorization.
An Alibaba Cloud account with access permissions for MaxCompute.
Limits
Permission scope: The projects, schemas, tables, and instances you can access are determined by your MaxCompute and RAM permissions.
IP address whitelist: The target MaxCompute project must not have an IP address whitelist configured. The MCP service does not currently support whitelist-based access for such projects. If a whitelist is configured, subsequent tool calls may fail.
Write operation confirmation: Write operations must be explicitly confirmed by the user on the client side. The gateway does not provide a second interactive confirmation.
Client configuration
Different MCP clients may use different names for configuration fields, but the core step is the same: set the MCP server URL to your chosen service endpoint address. The example below uses the public endpoint for the Chinese mainland public cloud. If you need the Hong Kong (China) or an international endpoint, replace the URL with https://mcp.cn-hongkong.maxcompute.aliyun.com/mcp. If your client runs in a VPC environment, replace it with the corresponding VPC service endpoint from the Supported regions table.
A general configuration looks like this:
{
"mcpServers": {
"maxcompute-mcp": {
"type": "streamable-http",
"url": "https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcp"
}
}
}If your client uses field names such as endpoint, server_url, or transport, configure them according to the client's documentation. The URL should still be the /mcp address from the service endpoint table above.
Claude Code
Add the HTTP MCP server from the command line:
claude mcp add --transport http --scope user maxcompute-mcp \
https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcpAfter you add it, check the connection status:
claude mcp list
claude mcp login maxcompute-mcpYou can also enter /mcp in a Claude Code session to view the status and trigger the logon. If you want to use it only for the current project, change --scope user to --scope local or use a project scope as required by your team.
Codex
You can add the Streamable HTTP MCP server from the command line:
codex mcp add maxcompute-mcp \
--url https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcpAfter the service is added, view the service list and log on:
codex mcp list
codex mcp login maxcompute-mcpTo configure it manually, add the following to ~/.codex/config.toml:
[mcp_servers."maxcompute-mcp"]
url = "https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcp"Qwen Code
Add the HTTP MCP server from the command line:
qwen mcp add --transport http --scope user maxcompute-mcp \
https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcpIf your client distribution uses a different command name, replace qwen above with the actual command name. After you add it, start Qwen Code and enter /mcp in a session to check the connection status and available tools. You can also add it manually in ~/.qwen/settings.json:
{
"mcpServers": {
"maxcompute-mcp": {
"httpUrl": "https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcp"
}
}
}If the file already contains other configurations, merge only the mcpServers section. Do not overwrite existing settings.
Unless your client or enterprise environment has other requirements, you do not need to manually configure the Authorization header. The first connection completes the logon through the OAuth flow.
First-time connection and OAuth authorization
On the first connection, the MCP client automatically starts the OAuth authorization flow and opens the Alibaba Cloud authorization page in a browser.
Authorization flow
Authorize the third-party application on the first connection.
Authorization scope: This authorization is for the
maxcompute-mcpOAuth application, not for granting data permissions in MaxCompute.Authorizing account: This must be done by a root account or a RAM administrator with the
AliyunRAMFullAccesspermission. Administrative permission is used only to authorize the third-party application and should not be used as the runtime identity for daily access to MaxCompute data. The projects, schemas, tables, and instances that each logged-on user can access are still determined by their own MaxCompute and RAM permissions.After the application is authorized once under a root account, other RAM users under that account can log on and complete their own OAuth authentication. Not every RAM user needs the
AliyunRAMFullAccesspermission.
Add the MaxCompute MCP Server in your MCP client and initiate a connection. This happens on the first connection to
/mcp, or the first call to a tool such astools/list.The client detects the logon requirement and automatically opens a browser to the Alibaba Cloud OAuth page.
Confirm that the account and authorization information on the page are correct, and then click Agree or Authorize.
The browser completes the callback. The client saves the token and automatically reconnects to the MCP service. You typically do not need to authorize again within the same session.
Notes
Verify page source: The OAuth page must come from an official Alibaba Cloud domain. If the domain name, account, or authorization information seems unusual, do not proceed.
Use the correct account: Complete the authorization with the Alibaba Cloud account that has permission to access the target MaxCompute data. The accessible projects and tables are tied to this account. Results may differ if you switch accounts.
Protect sensitive information: Do not share your access token, refresh token, authorization code, or parameters from the callback URL with others.
If the authorization page shows a "Call not authorized" message and states that the current authorization requires an administrator with
AliyunRAMFullAccesspermission, it means the currently logged-on RAM user does not have the permission to authorize third-party applications for the root account. In this case, ask the root account owner or a RAM administrator with this permission to log on to the MaxCompute MCP Server and click "Authorize". If the page still shows the previous failed authorization status, the administrator must delete the application in the OAuth application management section of the RAM console and then initiate the logon and authorization again from the MCP client. We do not recommend granting theAliyunRAMFullAccesspermission to a daily-use account long-term just to bypass this prompt.
Account selection for shared enterprise systems
When you connect the Remote MCP Server to an internal enterprise Agent or other multi-user shared system, first determine how to preserve the end-user identity:
To isolate data based on employee permissions and retain user-level auditing, have each user complete the OAuth logon separately.
MCP calls will use their individual Alibaba Cloud identities, and the data they can access will be determined by their respective MaxCompute and RAM permissions.If the system can use only a single shared logon identity, create a dedicated RAM user and grant only the minimum required MaxCompute permissions. In this case, all requests share this identity's permissions and audit trail. The system itself is responsible for user authentication, session isolation, and operation auditing.
We do not recommend using a root account or an administrator account with
AliyunRAMFullAccessas the long-term runtime identity for an LLM, internal enterprise Agent, or shared MCP client. The initial application authorization and daily data access should use different permission boundaries.
Connection verification
After authorization, perform a minimal verification as follows.
First, have the client list the tools:
tools/listCall the health check tool:
{ "name": "maxcompute_health_ping", "arguments": {} }On success, the returned
structuredContentshould contain:{ "ok": true, "data": { "pong": true } }Next, list the MaxCompute projects visible to the current account:
{ "name": "maxcompute_schema_list_projects", "arguments": { "limit": 10 } }If this step returns an empty list or a permission error, first check whether the current Alibaba Cloud account has permissions for the target MaxCompute project.
Local MCP Server
The local MCP Server is for self-hosting, stdio integration, local development and debugging, or scenarios where you need direct control over credentials. Most users and MCP client integrators do not need to deploy a local MCP Server.
Scenarios
Scenario | Is local MCP Server recommended? |
Accessing MaxCompute from an MCP client | Not recommended. Use the Remote MCP Server instead. |
Requiring a local stdio MCP Server | Can be used |
Modifying or debugging MCP Server code | Can be used |
Managing AK, STS, or Credentials URI manually | Can be used, but you must configure it with least privilege and follow key protection requirements. |
Sharing one HTTP MCP Server among multiple users with dynamic configuration switching | Not recommended. Local named configurations are process-level states. Switching them at runtime affects other connections in the same process. |
Prerequisites
Python
Version 3.10 or later.
You can use the uv package management tool to install dependencies and run services.
Alibaba Cloud credentials
AK/SK, STS, Credentials URI, ECS RAM Role, or the default Alibaba Cloud credential chain.
MaxCompute
Project: You must have access to at least one MaxCompute project. Confirm your default project name—it is used to create the ODPS client, submit SQL, check permissions, and serve as the default context when project parameters are omitted.
Confirm your endpoint, for example:
https://service.cn-hangzhou.maxcompute.aliyun.com/api.
Confirm your root account UID (also known as namespaceId).
Important notes
Do not commit
config.json, AK/SK, STS tokens, Credentials URIs, query result files, or coverage outputs.In production environments, prefer dynamic credential sources such as
ALIBABA_CLOUD_CREDENTIALS_URIor RAM Roles.Grant the identity used for MCP the least privilege access. Do not use high-permission root account AKs directly.
execute_sqlenforces read-only protection, butcreate_table,insert_values, andupdate_tablemodify resources or metadata.output_urionly allows writing to local files on the server. Use a dedicated secure directory and avoid sensitive system paths.For high-cost, large-result, or cross-project queries, estimate costs first and verify that project, schema, and table references are correct.
If you encounter issues, contact the MaxCompute team or open an issue in the GitHub repository.
Download and install
Download MCMCP
GitHub Repo: https://github.com/aliyun/alibabacloud-maxcompute-mcp-server
Compatible with MCP clients such as Claude Code, OpenCode, Qoder, and Cursor.
Install from source
In your terminal, run:
git clone https://github.com/aliyun/alibabacloud-maxcompute-mcp-server.git cd alibabacloud-maxcompute-mcp-server uv syncVerify the CLI entry point:
uv run alibabacloud-maxcompute-mcp-server --helpCopy the configuration template:
cp config.example.json config.jsonWarningconfig.json contains sensitive information (such as AK/SK). Keep it local only—do not commit it to Git.
After editing
config.json, start the service once from the command line to confirm there are no configuration errors:uv run alibabacloud-maxcompute-mcp-server --config config.json
The default transport method is stdio. After successful startup, the server waits for communication from the MCP client via standard input and output.
Configure MaxCompute connection
MCMCP supports two configuration sources:
Configuration file: Specify using
--config /path/to/config.jsonor the environment variableMAXCOMPUTE_CATALOG_CONFIG.Environment variables: These can override the configuration file or be used without any config file.
Using a configuration file
config.json contains sensitive information (such as AK/SK). Keep it local only—do not commit it to Git.
Example config.json:
{
"maxcompute": {
"maxcompute_endpoint": "https://service.cn-hangzhou.maxcompute.aliyun.com/api",
"defaultProject": "<DEFAULT_PROJECT_NAME>",
"namespaceId": "<ALIBABACLOUD_ACCOUNT_UID>",
"accessKeyId": "<ALIBABA_CLOUD_ACCESS_KEY_ID>",
"accessKeySecret": "<ALIBABA_CLOUD_ACCESS_KEY_SECRET>"
}
}Using environment variables
export MAXCOMPUTE_ENDPOINT="https://service.cn-hangzhou.maxcompute.aliyun.com/api"
export MAXCOMPUTE_DEFAULT_PROJECT="<DEFAULT_PROJECT_NAME>"
export MAXCOMPUTE_NAMESPACE_ID="<ALIBABACLOUD_ACCOUNT_UID>"
# Method 1: AK/SK
export ALIBABA_CLOUD_ACCESS_KEY_ID="<ALIBABA_CLOUD_ACCESS_KEY_ID>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<ALIBABA_CLOUD_ACCESS_KEY_SECRET>"
# Method 2: STS
export ALIBABA_CLOUD_ACCESS_KEY_ID="<STS_ACCESS_KEY_ID>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<STS_ACCESS_KEY_SECRET>"
export ALIBABA_CLOUD_SECURITY_TOKEN="<STS_TOKEN>"
# Method 3: Credentials URI (recommended for production or platform-managed environments)
export ALIBABA_CLOUD_CREDENTIALS_URI="http://localhost:8765/credentials"Credential resolution rules:
If AK/SK is set in environment variables or the config file, MCMCP uses those static credentials.
If no static AK/SK is set, MCMCP uses the default Alibaba Cloud Credentials SDK credential chain.
The default credentials chain can use
ALIBABA_CLOUD_CREDENTIALS_URI, the local Alibaba Cloud configuration, or ECS RAM.RAM Role, OIDC, and other sources.
For automatic STS token refresh, prefer Credentials URI, RAM Role, or other dynamic credential sources.
Running modes
stdio mode:
uv run alibabacloud-maxcompute-mcp-serverLocal Streamable HTTP mode:
uv run alibabacloud-maxcompute-mcp-server --transport http --host 127.0.0.1 --port 8000
Point the MCP client to:
http://127.0.0.1:8000/mcpConfigure your MCP client
Qoder / Cursor / Claude Code / generic stdio clients
Common client configuration locations
Client
Config location
Cursor
~/.cursor/mcp.jsonClaude Code
.mcp.jsonin your project rootOther MCP clients
Refer to your client’s MCP server configuration documentation
Configuration methods
Using a config file
{ "mcpServers": { "alibabacloud-maxcompute-mcp-server": { "command": "uv", "args": ["--directory", "/absolute/path/to/alibabacloud-maxcompute-mcp-server", "run", "alibabacloud-maxcompute-mcp-server"], "env": {"MAXCOMPUTE_CATALOG_CONFIG": "/absolute/path/to/config.json"} } } }Using only environment variables
{ "mcpServers": { "alibabacloud-maxcompute-mcp-server": { "command": "uv", "args": ["--directory", "/absolute/path/to/alibabacloud-maxcompute-mcp-server", "run", "alibabacloud-maxcompute-mcp-server"], "env": { "MAXCOMPUTE_ENDPOINT": "https://service.cn-hangzhou.maxcompute.aliyun.com/api", "MAXCOMPUTE_DEFAULT_PROJECT": "<DEFAULT_PROJECT_NAME>", "MAXCOMPUTE_NAMESPACE_ID": "<ALIBABACLOUD_ACCOUNT_UID>", "ALIBABA_CLOUD_ACCESS_KEY_ID": "<AK_ID>", "ALIBABA_CLOUD_ACCESS_KEY_SECRET": "<AK_SECRET>" } } } }
DataWorks personal instance + Claude Code
DataWorks personal instances typically inject ALIBABA_CLOUD_CREDENTIALS_URI. In this environment, config.json only needs endpoint, default project, and optionally namespaceId:
{
"maxcompute": {
"maxcompute_endpoint": "https://service.cn-hangzhou.maxcompute.aliyun.com/api",
"defaultProject": "<DEFAULT_PROJECT_NAME>",
"namespaceId": "<ALIBABACLOUD_ACCOUNT_UID>"
}
}Example .mcp.json:
{
"mcpServers": {
"alibabacloud-maxcompute-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/alibabacloud-maxcompute-mcp-server",
"run",
"alibabacloud-maxcompute-mcp-server"
],
"env": {
"MAXCOMPUTE_CATALOG_CONFIG": "/absolute/path/to/alibabacloud-maxcompute-mcp-server/config.json",
"ALIBABA_CLOUD_CREDENTIALS_URI": "<VALUE_FROM_DATAWORKS_ENV>"
}
}
}
}
You can view the injected credentials URI inside the instance with:
echo "$ALIBABA_CLOUD_CREDENTIALS_URI"
Streamable HTTP mode
Use stdio by default. For remote or multi-process access, start in HTTP mode:
uv run alibabacloud-maxcompute-mcp-server \
--config /absolute/path/to/config.json \
--transport http \
--host 127.0.0.1 \
--port 8000
Set the MCP client address to:
http://127.0.0.1:8000/mcp
Verify connection
After configuration, restart your MCP client and enter the following in a conversation:
Show my MaxCompute identity information without querying detailed permissionsThe Agent should call check_access and return a response like:
{
"success": true,
"data": {
"identity": {
"accessKeyId": "LTAI***xYzW",
"defaultProject": "my_project",
"endpoint": "https://service.cn-hangzhou.maxcompute.aliyun.com/api",
"displayName": "user@example.com"
}
}
}
To also verify permission queries, use:
Show my MaxCompute permissions in the my_project projectMCP tool capability checklist
You typically do not need to fill in tool parameters manually. Just describe your goal in natural language.
The following table lists the MaxCompute tools to help integrators understand the scope of capabilities. The actual tools available to a client are determined by the response from tools/list.
Capability | Remote MCP tool | Local MCP tool |
Connection check |
| Verify with |
View projects and schemas |
|
|
Table and partition metadata |
|
|
SQL analysis and instances |
|
|
Natural language SQL drafts |
| Not applicable |
Job diagnosis |
| Not applicable |
View Quotas |
| Not applicable |
Quota analysis |
| Not applicable |
Account and permission checks |
|
|
Table management and metadata maintenance |
|
|
Knowledge base search and Q&A |
| Not applicable |
Skill discovery and reading |
| Not applicable |
Information Schema semantic analysis | Built-in Information Schema semantic package | Requires separate installation of the |
Local session configuration | Not applicable |
|
Key constraints:
SQL execution and write operations
For read-only queries, validate with sql_review or estimate the cost before you run potentially resource-intensive queries.
The local MCP's execute_sql tool allows only read-only queries. The server forcibly attaches a read-only hint when it submits the job to MaxCompute.
When you run a write SQL statement with the Remote MCP Server, you must explicitly state that it is a write operation, and it can be run only after you receive user confirmation on the client side.
create_table,insert_values,update_table, and their corresponding Remote MCP write tools modify resources or metadata. Grant access carefully.
Schema constraints
You can usually omit the schema for Layer 2 MaxCompute projects.
For Layer 3 models, you must pass the corresponding schema based on the target object or SQL execution context.
Result set handling
For large result sets, use paging, narrow the query scope, or read from an asynchronous instance. The local MCP Server can also write to a file through a local
file://output_uri. This path is on the file system of the machine where the local MCP Server is running, not the MCP client machine.Metadata search
The local MCP's
search_meta_datatool depends onnamespaceIdorMAXCOMPUTE_NAMESPACE_ID. The query syntax typically needs to includetype=TABLE,type=RESOURCE, ortype=SCHEMA.Configuration switching
The local MCP's
list_configs,get_current_config, anduse_configtools switch configurations at the process level and are better suited for stdio or single-client use.Tools exclusive to the Remote MCP gateway
maxcompute_kb_search,maxcompute_kb_ask,maxcompute_quota_list,maxcompute_quota_get,maxcompute_skill_list,maxcompute_skill_read, andmaxcompute_search_catalogare tools exclusive to the Remote MCP gateway and are not provided by the local MCP Server. The actual tools available to a client are determined by the response fromtools/list.maxcompute_generate_sqlrequires the question parameter, and optionally accepts a single region and sources.Each physical source can be scoped to a project, a project plus schema, or specific tables;
Multiple sources can express cross-project and cross-schema queries within the same region.
Sourcesserves as a hard authorization boundary, not a retrieval hint. Do not pass table schemas, DDLs, prompt context, or execution parameters;Omit sources to fall back to the existing caller-authorized bounded discovery.
This tool consumes model credits, and the returned SQL must still be evaluated by the caller before execution.
maxcompute_diagnose_jobrequires exactly one job reference: an instance_id (passed together with project) or a restricted Logview URL. Do not pass a Logview token, raw logs, plan text, or diagnostic conclusions as parameters; the service does not fetch that URL, nor does it execute, retry, or cancel the job.maxcompute_analyze_quota_usageaccepts an optional region, an exact quota_nickname, and a natural language question.Do not pass a project, user, table schema, pre-generated SQL, threshold, or diagnostic context.
When a nickname is specified, verify its Name and Nickname through the Quota API first, and then scope the Information Schema query by Nickname. When the nickname is omitted, aggregate tenant job consumption by the Information Schema quota_name, and align results with inventory by Nickname.
Compute Quotas that do not appear in the subscription secondary Quota inventory remain in the root-level quota_usage and information_schema_queries; they are neither guessed, mapped, nor dropped.
If the Information Schema query does not finish within the synchronous wait budget, the result is returned with
outcome=partialandpending_information_schema_queries, which includes the Instance and LogView (not cancelled by the gateway), along with the continuation parameters formaxcompute_sql_get_statusandmaxcompute_sql_fetch_result.
current_cpu_usageis the current CPU usage returned by the WLM Quota API. It is not a normalized utilization ratio in the range of 0 to 1, so it may exceed 1. Only whencurrent_cpu_usage_available=truedoes it mean the backend actually returned this value. Historical job resource consumption comes from bounded tenant-level queries on TASKS and TASKS_HISTORY. TASKS_HISTORY typically has about a 5-minute delay, and the query window is up to 14 days. There is still no caller-authorized data API for historical Quota utilization, so averages, peaks, P90 levels, or scaling conclusions must not be inferred from job consumption. Regardless of whether the evidence is complete, the results must not be used to automatically scale, schedule, migrate, or cancel jobs.The execution_mode of
maxcompute_sql_executedefaults towlm: when quota_name is specified, the gateway passes it as theodps.task.wlm.quotahint for regular instances. When using MaxQA (MCQA v2),execution_mode=maxqaand an interactivequota_namemust be explicitly passed, andsettings.odps.task.wlm.quotacannot be passed at the same time. The gateway internally obtains and reuses the MaxQA connection and cookies; the client only needs to pass back the regular project and instance_id in subsequent calls tomaxcompute_sql_get_status,maxcompute_sql_fetch_result, ormaxcompute_sql_cancel, and must not pass or store these credentials. A successful MaxQA instance ID usually ends with_mcqa.
Information Schema semantic package
Information_Schema is a system-level Ops semantic skill built on MaxCompute tenant-level INFORMATION_SCHEMA metadata views. It gives data teams comprehensive capabilities for project auditing, usage analysis, and operational observability by turning complex low-level metadata into natural-language-queryable metrics and entities.
Skill Repo: https://skills.alibabacloud.com/skills/alibabacloud-odps-information-schema
The main application scenarios are as follows:
Storage pressure diagnosis
Capability: Identify top storage-consuming tables, detect partition bloat risks, and spot data freshness issues.
Prompt example: "Analyze the top 10 tables by storage usage in my tenant" or "Check which tables have partition bloat risks."
Cost pressure diagnosis
Capability: Break down job costs by owner, project, or type. Track CU-hour consumption and identify high-resource jobs.
Prompt example: "What were the most expensive jobs in the last week?" or "Rank users by resource consumption."
Job failure surge analysis
Capability: Monitor failure rate trends and drill down by type, owner, or project to find root causes.
Prompt example: "List failed jobs in the last 24 hours" or "Show failure rates by job type."
Permission exposure audit
Capability: Audit table-level grants, identify high-risk administrator accounts, and detect over-granting.
Prompt example: "Which users have admin permissions?" or "Count tables granted to each user."
Hot table monitoring
Capability: Identify frequently accessed tables and automatically detect "zombie tables" based on last access time.
Prompt example: "Which tables are accessed most often?" or "Find zombie tables not accessed in the last 90 days."
Metadata governance gap analysis
Capability: Measure table and column comment coverage to find metadata gaps and stale data.
Prompt example: "What is the column comment coverage rate?" or "List tables without table comments."
Job performance analysis
Capability: Analyze average and P99 job durations to identify long-tail slow jobs and abnormal queuing.
Prompt example: "Show the slowest P99 jobs" or "What was the average job duration last week?"
Data tunnel audit
Capability: Track Tunnel upload and download volumes, trace public network download IPs, and detect abnormal transfers.
Prompt example: "Show Tunnel data volume in the last 24 hours" or "Audit public network download source IPs."
User role audit
Capability: Map user-role relationships, review admin role assignments, and identify inactive high-privilege accounts.
Prompt example: "List all admin and super_administrator users" or "Show user role assignments."
Partition lifecycle analysis
Capability: Monitor partition growth trends, verify lifecycle policy enforcement, and check expired partition cleanup.
Prompt example: "Which tables have more than 500 partitions?" or "Find partitioned tables without lifecycle enabled."
Quota resource monitoring
Capability: Monitor real-time CPU and memory quota usage and alert on bottlenecks or imbalanced allocations.
Prompt example: "Show CPU usage for all Quotas" or "Which Quotas exceed their usage threshold?"
Scenarios
Browse projects and tables
Example:
List MaxCompute projects I can access, then show schemas in my_project
Show fields, partition keys, and table comments for user_info in my_project's default schemaRun SQL queries securely
Estimate cost before execution:
First show the structure of the orders table, then estimate the cost of this SQL:
SELECT COUNT(*) FROM orders WHERE dt='2026-05-01'Run a read-only query:
Run this read-only query in my_project:
SELECT * FROM default.orders WHERE dt='2026-05-01' LIMIT 100For large queries, use asynchronous execution:
Run this query asynchronously. After returning the instanceId, poll its status and read the first 100 rows when doneExport large results
Inline results are capped by row limits. For full results, use output_uri:
Run this query synchronously and write the full result to file:///tmp/maxcompute-result/orders.jsonl;
Only show me a preview and the final outputPath in the responseoutput_uri writes to the local file system of the MCP server—not your client machine.
Check identity and permissions
Show the MaxCompute identity used by MCP and list my permissions in my_projectSearch metadata
Search the Catalog for tables with names containing 'orders', limited to my_projectView Quotas
List the MaxCompute Quotas available to my current account, and show the details of the default Quota.Knowledge base search and Q&A
How do I use dynamic partitions for inserts in MaxCompute? Please search the documentation and provide an answer with citations.What is the difference between a clustered table and a standard table in ODPS? In what scenarios is it appropriate to use a clustered table?Use Information Schema for governance and O&M analysis
Analyze the top 10 tables by storage usage in the current tenant.
What were the most expensive jobs in the last week? Summarize by owner and project.The Remote MCP Server has a built-in Information Schema semantic package, so you can use these types of questions directly. For the local MCP Server, you must first install the corresponding Skill in the client or Agent environment before you use these scenarios.
Maintain business metadata
First read the current schema of default.orders, then update the table comment to 'Order fact table'
and change the buyer_id column comment to 'Buyer ID'update_table supports these changes:
Table comment:
descriptionTags:
labelsLifecycle:
expiration.days,expiration.partitionDaysColumn comments:
columns.setCommentsChange top-level columns from non-nullable to nullable:
columns.setNullableAdd new columns:
columns.add
MaxCompute does not support deleting columns, changing column types, reordering columns, inserting columns in the middle, changing nullable columns to non-nullable, or modifying nullability of nested columns via this tool.
Create tables and insert small data sets
Create a test table demo_user in my_project.default
with fields id BIGINT, name STRING, and dt STRING as a partition key, with a 7-day lifecycleInsert two test rows into demo_user with dt partition value 2026-05-18These operations modify MaxCompute resources. Grant permissions only for test or controlled projects.
FAQ
Unsure whether to use Remote or Local
Use the Remote MCP Server. Use the local MCP Server only if you need self-hosting, stdio, local development, or direct control over credentials.
MCP client does not show tools
Check the following:
Is
commandset touv? Doesargsinclude--directorypointing to the absolute path of the repo?If the client cannot find
uv, replacecommandwith the absolute path returned bywhich uv.Have you run
uv syncin the repo?Does
MAXCOMPUTE_CATALOG_CONFIGpoint to the correctconfig.json?Did you restart Cursor, Claude Code, or your MCP client?
Does manually running
uv run alibabacloud-maxcompute-mcp-server --helpin the repo directory succeed?
Authentication or connection failures
Check the following:
Does
MAXCOMPUTE_ENDPOINTormaxcompute_endpointmatch your project’s region?Are your AK/SK or STS token valid and not expired?
If using a credentials service, can
ALIBABA_CLOUD_CREDENTIALS_URIbe accessed from the MCP server machine?Has the current identity been granted access to the target project?
First verify your identity with
check_access, then troubleshoot specific tools.
search_meta_data returns an error
Common causes:
namespaceIdorMAXCOMPUTE_NAMESPACE_IDis not configured.The query lacks
type=TABLE,type=RESOURCE, ortype=SCHEMA.The query uses incompatible project and region conditions.
SQL table name resolution fails
First call get_table_schema and have the Agent use the returned sqlTableRef.
Three-layer model tables commonly use
schema.tableorproject.schema.table;Two-layer model tables commonly use
tableorproject.table.
SQL execution times out or results are truncated
We recommend asynchronous execution by default. After obtaining the
instanceId, useget_instance_statusandget_instanceto retrieve the results.For synchronous execution, set a
timeout. If it times out, you can still use the returnedinstanceIdto continue querying.For large results, use
output_uri=file:///path/to/result.jsonlto write to a local file on the server.Before execution, call
cost_sql, then usemaxCUto limit resource consumption.
Other common errors
If the client displays the raw tool result, a failed response usually includes a request_id and an error code. Common solutions are as follows:
Symptom | Solution |
Logon is required on the first connection | Complete the authorization on the Alibaba Cloud OAuth page in your browser. |
The OAuth page does not appear | Check whether the client supports MCP OAuth. Check whether your browser or the callback port is being blocked. |
401 / Unauthorized | Re-authorize. Confirm that the token saved by the client has not expired or been cleared. |
403 / Insufficient permissions | Switch to an Alibaba Cloud account with the required permissions, or grant the necessary permissions in MaxCompute or RAM. |
Access to a project or table fails after authorization | Check whether the target project has an IP whitelist configured. The Remote MCP service does not currently support this whitelist scenario. |
A specific Remote MCP tool is not visible in | Confirm that the client is connected to the correct endpoint. The actual list of tools is determined by the |
SQL write operation is rejected | Use |
Query result is too large | Use |
Region does not match expectations | Explicitly specify the target |
Local MCP tool names do not match Remote MCP tool names | The tool names are different. The Remote MCP Server uses |
When you troubleshoot, record the request_id, tool name, time, and a sanitized version of the error code. Do not record or share tokens, authorization codes, sensitive business data in full SQL statements, sensitive account information, or content from Logview that should not be shared.
Security precautions
Use the Remote MCP Server. Do not configure a long-term AccessKey in a local MCP Server just for trial purposes.
Use trusted clients
Configure and access production endpoints only through trusted MCP clients. Do not make MCP requests from untrusted pages.
Complete OAuth authorization yourself
You must personally handle the OAuth confirmation page. Do not let others click it for you.
Use an account with least privilege
The MaxCompute resources that MCP can access are determined by the account's permissions. Connect with an account that has only the necessary permissions.
Do not leak sensitive credentials
Do not share tokens, refresh tokens, authorization codes, keys, or callback URLs in chats, tickets, documents, or screenshots.
Do not commit your AccessKey, STS token,
config.jsonfile, or Credentials URI to Git.
Explicitly confirm write operations
Before you run a write operation, confirm that the client has displayed the target project, table, SQL, or a summary of the changes. Verify that the information is correct before you proceed.
Feedback channels
To provide feedback on the Remote MCP service, client compatibility, tool errors, documentation issues, or feature suggestions, submit it through the following channels:
You can also have the Agent read skill://maxcompute-mcp-feedback/SKILL.md to obtain issue template links, suggested diagnostic fields, and sanitization rules. This resource does not create a GitHub issue for you, nor does it upload logs or save feedback content.
Before you submit, confirm that the issue does not contain the following: tokens, cookies, AccessKeys, OAuth callback URLs with query parameters, sensitive SQL, customer data, or sensitive Logview content.
For issues related to account-level permissions, billing, Service-Level Agreements (SLAs), production failures, security vulnerabilities, or confidential data, contact official Alibaba Cloud support or security channels. Do not report these in a public issue.