All Products
Search
Document Center

MaxCompute:MaxCompute MCP service

Last Updated:Sep 01, 2026

Built on the Model Context Protocol (MCP), MaxCompute MCP Server (MCMCP) packages MaxCompute's metadata, compute, and table management capabilities into structured tools that AI Agents can understand and invoke. MCMCP enables AI Agents to directly 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.

Important

Overview

Agents directly call the structured tools provided by MCMCP using the standard MCP protocol. No additional SDKs or drivers are required. MCMCP covers the entire 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. Natural language search is supported.

  • 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:

    • Remote MCP uses Alibaba Cloud OAuth for authorization.

    • Local MCP supports AccessKey/SecretKey (AK/SK), Security Token Service (STS), Credentials URI, ECS RAM Role, and the default Alibaba Cloud credential chain.

  • Server-side client registration (Client ID Metadata Documents, CIMD):

    In environments where this feature is enabled, server-side or self-hosted clients can use an HTTPS metadata document URL as the client_id to bypass Dynamic Client Registration (DCR). However, explicit consent is still required on the authorization confirmation page after you log in. For more information, see Configure server-side clients (Client ID Metadata Documents).

  • SQL analysis and execution:

    Supports statement validation, estimation of scanned data volume and Compute Unit (CU) usage, execution of read-only or write SQL queries, instance status queries, and result retrieval. Write SQL queries and metadata changes require user confirmation.

  • Intelligent analysis:

    Generates read-only SQL drafts from natural language, diagnoses job issues, and analyzes compute quota usage. The results indicate the scope of evidence and provide recommended actions.

  • Table metadata analysis:

    Checks table structures and partition metadata without scanning table data.

  • SemanticSpec management:

    Create and maintain SemanticSpec drafts that describe data semantics, view published versions, and use DataScan to generate and apply recommendations based on semantic discovery.

  • Knowledge base search and Q&A:

    Remote MCP includes 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: Remote MCP includes built-in MCP Skill resources. Clients can use tools/list to discover and read Skill content for scenarios such as Information Schema semantic analysis and feedback guidance.

  • Information Schema O&M and governance analysis:

    • Remote MCP includes a built-in Information Schema semantic package.

    • Local MCP requires the corresponding Skill to be installed separately.

  • Multilingual tool information: Remote MCP provides tool titles and descriptions in Simplified Chinese, Traditional Chinese, and English in the tools/list output, and indicates whether a tool depends on a model.

Architecture overview

image

MCMCP has a layered architecture with the following layers from top to bottom:

  • User agent ecosystem: Supports connections from MCP clients such as Claude Code, Codex, Qwen Code, Cursor, and Qoder.

  • MaxCompute Skills collection: agents can complete more complex tasks by using a combination of semantic packages, common commands, development templates, and usage limits.

  • MCMCP service: Wraps capabilities such as MaxCompute OpenAPI, StorageAPI, and CatalogAPI into MCP tools.

  • Underlying MaxCompute capabilities: Covers product capabilities such as metadata, Compute Engines, and storage.

Connection methods

  • The Remote MCP Server is the recommended connection method. This method does not require a local server or storing an access key in a local process.

  • The local server is reserved for self-hosting, standard input/output (stdio), local development and debugging, or scenarios where you need to directly control credentials.

Use case

Connection method

Description

MCP client supports Streamable HTTP and browser-based OAuth.

Direct connection to Remote MCP

Does not require installing a local service or configuring an access key.

Requires an access key, STS temporary credential, credentials URI, ECS instance RAM role, or the default credential chain.

default mode of the local server

Uses Remote MCP by default and falls back to local SDK tools if Remote MCP is unavailable.

Must exclusively use the hosted service and cannot fall back to local tools upon failure.

remote mode of the local server

Exclusively uses Remote MCP. Returns an error if Remote MCP is unavailable.

Self-hosting, local development and debugging, or scenarios that require the original SDK tools.

local mode of the local server

Requires installation of the local optional dependency group from the Python Package Index (PyPI) package.

If your MCP client supports browser-based OAuth, connect directly to Remote MCP. If you use an access key or STS temporary credential, install the local server and use the default mode.

Connect using browser-based OAuth

Remote MCP provides services using Streamable HTTP, an MCP transport method based on HTTP. To connect directly, your client must support Streamable HTTP and browser-based OAuth.

Select an endpoint

Select an endpoint based on your client's network and Alibaba Cloud account website. The MCP endpoint must be consistent within a single client configuration. Do not mix public network and Virtual Private Cloud (VPC) endpoints.

Public endpoint

  • If you do not need to pin the service to a specific region, select the default endpoint that matches your account website:

    Account website

    MCP endpoint

    Alibaba Cloud China Website

    https://mcp.maxcompute.aliyun.com/mcp

    Alibaba Cloud International Website

    https://mcp-intl.maxcompute.aliyun.com/mcp

  • If you need to pin the service to a specific region, generate the endpoint by using your account website and region ID:

    Account website

    Region-pinned public MCP endpoint

    Alibaba Cloud China Website

    https://mcp.<regionId>.maxcompute.aliyun.com/mcp

    Alibaba Cloud International Website

    https://mcp-intl.<regionId>.maxcompute.aliyun.com/mcp

The domain name rules are only for generating endpoints and cannot be used to verify whether the service is available in a specific region. Select a region where the service is available. To access projects in other regions, you must specify the target region ID in the conversation or tool parameters.

The account website selection applies only to direct connections using browser-based OAuth. The local server does not require account website configuration. You only need to configure the region and network type.

VPC endpoint

In regions where the VPC service is available, generate the endpoint based on your account website:

Account website

Region-pinned VPC MCP endpoint

Alibaba Cloud China Website

https://mcp.<regionId>-vpc.maxcompute.aliyun-inc.com/mcp

Alibaba Cloud International Website

https://mcp-intl.<regionId>-vpc.maxcompute.aliyun-inc.com/mcp

Regardless of whether you use a public or VPC endpoint, if you do not specify a region in the conversation or tool parameters, the service defaults to the region of the current endpoint. 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 preceding endpoint domain names.

  • An MCP client that supports MCP Streamable HTTP and browser-based OAuth authorization.

  • An Alibaba Cloud account with permissions to access MaxCompute.

Limitations

  • Permission scope: Your MaxCompute and Resource Access Management (RAM) permissions determine the projects, schemas, tables, and instances that you can access.

  • Write operation confirmation: Write operations require explicit confirmation from the user on the client side. The gateway does not provide a second confirmation prompt.

Client configuration

Different MCP clients may use different names for configuration fields. Set the MCP endpoint to your chosen endpoint. The following example uses the public endpoint for the Alibaba Cloud China Website without a specified region.

  • To pin the service to a specific region, select an address from the public endpoint table that matches your service region and account website.

  • If your client runs in a VPC environment, use the /mcp address from the VPC endpoint section.

The general configuration is as follows.

{
  "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 tables above.

Claude Code

We recommend that you 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/mcp

After adding the server, check the connection status:

claude mcp list
claude mcp login maxcompute-mcp

You can also enter /mcp in a Claude Code session to view the status and trigger the logon. To use this server only for the current project, change --scope user to --scope local or use a project scope as required by your team.

Codex

We recommend that you add the Streamable HTTP MCP server from the command line:

codex mcp add maxcompute-mcp \
  --url https://mcp.cn-hangzhou.maxcompute.aliyun.com/mcp

After adding the service, view the service list and initiate logon:

codex mcp list
codex mcp login maxcompute-mcp

To 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

We recommend that you 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/mcp

If your client distribution uses a different command name, replace qwen above with the actual command name. After adding the server, 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 client completes the logon process through the OAuth flow during the first connection.

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

  1. Authorize the third-party application on the first connection.

    • Authorization scope: This authorization is for the maxcompute-mcp OAuth application, not for granting permissions to data in MaxCompute.

    • Authorizing account: This must be done by a root account or a RAM administrator with the AliyunRAMFullAccess permission. 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 identity can access are still determined by their own MaxCompute and RAM permissions.

    • After a root account authorizes the application once, other RAM users under that account can log on and complete their own OAuth authentication. Not every RAM user needs the AliyunRAMFullAccess permission.

  2. 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 as tools/list.

  3. The client detects the need to log on and automatically opens a browser to the Alibaba Cloud OAuth page.

  4. Confirm that the account and authorization information on the page are correct, and then click Agree or Authorize.

  5. 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.

Usage 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. This account determines which projects and tables are accessible. 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 AliyunRAMFullAccess permission, it means the current RAM user cannot 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 again 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 Resource Access Management (RAM) console and then initiate the logon and authorization again from the MCP client. Do not grant the AliyunRAMFullAccess permission to a daily-use account long-term just to bypass this prompt.

Account selection for shared enterprise systems

When you connect Remote MCP to an internal enterprise agent or other multi-user shared system, first determine whether 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 use their individual Alibaba Cloud identities, and their respective MaxCompute and RAM permissions determine the data they can access.

  • 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 principal. The system itself is responsible for user authentication, session isolation, and operation auditing.

  • Do not use a root account or an administrator account with AliyunRAMFullAccess as 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.

Configure server-side clients (Client ID Metadata Documents)

Internal enterprise agent platforms, web services, or other server-side MCP clients typically lack a local callback capability outside of a browser and are not suitable for dynamic client registration (DCR) for each deployment instance. For environments that support the Client ID Metadata Documents (CIMD) capability, these clients can use an HTTPS metadata document URL directly as the client_id:

  1. Host a client metadata document at a public HTTPS address that is consistently accessible by the client. The client_id field in the document must be identical to this URL, and redirect_uris must list all callback URLs that are actually used:

    {
      "client_id": "https://client.example.com/oauth/client.json",
      "client_name": "Sample Enterprise Agent",
      "redirect_uris": ["https://client.example.com/oauth/callback"]
    }
  2. In the MCP client's OAuth configuration, set the document URL as the client_id (the field name may vary depending on the client).

    • Clients that support CIMD will skip DCR and initiate authorization directly with the document URL.

    • Clients that do not support CIMD will operate using their original registration method.

  3. When a user initiates a connection, they still complete the Alibaba Cloud OAuth logon in a browser. After logging on, the service displays an authorization confirmation page that lists the application name, client_id URL, and callback domain declared in the document. The service issues an authorization code only after the user explicitly clicks Agree.

  4. The service re-validates the document during each authorization attempt. The document must be accessible over HTTPS, the client_id must match the request URL, and the callback URL must exactly match one of the redirect_uris. If any of these conditions are not met, the service rejects the authorization.

Note

Constraints and notes:

  • This capability is available on a per-environment basis. A client can check the client_id_metadata_document_supported field in the /.well-known/oauth-authorization-server response to determine if the current entry point supports it. If the field does not exist, the client automatically falls back to DCR or manual registration.

  • This method supports only public clients. The document must not contain confidential configurations such as client_secret, and the client must use PKCE.

  • In an open participation model, the authorization confirmation page is the trust boundary. Do not click Agree on behalf of others or forward the confirmation page or callback URL to others.

  • The metadata document is public information. Do not include tokens, keys, internal domain names, or internal network addresses in the document.

Verify the connection

After authorization is complete, we recommend that you verify the connection and permissions by following these steps.

In your AI Agent, enter the following prompts in order:

  1. "Check the status of the MaxCompute MCP connection."

  2. "List the MaxCompute projects visible to the current identity. Return the first 10."

  3. "Check what schemas and tables are under the <project> project."

If the project list is empty or you receive a permission error, check whether your Alibaba Cloud account has the required permissions for the target MaxCompute project.

Connect using the local server

The local server is suitable for MCP clients that support only standard input/output (stdio), scenarios that require a local Streamable HTTP service, or scenarios where you need to use an access key, STS temporary credential, credentials URI, an ECS instance RAM role, or the Alibaba Cloud default credential chain.

Running modes

Mode

Behavior

Use case

default

Uses Remote MCP by default.

Falls back to local SDK tools if Remote MCP is unavailable.

Most scenarios that use an access key or STS temporary credential.

remote

Exclusively uses Remote MCP.

Returns an error if unavailable.

Scenarios that must not fall back to local tools.

local

Exclusively uses local SDK tools.

Self-hosting and local development and debugging.

All three modes support stdio and Streamable HTTP.

You can select a mode by using the --mode CLI option, the MAXCOMPUTE_MCP_MODE environment variable, or the top-level mode field in the JSON configuration. If you do not configure a mode, the server uses default.

Installation

  • Requires Python 3.10 or later.

  • Use pip or uv to install the base package from the Python Package Index (PyPI).

    • To install by using pip, run the following command:

      python -m pip install alibabacloud-maxcompute-mcp-server
    • To install into an isolated environment by using uv, run the following command:

      uv tool install alibabacloud-maxcompute-mcp-server

    Verify the command-line entry point:

    alibabacloud-maxcompute-mcp-server --help
  • To use the local mode or the local fallback capability of the default mode, you must install the local optional dependencies.

    • To install by using pip, run the following command:

      python -m pip install "alibabacloud-maxcompute-mcp-server[local]"
    • To install into an isolated environment by using uv, run the following command:

      uv tool install "alibabacloud-maxcompute-mcp-server[local]"

Configure region, network, and credentials

Minimal configuration

You only need to specify the region and network type.

{
  "maxcompute": {
    "region": "cn-hangzhou",
    "network": "public"
  }
}

The network parameter supports public and vpc. The defaultProject parameter specifies an optional default project. To connect to Remote MCP, you do not need to configure protocol, namespaceId, or the Remote MCP address.

Configuration file

Save the configuration to a protected path on your local machine and specify it by using the --config option or the MAXCOMPUTE_CATALOG_CONFIG environment variable. Alternatively, you can use environment variables instead of creating a JSON file: MAXCOMPUTE_REGION, MAXCOMPUTE_NETWORK, and the optional MAXCOMPUTE_DEFAULT_PROJECT.

Credential configuration

Provide credentials from the MCP process environment or the Alibaba Cloud default credential chain. Use static access keys for development and debugging purposes only:

export ALIBABA_CLOUD_ACCESS_KEY_ID="<accessKeyId>"
export ALIBABA_CLOUD_ACCESS_KEY_SECRET="<accessKeySecret>"

# If using STS, also set the following variable
export ALIBABA_CLOUD_SECURITY_TOKEN="<securityToken>"

# A dynamic credentials service can be used instead of the preceding static environment variables
export ALIBABA_CLOUD_CREDENTIALS_URI="<credentialsUri>"

For environments such as ECS instance RAM roles, you can directly use the Alibaba Cloud default credential chain.

Security reminder

Do not put access keys, STS temporary credentials, credentials URI, or access tokens in the args of the MCP client, and do not commit these credentials to a code repository.

Backward compatibility with previous configurations

Previous top-level MaxCompute configurations, top-level ODPS configurations, configs named configurations, and pure environment variable configurations remain valid. The local server can identify the region and network type from the standard Front End (FE) or CatalogAPI endpoints:

  • A public endpoint corresponds to a public network MCP in the same region.

  • A VPC endpoint corresponds to a VPC MCP in the same region.

  • If the region or network type in the configuration does not match the actual environment, the local server returns a configuration error.

Region and domain name rules: When you use the region and network configurations, the local server automatically generates the FE, CatalogAPI, and MCP endpoints for the specified region.

  • Regions on the Chinese mainland use the mcp domain.

  • The China (Hong Kong) region and other regions outside the Chinese mainland use the mcp-intl domain. You do not need to manually configure the account website.

Note: You cannot use the domain name rules to verify whether the service is available in a specific region. Select a region where the service is available.

Configure the MCP client

To start the default mode by using a configuration file:

{
  "mcpServers": {
    "maxcompute-mcp": {
      "command": "alibabacloud-maxcompute-mcp-server",
      "args": [
        "--config",
        "/path/to/config.json"
      ]
    }
  }
}

If the executable file is not in the PATH of the MCP client, change the command parameter to the actual installation path.

Switch the running mode

In the args parameter, specify the running mode by using the --mode option:

  • --mode remote: Forces the use of Remote MCP.

  • --mode local: Forces the use of local SDK tools. You must first install the local optional dependency group.

Streamable HTTP transport

alibabacloud-maxcompute-mcp-server \
  --config /path/to/config.json \
  --mode default \
  --transport streamable-http \
  --host 127.0.0.1 \
  --port 8000

After startup, set the MCP client's endpoint to http://127.0.0.1:8000/mcp. By default, the local server listens on the local loopback address 127.0.0.1. Change the listening address only if other trusted hosts need to access this process.

MCP tool capabilities

You typically do not need to specify tool parameters manually. Instead, describe your goal in natural language.

Browser-based OAuth direct connections and the Remote MCP mode of the local launcher publish the same set of tools. Only the local mode publishes the original local SDK tools. Although the tool sets have different names, their capabilities and use cases largely overlap.

Use the following table to select a tool. For detailed parameters, complete result fields, and advanced workflows, see the tool definitions returned by tools/list and the descriptions later in this topic.

Capability

Remote MCP tool

Local MCP tool

Key usage boundaries

Connection check

maxcompute_health_ping

Verify with tools/list or any read-only tool

The tools/list response determines which tools are available to a client.

Gateway capabilities

maxcompute_gateway_capabilities

Not applicable

View the gateway version, supported MCP protocol versions, and available plug-ins and tools.

View projects and schemas

maxcompute_schema_list_projects, maxcompute_schema_get_project, maxcompute_schema_list_schemas, maxcompute_schema_get_schema

list_projects, get_project, list_schemas, get_schema

The MaxCompute and RAM permissions of the current identity determine the visible scope.

For traditional two-level projects, you can usually omit the schema. For three-level models, you must specify it explicitly.

Table and partition metadata

maxcompute_schema_search_metadata, maxcompute_schema_list_tables, maxcompute_schema_describe_table, maxcompute_schema_list_partitions, maxcompute_schema_get_table_ddl

list_tables, get_table_schema, get_partition_info, search_meta_data

First, search for candidate tables, and then read their field and partition information.

For catalog searches, you must specify the object type. Do not mix region and project conditions.

In local mode, search_meta_data also requires you to configure namespaceId.

To find the largest top-level partition that contains data, use MAX_PT('<table>') directly in your query. To obtain the complete multi-level partition combination, use a standard SQL subquery.

SQL analysis and instances

maxcompute_sql_validate, maxcompute_sql_estimate_cost, maxcompute_sql_execute, maxcompute_sql_get_status, maxcompute_sql_fetch_result, maxcompute_sql_cancel, maxcompute_sql_get_logview, maxcompute_sql_list_instances, maxcompute_sql_list_queueing

cost_sql, execute_sql, get_instance_status, get_instance

Before you run a query, validate or estimate the scanned data volume and CU usage.

maxcompute_sql_validate returns the actual backend errors for issues related to syntax, semantics, missing objects, and permissions.

Internal MaxCompute failures, such as a failed resource usage estimation task, return categorized tool errors and are not misreported as invalid SQL.

A Remote MCP must explicitly use mode=write to write SQL, and the client must first obtain user confirmation.

In Local MCP, execute_sql allows read-only statements only. For large queries, use asynchronous status checks and paged result retrieval.

maxcompute_sql_execute is not model-backed.

Natural language SQL drafts

maxcompute_generate_sql

Not applicable

You must pass the original question. The region, sources, and analysis_context parameters are optional. If you use sources or analysis_context, you must also specify the region.

The sources parameter limits the data scope that the tool can use. The tool only generates and validates SQL; it does not execute SQL.

Model analysis may consume MaxAgent Credits.

Job diagnosis

maxcompute_diagnose_job

Not applicable

Specify a job by using its instance_id and project, or by providing a Logview URL.

The tool provides diagnostic suggestions based on the job's status, execution details, and logs. It does not execute, retry, or cancel the job.

If evidence is incomplete, the tool returns partial.

View quotas

maxcompute_quota_list, maxcompute_quota_get

Not applicable

This tool returns the list and details of compute quotas that the current identity can view through its associated FE endpoint. This tool does not modify quotas.

Quota analysis

maxcompute_analyze_quota_usage

Not applicable

Analyzes quota and job resource consumption over the last 7 days in the selected region.

Only Subscription secondary quotas with fixed capacity return capacity utilization. Pay-As-You-Go and Spot quotas do not return a capacity percentage. This tool is read-only. Model analysis may consume MaxAgent Credits.

Table metadata health analysis

maxcompute_analyze_table

Not applicable

Reads only the table and partition metadata that the current identity can access. It does not scan table data, call the model, or consume MaxAgent Credits. Conclusions that cannot be proven by metadata are listed in missing_evidence.

Account and permission checks

maxcompute_access_check

check_access

Checks only the current identity and existing authorizations. It does not grant or modify permissions.

SemanticSpec CRUDL

maxcompute_semanticspec_create, maxcompute_semanticspec_get, maxcompute_semanticspec_list, maxcompute_semanticspec_list_published_revisions, maxcompute_semanticspec_get_published_revision, maxcompute_semanticspec_update, maxcompute_semanticspec_delete

No corresponding tool

The namespace is set to the MaxCompute account_id of the current authenticated identity.

The published-revision tools read only immutable published revisions.

Create, update, and delete are write operations. Draft content updates use revisions for concurrency control.

SemanticSpec suggestions and publishing

maxcompute_semanticspec_refresh_suggestions, maxcompute_datascan_get_latest_job_status, maxcompute_semanticspec_apply_suggestions, maxcompute_semanticspec_publish

No corresponding tool

Refresh only triggers DataScan and does not automatically apply or publish. Apply and publish require explicit calls and must be confirmed by the user as write operations.

Table management and metadata maintenance

maxcompute_schema_create_table, maxcompute_schema_update_table, maxcompute_table_insert_values

create_table, insert_values, update_table

These operations modify MaxCompute resources or metadata. Before you call them, display the target project and table, summarize the changes, and get explicit user confirmation.

Knowledge base search and Q&A

maxcompute_kb_search, maxcompute_kb_ask

Not applicable

Search for MaxCompute documentation snippets, or retrieve information from documents to answer questions. You can specify an optional region to direct the model call. If omitted, the service's default region is used. Verify facts in the answer against the returned citations.

Skill discovery and reading

maxcompute_skill_list, maxcompute_skill_read

Not applicable

Skill availability depends on the current service configuration and the response from tools/list. If the client does not automatically load resources, you must read the Skill explicitly.

Information Schema semantic analysis

Built-in Information Schema semantic package

Requires separate installation of the alibabacloud-odps-information-schema Skill

Requires tenant-level Information Schema permissions and an executable project in the same region. Historical views have latency and query scope limitations and should not be used to determine real-time status.

Local session configuration

Not applicable

list_configs, get_current_config, use_config

Configuration switching affects the Local MCP process and is better suited for stdio or single-client use.

Tool list display information

  • Multilingual tool display information

    Remote MCP provides multilingual display information for each tool object in the tools/list response. Clients that support this extension can read _meta["com.aliyun.maxcompute/display"] and show the title and description in Simplified Chinese (zh-CN), Traditional Chinese (zh-TW), or English (en) based on the interface language.

    Clients should rely on the tool set returned by each tools/list call and not maintain a separate tool catalog. If the selected language is missing or the extension version is unsupported, fall back to the standard title, name, and description fields. To indicate a model dependency, mark a tool as MaxAgent-backed only when _meta["com.aliyun.maxcompute/model_backed"] is true. The display information is for UI presentation only and must not be used for permission, billing, or security decisions.

  • Intelligent analysis capabilities

    Natural language SQL, job diagnosis, and quota analysis are the three intelligent analysis tools of Remote MCP. All are read-only. They do not automatically execute the generated SQL, rerun or cancel jobs, or modify quota capacity and scheduling configurations.

    Model analysis may consume MaxAgent Credits, and a single tool call may trigger multiple model calls. When model capabilities or required evidence are unavailable, the tool may return a partial result. Use the warnings and missing_evidence fields to assess what conclusions you can trust.

Prerequisites for intelligent analysis

  • The MCP client is connected to Remote MCP through browser-based OAuth or the local launcher.

  • The current authenticated identity has the required permissions for the target MaxCompute project, job, or quota.

  • The region in the request matches the region where the target resources are located.

  • When you use MaxAgent model capabilities, the current identity has a valid MaxAgent quota and sufficient MaxAgent Credits in the selected region.

  • To query tenant metadata or historical jobs by using the Generate SQL tool, the current identity must meet the Information Schema requirements.

  • If you need historical quota capacity utilization or job consumption data, the corresponding historical observation capabilities must be available in the target service region.

Note
  • Quota analysis does not require Information Schema permissions or an executable project.

  • If model capabilities are unavailable, the tool may return a partial result but will preserve any deterministic evidence it has already collected.

Typically, you just need to state your goal in the conversation, and the Agent selects the tool and populates its parameters. You can also call the MCP tool directly by using the JSON examples in this topic.

Intelligent analysis results

All three tools return structured MCP results. Pay close attention to the following fields:

  • ok: Indicates whether the tool call protocol completed successfully. ok=true does not guarantee that the evidence is complete.

  • data: Contains business data, such as SQL drafts, diagnostic results, or quota observations.

  • meta.outcome or metadata.outcome: The status of the business result.

  • warnings: Describes non-fatal limitations, degradations, or fallback behaviors.

  • missing_evidence: Lists any evidence that could not be obtained and the reasons why.

  • usage: Shows the number of model calls and the token usage reported by the model.

Common outcome values:

Status

Description

succeeded

The tool obtained sufficient evidence and completed the analysis.

partial

The tool completed successfully, but some evidence, such as execution plans, logs, historical data, or permission details, was unavailable. You can still use the facts that were returned.

needs_input

The question or data scope is too broad and requires more information from the user.

rejected

The input, authorization scope, or generated content violates read-only security constraints.

timeout

The model or MaxCompute query timed out.

failed

A backend or model call failed, and no usable result was generated.

Do not treat a partial outcome as a failed API call. Use the missing_evidence field to determine what questions the current conclusions can answer and whether you need to supplement permissions, scope, or perform deeper diagnosis. When troubleshooting, do not copy authentication information or full backend responses.

Generate SQL

Use cases

  • Generate a query SQL based on a business question.

  • Generate a SQL query that joins tables across multiple projects or schemas.

  • Check field and table references, read-only properties, and MaxCompute dialect before execution.

  • Perform backend SQLCost validation and resource usage estimation at the same time when the execution project is known.

  • Generate tenant-level Information Schema SQL queries based on metadata, job history, quota usage, or permission and governance issues.

Parameters

Parameter

Required

Description

question

Yes

The user's original question, with a maximum of 2,000 characters. Do not concatenate DDL statements, table schemas, or additional prompts.

region

No

A MaxCompute region. If omitted, the service's default region is used.

sources

No

A hard scope for data discovery, with a maximum of 16 items. You can scope it to a project, a project/schema, or specific tables. Across all sources, you can specify a maximum of 20 exact tables in total.

analysis_context

No

The execution context where the caller has permission to create a query instance. For business table SQL, it is used for backend SQLCost validation. For Information Schema SQL, it is used to form reusable parameters for subsequent execution. It does not define the data discovery scope.

The sources parameter is a scope constraint, not a retrieval hint. When sources is provided, the tool queries only within the specified projects, schemas, or tables and will not search for data outside these boundaries. If a question might span multiple projects or schemas, you can provide multiple sources, but they must all be in the same region.

If sources is omitted, the tool automatically determines whether to discover business tables or read supported tenant-level Information Schema views based on the question's semantics. The tool does not automatically grant access to system views based on keyword matches or caller parameters.

Example: Known data scope

Natural language prompt:

In sales_dw.dwd in the China (Shanghai) region, generate an SQL query to count the number of paid orders and the total payment amount for each channel over the last 30 days, sorted by payment amount in descending order. Only generate and validate the SQL, do not execute it yet.

Equivalent tool arguments:

{
  "question": "Count the number of paid orders and the total payment amount for each channel over the last 30 days, sorted by payment amount in descending order",
  "region": "cn-shanghai",
  "sources": [
    {
      "project": "sales_dw",
      "schema": "dwd"
    }
  ],
  "analysis_context": {
    "project": "sales_dw",
    "schema": "dwd"
  }
}

Example: Restrict to specific tables

{
  "question": "Find the team with the highest points in each race and calculate their cumulative season points",
  "region": "cn-shanghai",
  "sources": [
    {
      "project": "analytics",
      "schema": "formula_1",
      "tables": ["constructors", "constructorresults", "races"]
    }
  ]
}

Example: Historical job analysis SQL

{
  "question": "Query the 20 jobs with the highest CU consumption in the last 7 days. Return the instance ID, project, submitter, and CU hours",
  "region": "cn-shanghai",
  "analysis_context": {
    "project": "<A project where the current identity can create query instances in this region>"
  }
}

In this scenario, do not pass sources. The tool loads the built-in Information Schema Skill and the field documentation for the target views. It generates a query against SYSTEM_CATALOG.INFORMATION_SCHEMA.TASKS_HISTORY and enforces a ds partition window of no more than 14 days and a LIMIT clause (range: 1 to 100).

The generated SQL must pass a whitelist check (system view whitelist, read-only, single statement, fully qualified name, and scope restrictions). If the validation is successful, an SQL draft and the optional execute_args are returned.

Since MaxCompute SQLCost does not currently support tenant-level Information Schema, this mode explicitly skips resource usage estimation. During actual execution, maxcompute_sql_execute performs the same security checks again.

Results and subsequent execution

The tool returns the following: query_domain, a structurally validated read-only SQL, the physical tables or system views used, assumptions, warnings, and an optional resource usage estimation result. The tool does not execute the SQL. If the result includes execute_args, you can pass it unmodified to maxcompute_sql_execute after user confirmation.

The client does not need to construct or interpret internal execution settings for Information Schema. The execution tool automatically recognizes system views, adds the necessary server-side settings, and independently validates the SQL again. The OBO policy in the SQL request defines the upper bound of delegated authorization. All queries are still submitted under the MaxCompute identity of the current MCP caller, and MaxCompute validates them based on actual permissions.

Recommended workflow

  1. First, generate and review the SQL. Check the assumptions, the rationale for table selection, and the validation results.

  2. For queries that are resource-intensive or have a large scope, check the estimated scanned data volume and CU usage.

  3. Execute the query only after explicit user consent.

FAQ

  • No SQL was generated for a business table question

    The query is too broad and the sources parameter is not provided. Specify the project, schema, or a specific table. For Information Schema queries, do not add a business table as a source to bypass a discovery failure. Instead, you must specify the object to be analyzed, the metrics, and the time window.

  • Multiple similar datasets were found

    Do not let the Agent guess. Explicitly select the correct data scope.

  • SQLCost did not run

    In business table mode, this is usually because no analysis_context was provided. In Information Schema mode, the tool always skips it because MaxCompute SQLCost does not currently support tenant-level system views. The resource usage estimation result will be unavailable.

  • The tool returned rejected:

    The generated content contains write operations, multiple statements, or table references that bypass sources.

  • Information Schema SQL was rejected:

    The query uses unknown or mixed physical tables, does not use the full system view name, lacks a LIMIT clause, or runs on a historical view that lacks the standard 1- to 14-day ds window.

Job diagnosis

Scenarios

  • Identify SQL compilation errors, missing columns, or syntax errors.

  • Analyze failed jobs, long-running jobs, or jobs with unusual resource usage.

  • Review execution plans, stage progress, resource usage summaries, and error signals in the timeline.

  • Drill down into failed worker logs or other evidence if the initial analysis is inconclusive.

Inputs

For each call, specify the job using one of the following methods:

  1. The instance_id and project. or

  2. A supported HTTPS Logview URL.

Parameter

Required

Description

instance_id

Conditionally

The ID of the MaxCompute instance. If you use this parameter, also specify project.

project

Conditionally

The project that contains the instance. You can omit this parameter if the Logview URL includes the project name.

logview_url

Conditionally

A supported Logview URL. The service parses this URL locally. It does not send requests to or redirect to the URL.

schema

No

The schema for job execution. This is typically omitted for traditional two-level projects.

region

No

The region where the job runs.

history_window_days

No

The time window for historical comparison. The default is 7 days. The value can range from 1 to 30 days.

depth

No

standard or deep. Use deep to perform a more detailed analysis.

Do not include raw logs, execution plans, existing diagnostic results, or Logview tokens as separate parameters. The temporary token in a Logview URL is sensitive information. Do not copy it into tickets, documentation, or chat logs.

Example: Diagnosing a failed job

{
  "instance_id": "<INSTANCE_ID>",
  "project": "sales_dw",
  "region": "cn-shanghai",
  "depth": "standard"
}

Natural language prompt:

Diagnose job <INSTANCE_ID> in sales_dw. First, identify the failed stage and the most likely cause. 
Provide actionable recommendations for a fix. Do not rerun or cancel the job.

Example: Performing a deep dive

Perform a deep dive on this job. The initial analysis did not explain the root cause. 
Check the available logs from failed workers and stage evidence. 
Distinguish between confirmed facts, inferences, and missing evidence.

In the next call, the agent should use the same job reference and set depth=deep. The deep dive analysis is still subject to limits on read counts, log size, and timeouts. It will not read logs indefinitely.

How to interpret the results

  • root_cause.kind: The primary cause category, such as SQL syntax error, data skew, full table scan, slow UDF, resource contention, long-running job, or execution overhead.

  • root_cause.confidence: The level of confidence based on the available evidence. This is not a probability of success.

  • findings: The identified issues and their severity levels.

  • recommendations: Read-only recommendations for fixes, such as modifying the SQL, checking data distribution, or adjusting the execution schedule.

  • evidence: The supporting evidence from status, plan, stage, log, and timeline data.

  • missing_evidence: An explicit statement indicating that the plan, stage progress, worker logs, or historical comparison data is unavailable.

A successful job does not mean there are no issues. The cost of a small, successful job might be dominated by compilation, scheduling, and startup overhead. In this case, the tool can report that "execution overhead is dominant" instead of fabricating a resource bottleneck.

Quota analysis

Scenarios

  • View the current CPU usage and historical capacity utilization of Subscription level-2 quotas.

  • Find compute quotas with active jobs in the last 7 days, including Subscription, Pay-As-You-Go, and Spot quotas.

  • Compare quotas based on actual job consumption and find jobs with high CPU usage.

  • Analyze the capacity level of Subscription quotas. For Pay-As-You-Go and Spot quotas, analyze only job consumption and abnormal jobs.

  • Perform further job diagnostics on high-consumption or abnormal jobs.

Input parameters

Parameter

Required

Description

region

No

The region where the quota is located.

quota_nickname

No

The exact, user-visible nickname of the compute quota. If you omit this parameter, the tool finds quotas with active jobs in the selected region from the last 7 days.

question

No

The resource issue to analyze. If you omit this parameter, the tool finds the jobs with the highest resource consumption.

The tool accepts only the three optional parameters listed above. It does not accept projects, users, table structures, pre-generated SQL, thresholds, or diagnostic contexts. The tool does not submit Information Schema SQL queries. It does not require the current identity to have Information Schema permissions or permissions to execute projects.

The job analysis window is a maximum of 7 days. The results cover only the scope of jobs returned in the response. If evidence is incomplete, the tool indicates the missing information using partial, warnings, or missing_evidence. Historical capacity utilization applies only to Subscription level-2 quotas that have a fixed capacity. Pay-As-You-Go and Spot quotas do not have a fixed capacity denominator. Therefore, the tool does not return capacity percentages or capacity planning recommendations for them.

Quota Name and Nickname

MaxCompute quotas have two identifiers:

  • Nickname: The user-visible name. This is the value used for the quota_nickname parameter and for selecting a quota during SQL execution, such as team_etl_quota.

  • Name: The internal physical name returned by the quota API. It identifies the quota object and cannot be used as the value for quota_nickname.

When you specify quota_nickname, pass the exact Nickname. If you omit this parameter, the tool finds the quotas that were used by jobs in the last 7 days. If the scope of the results is limited, the output clearly states what is not covered.

Example: Analyze a quota

{
  "region": "cn-shanghai",
  "quota_nickname": "team_etl_quota",
  "question": "Analyze the 10 jobs with the highest CPU usage in the last 7 days and describe any verifiable abnormal signals"
}

Natural language query:

Analyze team_etl_quota in cn-shanghai. Find the jobs with the highest CPU consumption in the last 7 days. Attribute a job as abnormal only if there are direct abnormal signals for the job. Otherwise, state that the cause is unknown. Provide only recommendations. Do not modify quotas or jobs.

Example: Compare active quotas in the window

Omit quota_nickname:

{
  "region": "cn-shanghai",
  "question": "Compare compute quotas with active jobs in the last 7 days, sorted by job CPU usage. List capacity utilization separately for Subscription quotas, but do not calculate capacity percentages for Pay-As-You-Go and Spot quotas"
}

Natural language query:

Compare my compute quotas in cn-shanghai that had active jobs in the last 7 days, including Subscription, Pay-As-You-Go, and Spot.
Sort them by job CPU usage and list high-consumption jobs. Add capacity utilization only for Subscription quotas.

Current snapshot, historical consumption, and historical utilization

These three concepts should not be confused:

Data

Meaning

Current support

current_cpu_usage

The current CPU usage. This is not a percentage from 0 to 1.

Applies only to Subscription quotas and is valid only when current_cpu_usage_available=true.

High-consumption jobs

The cumulative CPU and memory consumption of jobs in the last 7 days.

Supports Subscription, Pay-As-You-Go, and Spot quotas. Unknown values are not included in sorting or aggregation.

Historical quota utilization

The average, peak, and P90 levels of a fixed capacity over time.

Applies only to Subscription level-2 quotas that have a fixed capacity.

The cumulative CPU and memory consumption of jobs is not the same as the historical utilization of a quota. If a quota has no fixed capacity or historical data, the tool does not infer the average level, peak, or P90 from job consumption. The tool also does not generate capacity planning recommendations for Pay-As-You-Go or Spot quotas.

Information Schema requirements

Generate SQL can use tenant-level Information Schema views. Quota analysis for capacity utilization and job evidence does not use Information Schema. Generate SQL only allows views that are on the server-side allowlist, such as:

  • SYSTEM_CATALOG.INFORMATION_SCHEMA.TASKS

  • SYSTEM_CATALOG.INFORMATION_SCHEMA.TASKS_HISTORY

When Generate SQL uses these views, it must meet the following conditions:

  1. The current authenticated identity must have read permissions for the tenant-level Information Schema. Root accounts usually have this access by default. Access for RAM users or RAM roles depends on the configuration set by the tenant administrator.

  2. The current identity must have at least one visible MaxCompute project in the target region. This project is used to submit read-only Information Schema SQL queries. The identity must also have the permissions required to create query instances.

  3. The target region must provide the tenant-level views mentioned above and their backend dependencies.

Security and scope limitations:

  • Generate SQL reads tenant-level views recorded by built-in Skills, but it cannot query unknown system views or mix queries with physical tables.

  • Before the model selects a system view, Generate SQL loads the root Skill of the Information Schema. It uses the view's data granularity, timeliness, and columns to determine the required source of facts. After a view is selected, Generate SQL loads the complete column documentation for that view.

  • System view drafts for Generate SQL must include a time range and a LIMIT clause.

  • Queries are always read-only. They do not modify quotas, scheduling configurations, or jobs.

Data latency

TASKS_HISTORY is not a real-time interface. It typically has a data synchronization delay of about 5 minutes. Jobs that have just completed may not be immediately available. Try again later. The delay may be longer depending on the region, view, and data volume. Therefore, do not use historical views to check real-time status at the second level. To check the real-time status of a job, use the SQL Instance status or a job diagnostic tool.

Permission and view errors

  • Caller lacks tenant-level permissions: Generate SQL explicitly returns an Information Schema permission error.

  • No execution project in the same region: Generate SQL returns a message indicating that a caller-visible project is missing to run the Information Schema query.

  • Backend dependency for a system view is unavailable: The result indicates that the view is unavailable. The error text may show that the system view owner is not the same as the current authenticated identity. Do not misattribute the problem to the caller's account based on this information.

Use cases for intelligent analysis tools

From business problem to execution and diagnosis

1. Use maxcompute_generate_sql to generate and validate the SQL for channel revenue over the last 30 days.
2. After reviewing and confirming the SQL, use maxcompute_sql_execute to run execute_args.
3. If the job fails or slows down significantly, use maxcompute_diagnose_job to analyze the instance.

From quota hotspots to job root causes

1. Omit quota_nickname and use maxcompute_analyze_quota_usage to find compute quotas that have had jobs in the last 7 days.
2. Find high-consumption jobs based on actual job consumption. Check capacity utilization only for Subscription quotas.
3. Call maxcompute_diagnose_job for instances with abnormal signals.
4. Optimize the SQL or scheduling based on job evidence. Do not automatically scale up based only on historical consumption.

Analyzing historical jobs for a known quota

Analyze the owner distribution and CPU consumption of failed jobs for team_etl_quota over the last 7 days.
Investigate the cause for the failed instance with the highest CPU consumption.

Quota analysis does not generate or run Information Schema SQL. The results may only cover some high-consumption jobs and cannot be used to calculate the total number of failed jobs. To further analyze an instance, call the job diagnosis tool.

Recommendations for using the intelligent analysis tool

  • Provide only the scope fields supported by the current tool. For SQL generation, use region, sources, and the optional analysis_context. For job diagnostics, use the project and Instance ID or a Logview URL. For quota analysis, use region and the exact quota nickname. Do not include context fields from other tools in the current call.

  • To generate SQL for a known data scope, provide sources. This avoids a broad discovery process that might yield zero candidates or multiple ambiguous datasets.

  • For job diagnostics, use standard first. Use deep only when the results are inconclusive or when further investigation is required.

  • For quota analysis, first compare the returned job consumption data. Then, investigate a few high-demand quotas and instances in detail. Do not treat partial results as a complete list.

  • Always distinguish between confirmed facts, model judgments, and missing_evidence.

  • Users must separately confirm any scaling, scheduling, migration, SQL execution, rerun, or cancellation operations.

General calling rules

  • Tools can access only the MaxCompute resources that the current identity is authorized to access. Do not equate tool visibility with resource authorization.

  • After discovering candidate tables, read the accurate table structure before generating or executing SQL. Do not guess columns, partitions, or the schema based on the table name.

  • The client must obtain explicit user confirmation before performing write operations. These operations include writing SQL, creating tables, inserting data, updating metadata, and modifying SemanticSpec. The gateway does not perform interactive secondary confirmation for the client.

  • For large result sets, use pagination, narrow the query scope, or read from an asynchronous instance. Local MCP can also write to a file using the local file://output_uri. This path refers to the machine where Local MCP is located, not the MCP client machine.

  • The execution_mode for maxcompute_sql_execute defaults to wlm. When using MaxQA (MCQA v2), explicitly pass execution_mode=maxqa and the interactive quota_name. Do not pass settings.odps.task.wlm.quota at the same time. For subsequent status, result, or cancellation calls, pass only the project and instance_id. Do not pass or save the server-side MaxQA connection or cookie.

Use cases

  • Browse projects and tables

    List the MaxCompute projects I can access, and see what schemas are in my_project.
    View the columns, partition keys, and table comment for the user_info table in the default schema of my_project.
  • Safely run SQL queries

    First, view the structure of the orders table, and then estimate the scanned data volume and CU usage for this SQL query:
    SELECT COUNT(*) FROM orders WHERE dt='2026-05-01'
    Run a read-only query in my_project:
    SELECT * FROM default.orders WHERE dt='2026-05-01' LIMIT 100
  • Process large queries asynchronously

    Run this query asynchronously. After the instanceId is returned, poll its status and read the first 100 rows of the result upon completion.
  • Export large results (Local MCP only)

    Run this query synchronously and write the full result to file:///tmp/maxcompute-result/orders.jsonl;
    In the response, return only a preview and the final outputPath.

    The output_uri writes to the local file system of the machine running Local MCP, not the client machine. Remote MCP does not support writing to local files on the server. Use the paging parameters of maxcompute_sql_fetch_result to read the results in pages.

  • Check identity and permissions

    View the current MaxCompute identity used by MCP, and list my permissions in my_project.
  • Search metadata

    Search for tables in my_project whose names contain 'orders'.
  • View quotas

    List the MaxCompute quotas available to my current identity, and view the details of the default quota.
  • Knowledge base search and Q&A

    How do I use dynamic partition inserts in MaxCompute? Search the documentation and provide an answer with citations.
    What is the difference between ODPS clustered tables and regular tables? When is it appropriate to use a clustered table?
  • Use Information Schema for governance and O&M analysis

    Analyze the top 10 tables that consume the most storage in the current tenant.
    Which tasks consumed the most compute resources in the last week? Summarize by owner and project.

    Remote MCP includes a built-in Information Schema semantic package, so you can use prompts like these directly. For Local MCP, you must first install the corresponding Skill in your client or Agent environment to enable these scenarios.

  • Maintain table business metadata

    First, read the current structure of default.orders, then change the table comment to "Orders fact table",
    and change the comment for the buyer_id column to "Buyer ID".

    The update_table tool supports the following changes:

    • Table comment: description.

    • Labels: labels.

    • Lifecycle: expiration.days, expiration.partitionDays.

    • Column comments: columns.setComments.

    • Change a top-level column from NOT NULL to NULL: columns.setNullable.

    • Add new columns: columns.add.

    This tool cannot be used to drop columns, change column types, reorder columns, insert columns in the middle, change a nullable column to NOT NULL, or modify the nullability of nested columns.

  • Create a table and insert a small amount of data

    Create a test table demo_user in my_project.default, with columns id BIGINT and name STRING, a partition column dt STRING, and a 7-day lifecycle.
    Insert two rows of test data into the demo_user table, in the dt='2026-05-18' partition.

    These operations modify MaxCompute resources. Grant permissions only on a test project or a controlled project.

  • Manage SemanticSpec

    Create a SemanticSpec named sales_metrics that references my_project.default.orders.
    Set the description to "Sales metrics semantic layer" and add a "certified" label.
    Read the dataReferences, semanticModel, and metricDefinitions from the USER_DRAFT of sales_metrics.
    Then, use the returned revision_id as the expected_draft_revision_id to update the metric definitions.

    To update the content of a SemanticSpec, use the current revision from the read result to prevent overwriting concurrent modifications. We recommend generating, applying, and publishing changes in three separate steps. The refresh action only triggers a DataScan and does not automatically apply or publish changes.

    The maxcompute-semantic-spec Skill in Remote MCP provides rules for the complete section format, revision conflict handling, and DataScan status polling. If the client does not automatically load Skill resources, first call maxcompute_skill_list to check if the Skill is available, and then call maxcompute_skill_read to read the entry point and reference files. The response from tools/list confirms the actual availability of a Skill.

Troubleshooting

If an error message includes a Request ID, record the Request ID, tool name, timestamp with time zone, and sanitized error code for troubleshooting. Do not record or distribute tokens, authorization codes, sensitive business SQL, sensitive account information, or any Logview content that should not be shared externally.

MCP client cannot find tools

  • For direct browser-based OAuth connections, ensure that the Remote MCP service endpoint includes /mcp and that the same client configuration does not mix public network and VPC endpoints.

  • Ensure that the client used for the browser OAuth direct connection supports Streamable HTTP, OAuth, and tools/list.

  • Whether the command of the local launcher points to the installed alibabacloud-maxcompute-mcp-server, and whether alibabacloud-maxcompute-mcp-server --help runs successfully in the same runtime environment.

  • Whether MAXCOMPUTE_CATALOG_CONFIG points to a readable configuration file, or MAXCOMPUTE_REGION and MAXCOMPUTE_NETWORK are both set.

  • Check whether default selected local because the Remote MCP is unavailable. If local dependencies are missing, install alibabacloud-maxcompute-mcp-server[local] as prompted by the error message.

  • Check whether the list of available tools includes the target tool. Remote MCP uses maxcompute_* tool names, while the local mode uses the original SDK tool names. The two are not directly interchangeable.

  • After modifying the configuration, restart Cursor, Claude Code, or the corresponding MCP client.

Authentication, connection, or permission failures

  • For browser-based OAuth direct connections, verify that the user has completed the Alibaba Cloud OAuth authorization. If the OAuth page does not open, check whether the client supports MCP OAuth and if the local browser or callback port is blocked.

  • If you receive a 401 error with a browser-based OAuth direct connection, re-authorize and verify that the client's saved access token is valid.

  • Verify that the local launcher has obtained a valid AccessKey, STS temporary credential, credential URI, or a credential from the default credential chain. Ensure that the STS security token has not expired. The local launcher does not require browser-based OAuth.

  • Verify that the region and network are consistent with the target MaxCompute environment and that the FE and CatalogAPI service addresses in the original configuration point to the same region and network type.

  • Verify that your VPC environment can access the CatalogAPI VPC endpoint and the MCP VPC endpoint in the same region. A VPC configuration cannot be used to connect to a public network MCP endpoint.

  • The remote mode returns an error when the Remote MCP is unavailable. The default mode attempts to use the local SDK tool.

  • If a 403 error occurs, ensure the current Alibaba Cloud account has MaxCompute and RAM permissions for the target project.

  • Verify that the target region ID in the conversation or tool parameters is correct. If not explicitly specified, the service uses the default region of the current entry point.

  • When you use a credential URI, make sure that the machine that runs the launcher can access ALIBABA_CLOUD_CREDENTIALS_URI.

  • Use Remote MCP's maxcompute_access_check or local mode's check_access to verify your current identity before you troubleshoot the specific tool.

Metadata search failures

The maxcompute_schema_search_metadata for Remote MCP and the search_meta_data for the local mode use the same Catalog query syntax. Common causes of errors include:

  • You are using search_meta_data in local mode, but namespaceId or MAXCOMPUTE_NAMESPACE_ID is not configured. Remote MCP does not require this configuration.

  • The query statement is missing type=TABLE, type=RESOURCE, or type=SCHEMA.

  • Using incompatible project and region conditions in the same query.

SQL parsing, execution, or result fetching failures

If SQL table name resolution fails, first use Remote MCP's maxcompute_schema_describe_table or Local MCP's get_table_schema to read the table schema, so the agent can use the accurate table reference that is returned. The common table name formats are schema.table or project.schema.table for a 3-layer model, and table or project.table for a 2-layer model.

If Remote MCP rejects an SQL statement as a write operation, confirm that the user intends to perform the write, and explicitly use mode=write after you receive confirmation. Do not modify the mode to bypass the read-only check.

If an SQL execution times out or the result is truncated:

  • Prioritize asynchronous execution.

    • Remote MCP uses maxcompute_sql_get_status and maxcompute_sql_fetch_result to continue querying.

    • Local MCP performs follow-up queries by using get_instance_status and get_instance.

  • Remote MCP uses limit and cursor to paginate and narrow the query scope. Local MCP can also use output_uri=file:///path/to/result.jsonl to write to the machine where Local MCP is located.

  • Before you run the operation, call the corresponding resource usage estimation tool and limit resource consumption based on the parameter definitions in tools/list.

Information Schema semantic package

The Information Schema semantic package is designed for system operations and governance. It uses MaxCompute's tenant-level INFORMATION_SCHEMA metadata views to transform low-level metadata into metrics, entities, and runbooks that an agent can query directly.

Remote MCP has a built-in Information Schema semantic package. After you connect to Remote MCP, you can ask the agent questions about governance and operations, such as storage, cost, permissions, and jobs, without installing additional Skills. quota analysis uses a separate, read-only data path and does not execute Information Schema SQL.

Local MCP only provides local MaxCompute MCP tools. To use these semantic scenarios with Local MCP, you must install the following Skill in your client or agent environment:

https://skills.alibabacloud.com/skills/alibabacloud-odps-information-schema

Typical scenarios include:

Scenario

Capability

Storage pressure diagnosis

Identifies top storage-consuming tables, partition bloat risks, and data freshness issues.

Cost pressure diagnosis

Breaks down compute consumption by owner, project, and job type to pinpoint high-consumption jobs.

Job failure surge analysis

Drills down into failed jobs by type, owner, and project to help identify root causes.

Permission exposure audit

Audits table-level grant distributions to identify high-privilege accounts and over-granting risks.

Hot table monitoring

Identifies frequently accessed tables and pinpoints stale tables based on their last access time.

Metadata governance gap analysis

Measures table and column comment coverage to identify governance gaps.

Job performance analysis

Analyzes average and P99 job durations to identify long-tail slow jobs and queuing anomalies.

Data tunnel audit

Tracks Tunnel upload and download volumes to check for abnormal transfer behavior.

User role audit

Reviews user-to-role mappings to verify administrator role assignments.

Partition lifecycle analysis

Monitors partition count growth trends and verifies that lifecycle policies are enforced.

Security precautions

General users should use the remote MCP Server. Do not configure a long-term AccessKey on a local MCP Server 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

    Complete the steps on the OAuth confirmation page yourself. Do not allow others to do it on your behalf.

  • Use an account with least privilege

    An account's permissions determine the MaxCompute resources MCP can access. Use an account with 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.json, or Credentials URI to Git.

  • Explicitly confirm write operations

    Before running a write operation, confirm that the client displays the target project, table, SQL, or a summary of the changes. Verify that the information is correct before proceeding.

Feedback channels

To provide feedback on the Remote MCP service, client compatibility, tool errors, documentation issues, or feature suggestions, use the following channels:

You can also instruct the agent to read skill://maxcompute-mcp-feedback/SKILL.md to get the issue template link, suggested diagnostic fields, and sanitization rules. This resource does not create a GitHub issue, upload logs, or save your feedback.

Before you submit, ensure the issue does not contain any of 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.