CreateMcpServer

更新时间:
复制 MD 格式

Creates an MCP Server.

Operation description

Usage notes

  • When you submit a request, the system verifies the availability of the MCP Server based on the connection configuration.

  • If the MCP Server connection is unavailable, the API returns an error message.

  • The Name must be unique at the tenant level, start with a lowercase letter, and contain only lowercase letters, digits, underscores (_), and hyphens (-).

  • The Visibility parameter specifies the visibility level of the MCP Server. Valid values are TENANT (visible within the tenant), PROJECT (visible to specified projects), and USER (visible to specified users). You must also provide the VisibilityScope parameter to define the scope based on the selected visibility level.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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 contain only characters from a-z, 0-9, _, and -.

my-mcp-server

Config

object

No

The connection configuration for the MCP Server.

-

Url

string

No

The service address of the MCP Server. It must start with https://.

https://example.com/mcp/sse

Transport

string

No

The transport protocol.

SSE

CustomHeaders

object

No

The custom request headers, specified as key-value pairs. You cannot override reserved headers.

{}

Visibility

string

No

The visibility level.

TENANT

VisibilityScope

object

No

The visibility scope. The required fields depend on the value of the Visibility parameter.

ProjectIds

array

No

The project IDs to which the MCP Server is visible. This parameter is required only when Visibility is set to PROJECT.

string

No

The ID of a DataWorks workspace.

123456

UserIds

array

No

The user IDs to which the MCP Server is visible. This parameter is required only when Visibility is set to USER.

string

No

A user ID.

123456

Response elements

Element

Type

Description

Example

object

Details of the created MCP Server.

RequestId

string

The ID of the request.

valueA

McpServer

object

The created MCP Server.

Name

string

The name of the MCP Server.

my-mcp-server

GmtCreateTime

string

The time when the MCP Server was created.

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.