Yandex Cloud
Поиск
Связаться с намиПопробовать бесплатно
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex AI Studio
  • Начало работы с Model Gallery
    • О сервисе Yandex AI Studio
    • Yandex Workflows
    • Квоты и лимиты
    • Термины и определения
  • Переход с AI Assistant API на Responses API
  • Совместимость с OpenAI
    • Обзор
    • Аутентификация в API
        • Overview
          • Overview
          • Get
          • List
          • Create
          • Update
          • Delete
          • ListOperations
          • ListAccessBindings
          • SetAccessBindings
          • UpdateAccessBindings
  • Управление доступом
  • Правила тарификации
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

В этой статье:

  • HTTP request
  • Body parameters
  • McpTool
  • McpToolAction
  • FunctionCall
  • ContainerCall
  • HttpCall
  • McpCall
  • ToolCall
  • HeaderAuthorization
  • GrpcCall
  • StartWorkflow
  • LogOptions
  • Response
  • CreateMcpGatewayMetadata
  • Status
  • McpGateway
  • McpTool
  • McpToolAction
  • FunctionCall
  • ContainerCall
  • HttpCall
  • McpCall
  • ToolCall
  • HeaderAuthorization
  • GrpcCall
  • StartWorkflow
  • LogOptions
  1. Справочники API
  2. MCP Hub API (англ.)
  3. REST
  4. McpGateway
  5. Create

MCP Gateway Service, REST: McpGateway.Create

Статья создана
Yandex Cloud
Обновлена 9 декабря 2025 г.
  • HTTP request
  • Body parameters
  • McpTool
  • McpToolAction
  • FunctionCall
  • ContainerCall
  • HttpCall
  • McpCall
  • ToolCall
  • HeaderAuthorization
  • GrpcCall
  • StartWorkflow
  • LogOptions
  • Response
  • CreateMcpGatewayMetadata
  • Status
  • McpGateway
  • McpTool
  • McpToolAction
  • FunctionCall
  • ContainerCall
  • HttpCall
  • McpCall
  • ToolCall
  • HeaderAuthorization
  • GrpcCall
  • StartWorkflow
  • LogOptions

Creates an MCP Gateway in the specified folder.

HTTP requestHTTP request

POST https://serverless-mcp-gateway.api.cloud.yandex.net/mcpgateway/v1/mcpGateways

Body parametersBody parameters

{
  "folderId": "string",
  "name": "string",
  "description": "string",
  "labels": "object",
  "tools": [
    {
      "name": "string",
      "description": "string",
      "inputJsonSchema": "string",
      "action": {
        // Includes only one of the fields `functionCall`, `containerCall`, `httpCall`, `mcpCall`, `grpcCall`, `startWorkflow`
        "functionCall": {
          "functionId": "string",
          "tag": "string"
        },
        "containerCall": {
          "containerId": "string",
          "path": "string",
          "method": "string",
          "body": "string",
          "headers": "object",
          "query": "object"
        },
        "httpCall": {
          "url": "string",
          "method": "string",
          "body": "string",
          "headers": "object",
          "query": "object",
          "useServiceAccount": "boolean"
        },
        "mcpCall": {
          "url": "string",
          // Includes only one of the fields `toolCall`
          "toolCall": {
            "toolName": "string",
            "parametersJson": "string"
          },
          // end of the list of possible fields
          "transport": "string",
          // Includes only one of the fields `unauthorized`, `header`, `serviceAccount`
          "unauthorized": "object",
          "header": {
            "headerName": "string",
            "headerValue": "string"
          },
          "serviceAccount": "object",
          // end of the list of possible fields
          "forwardHeaders": "object"
        },
        "grpcCall": {
          "endpoint": "string",
          "method": "string",
          "useServiceAccount": "boolean",
          "body": "string",
          "headers": "object"
        },
        "startWorkflow": {
          "workflowId": "string",
          "inputJson": "string",
          "mode": "string"
        }
        // end of the list of possible fields
      }
    }
  ],
  "logOptions": {
    "disabled": "boolean",
    // Includes only one of the fields `logGroupId`, `folderId`
    "logGroupId": "string",
    "folderId": "string",
    // end of the list of possible fields
    "minLevel": "string"
  },
  "serviceAccountId": "string",
  "networkId": "string",
  "public": "boolean"
}

Field

Description

folderId

string

Required field. ID of the folder to create the MCP Gateway in.

name

string

Required field. Name of the MCP Gateway.

The maximum string length in characters is 128. Value must match the regular expression \|[a-z]([-a-z0-9]{0,61}[a-z0-9])?.

description

string

Description of the MCP Gateway.

The maximum string length in characters is 4000.

labels

object (map<string, string>)

MCP Gateway labels as key:value pairs.

No more than 64 per resource. The maximum string length in characters for each value is 63. Each value must match the regular expression [-_./\@0-9a-z]*. The string length in characters for each key must be 1-63. Each key must match the regular expression [a-z][-_./\@0-9a-z]*.

tools[]

McpTool

List of MCP tools.

The number of elements must be greater than 0.

logOptions

LogOptions

Logging options for the MCP Gateway.

serviceAccountId

string

Service account ID for the MCP Gateway.

networkId

string

Network ID for the MCP Gateway.

public

boolean

Flag indicating if the MCP Gateway is publicly accessible.

McpToolMcpTool

Field

Description

name

string

Required field. Name of the tool.

The maximum string length in characters is 128. Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_]{0,63})?.

description

string

Description of the tool.

The maximum string length in characters is 4000.

inputJsonSchema

string

JSON Schema describing tool input.

action

McpToolAction

Required field. Action to perform when this tool is invoked.

McpToolActionMcpToolAction

Field

Description

functionCall

FunctionCall

Call Serverless Function.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

containerCall

ContainerCall

Call Serverless Container.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

httpCall

HttpCall

Send HTTP request.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

mcpCall

McpCall

Call MCP Gateway.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

grpcCall

GrpcCall

Call gRPC endpoint. Server must support gRPC reflection.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

startWorkflow

StartWorkflow

Start Workflow.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

FunctionCallFunctionCall

Field

Description

functionId

string

Required field. ID of serverless function to call.

tag

string

Tag of serverless function. If empty, $latest tag will be used.

ContainerCallContainerCall

Field

Description

containerId

string

Required field. ID of serverless container to call.

path

string

Relative request path inside the container.

method

enum (HttpMethod)

HTTP method to use for the request.

  • OPTIONS
  • GET
  • HEAD
  • POST
  • PUT
  • PATCH
  • DELETE
  • TRACE
  • CONNECT

body

string

Request body to send to the container.

headers

object (map<string, string>)

HTTP headers to include in the request.

query

object (map<string, string>)

Query string parameters to include in the request.

HttpCallHttpCall

Field

Description

url

string

Required field. Absolute URL to send the request to. (required)

method

enum (HttpMethod)

HTTP method to use.

  • OPTIONS
  • GET
  • HEAD
  • POST
  • PUT
  • PATCH
  • DELETE
  • TRACE
  • CONNECT

body

string

Request body payload.

headers

object (map<string, string>)

HTTP headers to include.

query

object (map<string, string>)

Query string parameters to include.

useServiceAccount

boolean

Use MCP Gateway service account credentials for the request.

McpCallMcpCall

Field

Description

url

string

Required field. MCP endpoint base URL. (required)

toolCall

ToolCall

Includes only one of the fields toolCall.

transport

enum (Transport)

Transport to use for MCP communication.

  • SSE: Server-Sent Events (HTTP SSE).
  • STREAMABLE: Streamable HTTP transport.

unauthorized

object

Includes only one of the fields unauthorized, header, serviceAccount.

Authorization mode for requests to the MCP endpoint.

header

HeaderAuthorization

Includes only one of the fields unauthorized, header, serviceAccount.

Authorization mode for requests to the MCP endpoint.

serviceAccount

object

Includes only one of the fields unauthorized, header, serviceAccount.

Authorization mode for requests to the MCP endpoint.

forwardHeaders

object (map<string, string>)

Headers from the incoming request to forward downstream by name.

ToolCallToolCall

Field

Description

toolName

string

Required field. Name of the tool to invoke on the MCP endpoint. (required)

parametersJson

string

JSON-encoded parameters to pass to the tool.

HeaderAuthorizationHeaderAuthorization

Field

Description

headerName

string

Name of the authorization header to send.

headerValue

string

Value of the authorization header to send.

GrpcCallGrpcCall

Field

Description

endpoint

string

Required field. gRPC server endpoint, e.g., host:port. (required)

method

string

Required field. Fully qualified gRPC method name, e.g., package.Service/Method. (required)

useServiceAccount

boolean

Use MCP Gateway service account for authentication.

body

string

Request body payload for the call.

headers

object (map<string, string>)

gRPC/HTTP headers to include with the call.

StartWorkflowStartWorkflow

Field

Description

workflowId

string

Required field. ID of the Workflow to start. (required)

inputJson

string

JSON-encoded workflow input payload.

mode

enum (Mode)

Execution mode for the workflow.
Determines whether the call should wait for workflow completion (SYNC)
or return immediately after starting the workflow (ASYNC).

  • SYNC: Synchronous mode. The call blocks until the workflow execution completes.
  • ASYNC: Asynchronous mode. The call returns immediately after starting the workflow.
    Returns the execution ID for tracking the workflow progress separately.

LogOptionsLogOptions

Field

Description

disabled

boolean

Is logging from MCP Gateway disabled.

logGroupId

string

ID of the logging group which should be used for MCP Gateway logs.

Includes only one of the fields logGroupId, folderId.

folderId

string

ID of the folder which default logging group should be used for MCP Gateway logs.

Includes only one of the fields logGroupId, folderId.

minLevel

enum (Level)

Minimum logs level.

See LogLevel.Level for details.

  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

ResponseResponse

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": "boolean",
  "metadata": {
    "mcpGatewayId": "string",
    "folderId": "string"
  },
  // Includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": {
    "id": "string",
    "folderId": "string",
    "tools": [
      {
        "name": "string",
        "description": "string",
        "inputJsonSchema": "string",
        "action": {
          // Includes only one of the fields `functionCall`, `containerCall`, `httpCall`, `mcpCall`, `grpcCall`, `startWorkflow`
          "functionCall": {
            "functionId": "string",
            "tag": "string"
          },
          "containerCall": {
            "containerId": "string",
            "path": "string",
            "method": "string",
            "body": "string",
            "headers": "object",
            "query": "object"
          },
          "httpCall": {
            "url": "string",
            "method": "string",
            "body": "string",
            "headers": "object",
            "query": "object",
            "useServiceAccount": "boolean"
          },
          "mcpCall": {
            "url": "string",
            // Includes only one of the fields `toolCall`
            "toolCall": {
              "toolName": "string",
              "parametersJson": "string"
            },
            // end of the list of possible fields
            "transport": "string",
            // Includes only one of the fields `unauthorized`, `header`, `serviceAccount`
            "unauthorized": "object",
            "header": {
              "headerName": "string",
              "headerValue": "string"
            },
            "serviceAccount": "object",
            // end of the list of possible fields
            "forwardHeaders": "object"
          },
          "grpcCall": {
            "endpoint": "string",
            "method": "string",
            "useServiceAccount": "boolean",
            "body": "string",
            "headers": "object"
          },
          "startWorkflow": {
            "workflowId": "string",
            "inputJson": "string",
            "mode": "string"
          }
          // end of the list of possible fields
        }
      }
    ],
    "createdAt": "string",
    "name": "string",
    "description": "string",
    "labels": "object",
    "status": "string",
    "baseDomain": "string",
    "logOptions": {
      "disabled": "boolean",
      // Includes only one of the fields `logGroupId`, `folderId`
      "logGroupId": "string",
      "folderId": "string",
      // end of the list of possible fields
      "minLevel": "string"
    },
    "serviceAccountId": "string",
    "networkId": "string",
    "cloudId": "string",
    "public": "boolean"
  }
  // end of the list of possible fields
}

An Operation resource. For more information, see Operation.

Field

Description

id

string

ID of the operation.

description

string

Description of the operation. 0-256 characters long.

createdAt

string (date-time)

Creation timestamp.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

createdBy

string

ID of the user or service account who initiated the operation.

modifiedAt

string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

done

boolean

If the value is false, it means the operation is still in progress.
If true, the operation is completed, and either error or response is available.

metadata

CreateMcpGatewayMetadata

Service-specific metadata associated with the operation.
It typically contains the ID of the target resource that the operation is performed on.
Any method that returns a long-running operation should document the metadata type, if any.

error

Status

The error result of the operation in case of failure or cancellation.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

response

McpGateway

The normal response of the operation in case of success.
If the original method returns no data on success, such as Delete,
the response is google.protobuf.Empty.
If the original method is the standard Create/Update,
the response should be the target resource of the operation.
Any method that returns a long-running operation should document the response type, if any.

Includes only one of the fields error, response.

The operation result.
If done == false and there was no failure detected, neither error nor response is set.
If done == false and there was a failure detected, error is set.
If done == true, exactly one of error or response is set.

CreateMcpGatewayMetadataCreateMcpGatewayMetadata

Field

Description

mcpGatewayId

string

Required field. ID of the MCP Gateway being created.

folderId

string

Required field. ID of the folder containing the MCP Gateway.

StatusStatus

The error result of the operation in case of failure or cancellation.

Field

Description

code

integer (int32)

Error code. An enum value of google.rpc.Code.

message

string

An error message.

details[]

object

A list of messages that carry the error details.

McpGatewayMcpGateway

Field

Description

id

string

Required field. ID of the MCP Gateway. Generated at creation time.

folderId

string

Required field. ID of the folder that the MCP Gateway belongs to.

tools[]

McpTool

Tools of the MCP Gateway.

createdAt

string (date-time)

Required field. Creation timestamp for the MCP Gateway.

String in RFC3339 text format. The range of possible values is from
0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z, i.e. from 0 to 9 digits for fractions of a second.

To work with values in this field, use the APIs described in the
Protocol Buffers reference.
In some languages, built-in datetime utilities do not support nanosecond precision (9 digits).

name

string

Required field. Name of the MCP Gateway.

description

string

Description of the MCP Gateway.

labels

object (map<string, string>)

MCP Gateway labels as key:value pairs.

status

enum (Status)

Status of the MCP Gateway.

  • CREATING: MCP Gateway is being created.
  • ACTIVE: MCP Gateway is ready to use.
  • UPDATING: MCP Gateway is being updated.
  • DELETING: MCP Gateway is being deleted.
  • ERROR: MCP Gateway is in an error state. The only allowed action is delete.

baseDomain

string

Base domain of the MCP Gateway.

logOptions

LogOptions

Log options for the MCP Gateway.

serviceAccountId

string

ID of the Service Account which will be used for resource access in MCP Gateway call.

networkId

string

ID of the VPC network MCP Gateway will be executed in, in order to access private resources.

cloudId

string

Required field. ID of the cloud that the MCP Gateway belongs to.

public

boolean

Publicity of the MCP Gateway. Public MCP Gateway can be accessed by anybody.

McpToolMcpTool

Field

Description

name

string

Required field. Name of the tool.

The maximum string length in characters is 128. Value must match the regular expression ([a-zA-Z][-a-zA-Z0-9_]{0,63})?.

description

string

Description of the tool.

The maximum string length in characters is 4000.

inputJsonSchema

string

JSON Schema describing tool input.

action

McpToolAction

Required field. Action to perform when this tool is invoked.

McpToolActionMcpToolAction

Field

Description

functionCall

FunctionCall

Call Serverless Function.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

containerCall

ContainerCall

Call Serverless Container.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

httpCall

HttpCall

Send HTTP request.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

mcpCall

McpCall

Call MCP Gateway.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

grpcCall

GrpcCall

Call gRPC endpoint. Server must support gRPC reflection.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

startWorkflow

StartWorkflow

Start Workflow.

Includes only one of the fields functionCall, containerCall, httpCall, mcpCall, grpcCall, startWorkflow.

FunctionCallFunctionCall

Field

Description

functionId

string

Required field. ID of serverless function to call.

tag

string

Tag of serverless function. If empty, $latest tag will be used.

ContainerCallContainerCall

Field

Description

containerId

string

Required field. ID of serverless container to call.

path

string

Relative request path inside the container.

method

enum (HttpMethod)

HTTP method to use for the request.

  • OPTIONS
  • GET
  • HEAD
  • POST
  • PUT
  • PATCH
  • DELETE
  • TRACE
  • CONNECT

body

string

Request body to send to the container.

headers

object (map<string, string>)

HTTP headers to include in the request.

query

object (map<string, string>)

Query string parameters to include in the request.

HttpCallHttpCall

Field

Description

url

string

Required field. Absolute URL to send the request to. (required)

method

enum (HttpMethod)

HTTP method to use.

  • OPTIONS
  • GET
  • HEAD
  • POST
  • PUT
  • PATCH
  • DELETE
  • TRACE
  • CONNECT

body

string

Request body payload.

headers

object (map<string, string>)

HTTP headers to include.

query

object (map<string, string>)

Query string parameters to include.

useServiceAccount

boolean

Use MCP Gateway service account credentials for the request.

McpCallMcpCall

Field

Description

url

string

Required field. MCP endpoint base URL. (required)

toolCall

ToolCall

Includes only one of the fields toolCall.

transport

enum (Transport)

Transport to use for MCP communication.

  • SSE: Server-Sent Events (HTTP SSE).
  • STREAMABLE: Streamable HTTP transport.

unauthorized

object

Includes only one of the fields unauthorized, header, serviceAccount.

Authorization mode for requests to the MCP endpoint.

header

HeaderAuthorization

Includes only one of the fields unauthorized, header, serviceAccount.

Authorization mode for requests to the MCP endpoint.

serviceAccount

object

Includes only one of the fields unauthorized, header, serviceAccount.

Authorization mode for requests to the MCP endpoint.

forwardHeaders

object (map<string, string>)

Headers from the incoming request to forward downstream by name.

ToolCallToolCall

Field

Description

toolName

string

Required field. Name of the tool to invoke on the MCP endpoint. (required)

parametersJson

string

JSON-encoded parameters to pass to the tool.

HeaderAuthorizationHeaderAuthorization

Field

Description

headerName

string

Name of the authorization header to send.

headerValue

string

Value of the authorization header to send.

GrpcCallGrpcCall

Field

Description

endpoint

string

Required field. gRPC server endpoint, e.g., host:port. (required)

method

string

Required field. Fully qualified gRPC method name, e.g., package.Service/Method. (required)

useServiceAccount

boolean

Use MCP Gateway service account for authentication.

body

string

Request body payload for the call.

headers

object (map<string, string>)

gRPC/HTTP headers to include with the call.

StartWorkflowStartWorkflow

Field

Description

workflowId

string

Required field. ID of the Workflow to start. (required)

inputJson

string

JSON-encoded workflow input payload.

mode

enum (Mode)

Execution mode for the workflow.
Determines whether the call should wait for workflow completion (SYNC)
or return immediately after starting the workflow (ASYNC).

  • SYNC: Synchronous mode. The call blocks until the workflow execution completes.
  • ASYNC: Asynchronous mode. The call returns immediately after starting the workflow.
    Returns the execution ID for tracking the workflow progress separately.

LogOptionsLogOptions

Field

Description

disabled

boolean

Is logging from MCP Gateway disabled.

logGroupId

string

ID of the logging group which should be used for MCP Gateway logs.

Includes only one of the fields logGroupId, folderId.

folderId

string

ID of the folder which default logging group should be used for MCP Gateway logs.

Includes only one of the fields logGroupId, folderId.

minLevel

enum (Level)

Minimum logs level.

See LogLevel.Level for details.

  • TRACE: Trace log level.

    Possible use case: verbose logging of some business logic.

  • DEBUG: Debug log level.

    Possible use case: debugging special cases in application logic.

  • INFO: Info log level.

    Mostly used for information messages.

  • WARN: Warn log level.

    May be used to alert about significant events.

  • ERROR: Error log level.

    May be used to alert about errors in infrastructure, logic, etc.

  • FATAL: Fatal log level.

    May be used to alert about unrecoverable failures and events.

Была ли статья полезна?

Предыдущая
List
Следующая
Update
Проект Яндекса
© 2025 ООО «Яндекс.Облако»