Item | Requirement |
MCP client | Clients that support streamable-http transport (CodeBuddy, Cursor, Claude Desktop, and others) |
Credentials | TencentCloud API key SecretId / SecretKey, and the account has corresponding project/data permissions in WeData. |
Region | Consistent with the region where WeData is located, such as ap-guangzhou and ap-singapore |
Network | Accessible to the public network *.wedata.cloud.tencent.com |
SecretId and SecretKey.mcp.json file or environment variables. Do not commit it to code repositories or paste it into conversations, documents, or tickets.

mcp.json via "Configuration → MCP Settings → Configure MCP") and add the following content:{"mcpServers": {"WeData-MCP-Server": {"url": "https://mcp.wedata.tencentcloud.com/mcp/wedata/v1/all","timeout": 20000,"transportType": "streamable-http","headers": {"TENCENTCLOUD-SECRET-ID": "<Your SecretId>","TENCENTCLOUD-SECRET-KEY": "<Your SecretKey>","TOKEN": "<Required only for the Entra ID method. For details on how to obtain it, see 3.1.2>","TENCENTCLOUD-REGION": "ap-singapore"},"disabled": false}}}
Field | Required | Description |
url | Yes | MCP service endpoint China environment: https://mcp.wedata.cloud.tencent.com/mcp/wedata/v1/allOverseas environment: https://mcp.wedata.tencentcloud.com/mcp/wedata/v1/all |
TENCENTCLOUD-SECRET-ID | Yes | TencentCloud API key SecretId |
TENCENTCLOUD-SECRET-KEY | Yes | TencentCloud API key SecretKey |
TOKEN | No | Temporary Token, required only for the entraId method. To obtain it, see 3.1.2 entraId Method |
TENCENTCLOUD-REGION | Yes | Region. Replace it with the actual region. |
timeout | No | In milliseconds. Increase the value if tool execution is slow. |
TOOL-SCOPE | No | Tool scope filtering. See 3.3 Using TOOL-SCOPE to Control Tool Scope (Optional) |
TOOL-SCOPE to headers to load only the required tools and reduce interference with model selection:"TOOL-SCOPE": "data_assets"
"TOOL-SCOPE": "data_assets, data_analysis"
data_assets and data_analysis. Incorrect values or inconsistent spelling will prevent tools from loading. If you are unsure, leave it unconfigured to load all tools by default.WeData-MCP-Server status shows Connected and the tool list is displayed, the configuration is successful. You can then start a conversation directly, for example: "Help me check which WeData projects I have."Tool | Purpose | Key Input Parameter | Remarks |
list_projects | List WeData projects under a tenant by page. | PageNumber, PageSize; optional ProjectName, ProjectIds, ProjectModel, Status | Status: 0=disabled, 1=enabled; ProjectModel: SIMPLE/STANDARD |
list_data_sources | List data sources under a project. | ProjectId (required); optional Name, DisplayName, Type, Creator, PageNumber, PageSize | Type values include MYSQL, HIVE, ICEBERG, DLC, StarRocks, SuperSQL, and others. |
list_database | List databases (assets). | PageNumber, PageSize (required); optional DatasourceId, Keyword, CatalogName | Returns database name, Catalog, storage size, associated data source, and more. |
list_table | List tables under a database. | PageNumber, PageSize (required); optional DatabaseName, DatasourceId, Keyword, CatalogName, SchemaName | Returns table name, type, owner, storage size, update time, and more. |
get_table_columns | Query the field list of a table. | TableGuid (required) | Returns field name, type, description, length, sequence number, and whether it is a partition field; TableGuid is obtained from list_table. |
list_resource_groups | List execution resource groups. | PageNumber, PageSize (required); optional Type, ProjectIds, Id, Name | Type: Schedule/Integration/DataService; running SQL requires the Schedule type. |
execute_sql | Submit SQL to Data Exploration for asynchronous execution. | ProjectId, ScriptContent, ScriptConfig (including DatasourceId, ExecutorGroupId) | Only submits the task and immediately returns a JobId, with the status typically being QUEUED. |
poll_sql_result | Query SQL execution results and status. | ProjectId, JobId; optional JobExecutionId | When the status is not final, QUEUED/RUNNING is returned with an empty result, and polling is required. |



JobId to call poll_sql_result for polling until the status changes to SUCCESS, and then organizes the result for you. If the model does not poll automatically, you can follow up:{"ProjectId": "Project ID","ScriptContent": "show databases;","ScriptConfig": {"DatasourceId": "Data Source ID","ExecutorGroupId": "Scheduling Resource Group ID"}}



execute_sql only submits the task and returns a JobId. After submission, use poll_sql_result to poll until the status becomes SUCCESS / FAILED / TERMINATED / CANCELED.;, each statement generates one sub-execution. If poll_sql_result is called without JobExecutionId, all sub-execution results are returned in order. If it is provided, only the specified sub-execution result is returned.Truncated=true. Results are retained only for a limited time. If the results expire, ResourceNotFound.ResultExpired is returned, and the SQL must be rerun.DatasourceId must belong to the specified ProjectId. Otherwise, InvalidParameter is returned. ExecutorGroupId must be a Schedule resource group available in the project, which can be queried using list_resource_groups.Symptom | Possible Cause and Resolution |
The client keeps displaying "Connecting" or connection failure. | Check whether the URL and TENCENTCLOUD-REGION are consistent with the WeData region; check whether the network can access the public network endpoint; increase the timeout appropriately. |
Empty tool list / significantly fewer tools than expected | Check the spelling of the TOOL-SCOPE value; if unsure, delete the Header first and load all tools. |
Authentication failure reported during invocation | The key is incorrect, disabled, or has no WeData access permission; regenerate the key and update the configuration. |
InvalidParameter reported by execute_sql | The DatasourceId does not belong to the ProjectId, or the ExecutorGroupId is not a scheduling resource group under the project. |
QUEUED/RUNNING is always returned. | This is normal. Continue polling. If the resource group is busy and the wait is long, switch to a less busy resource group. |
Empty result or only partial data returned | Check the Truncated field in the response; or if there are many sub-executions, specify the JobExecutionId to view them one by one. |
Result expiration is indicated. | The result retention period has expired. Re-execute the SQL to obtain new results. |
The table you want to query cannot be found. | Confirm whether the account has the required table permission and whether the project has configured the metadata visibility scope. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback