CreateMcpServer
Creates an MCP server.
Operation description
Request description
After submission, the system verifies the availability of the MCP server based on the provided connection information.
If the MCP server connection is unavailable, the API returns the corresponding error message.
The Name field must start with a lowercase letter and can contain only lowercase letters, digits, underscores (_), and hyphens (-). It must be unique within the current account.
The Visibility field defines the visibility level of the MCP server. Valid values:
TENANT(visible within the account),PROJECT(visible to specified projects), andUSER(visible to specified users). Depending on the selected value, you must provide the corresponding VisibilityScope parameter to further specify the visibility scope.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:CreateMcpServer |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Name |
string |
Yes |
The name of the MCP server. The name must be unique at the tenant level. It must start with a lowercase letter and can contain only lowercase letters, digits, underscores (_), and hyphens (-). |
my-mcp-server |
| Config |
object |
No |
The connection configuration of the MCP server. |
{"Transport":"SSE","Url":"https://example.com/mcp/sse","CustomHeaders":{}} |
| Url |
string |
No |
The service URL of the MCP server. It must start with |
https://example.com/mcp/sse |
| Transport |
string |
No |
The transport protocol. Valid values:
|
SSE |
| CustomHeaders |
object |
No |
The custom request headers in key-value pairs. Reserved headers cannot be overwritten. |
{} |
| Visibility |
string |
No |
The visibility level. Valid values:
|
TENANT |
| VisibilityScope |
object |
No |
The visibility scope. Specify the corresponding field based on the value of Visibility. |
|
| ProjectIds |
array |
No |
The IDs of the projects in which the MCP server is visible. This parameter takes effect only when Visibility is set to |
|
|
string |
No |
The returned DataWorks workspace ID. |
123456 |
|
| UserIds |
array |
No |
The IDs of the users who can see the MCP server. This parameter takes effect only when Visibility is set to |
|
|
string |
No |
The user ID. |
123456 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The created MCP server. |
||
| RequestId |
string |
The ID of the request. |
valueA |
| McpServer |
object |
The registered MCP server. |
|
| Name |
string |
The name of the MCP server. |
my-mcp-server |
| GmtCreateTime |
string |
The creation time. The value is a 13-digit number, such as |
1780555634000 |
Examples
Success response
JSON format
{
"RequestId": "valueA",
"McpServer": {
"Name": "my-mcp-server",
"GmtCreateTime": "1780555634000"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.