Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex AI Studio
  • About Yandex AI Studio
  • Getting started with Model Gallery
  • Yandex Workflows
    • All guides
    • Disabling request logging
    • Getting an API key
        • Connecting an external MCP server
        • Creating an MCP server from a template
        • Creating an MCP server from scratch
      • Viewing information about an MCP server
      • Deleting an MCP server
  • Switching from the AI Assistant API to Responses API
  • Compatibility with OpenAI
  • Quotas and limits
  • Pricing policy
  • Access management
  • Audit Trails events
  • Public materials
  • Release notes
  • Terms and definitions
  1. Step-by-step guides
  2. MCP Hub
  3. Creating an MCP server
  4. Creating an MCP server from scratch

Creating an MCP server in MCP Hub from scratch

Written by
Yandex Cloud
Improved by
Danila N.
Updated at February 3, 2026

Note

This feature is at the Preview stage.

In MCP Hub, you can create new MCP servers from scratch containing tools such as an HTTPS request to an external API, a Yandex Cloud Functions function, or a workflow in Yandex Workflows.

Tip

To access MCP servers in MCP Hub, you will also need the serverless.mcpGateways.invoker role or higher. To access external MCP servers and MCP servers created from a template, you will additionally need the serverless.mcpGateways.anonymousInvoker role or higher.

To create a new MCP server:

Management console
cURL
  1. In the management console, select the folder for which your account has the serverless.mcpGateways.editor and iam.serviceAccounts.user roles or higher.

  2. Go to AI Studio.

  3. In the left-hand panel, select MCP servers and click Create MCP server. In the window that opens:

    1. Under Add method, select Create.

    2. Under Tools, select the type of the tool you want to add to the MCP server: HTTPS query, Cloud Functions, or Workflows:

      HTTPS request
      Cloud Functions
      Workflows
      1. In the Tool name field, enter a name for the new tool. Follow these naming requirements:

        • It must be from 2 to 63 characters long.
        • It can only contain lowercase Latin letters, numbers, and hyphens.
        • It must start with a letter and cannot end with a hyphen.
      2. In the Instructions for agent field, enter the required text description for the tool. This description must define conditions for the AI agent to use this tool. Here is an example:

        A tool for creating tickets in a corporate task processing system. Use this 
        tool to log customer complaints, support requests, and 
        error reports. When using this tool, set the `queue`, `type`, `priority`, and `summary` parameters. 
        In the `queue` parameter (queue name), always provide the SUPPORT constant. In the `type` parameter (request 
        type), provide one of the following values: bug (error report), complaint (customer complaint) or 
        support-request (request for consultation). In the `priority` parameter, 
        provide one of these values: low, medium, or high. In the 
        `summary` parameter, provide a text describing the gist of the user request in their own words.
        
      3. In the URL field, specify the endpoint for the HTTPS request.

        • You can use jq templates to add path parameters to the endpoint value. Here is an example:

          https://console.yandex.cloud/folders/\(.folder-id)
          

          In this example, the folder-id field must also be added to the Tool parameters section of the MCP server settings.

        • To send query parameters of the endpoint request:

          • Add relevantly named fields to the Tool parameters section of the new MCP server settings, e.g., country, city, and name.
          • Add relevant query parameters to the HTTPS method parameters section of the new MCP server settings. Specify jq templates with the names of the fields mentioned above as values for the new query parameters, e.g., \(.country), \(.city), and \(.name).
      4. In the Method field, select the HTTP request method: GET, POST, DELETE, PATCH, OPTIONS, or HEAD.

      5. Expand the Additional parameters section and specify the authentication data to provide in HTTPS requests:

        • Service account: To provide the IAM token issued for the service account attached to the MCP server.
        • Access token: To provide the specified access token.
        • Without authorization: To skip authentication.
      6. Under Tool parameters, specify the names, types, and text descriptions of the parameters the tool will use.

        You can add the parameters you need on the layout-header-cells-large Form tab one by one by clicking Add, or on the JSON schema tab, as a JSON structure.

        JSON schema:

        {
          properties?: { [key: string]: object };
          required?: string[];
          type: "object";
        }
        
        JSON struture example
        {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City name or zip code"
            }
          },
          "required": ["location"]
        }
        
      7. Under HTTPS method parameters, configure the HTTPS request parameters:

        • Under Request headers, specify the names and values ​​of the headers to provide in requests.

        • Under Query parameters, specify the names and values ​​of the parameters to provide in the request.

        • Under Request body, review an example of the request and modify it as needed.

          By default, an empty request body is generated with a flat JSON object consisting of pairs of tool parameters and their values. For example:

          {
            "parameter-a": <parameter-a_value>,
            "parameter-b": <parameter-b_value>,
            "parameter-c": <parameter-c_value>
          }
          

        All HTTPS request parameters support templating: their values can be generated dynamically in the jq language. For more information, see the jq guide.

        For example, the \(.city) value of the HTTPS request parameter will be taken from the city tool parameter. In addition, you can use the syntax Bearer \(.token) for the Authorization header to set up authorization via a token provided in the tool parameter.

      1. In the Tool name field, enter a name for the new tool. Follow these naming requirements:

        • It must be from 2 to 63 characters long.
        • It can only contain lowercase Latin letters, numbers, and hyphens.
        • It must start with a letter and cannot end with a hyphen.
      2. In the Instructions for agent field, enter the required text description for the tool. This description must define conditions for the AI agent to use this tool. Here is an example:

        This tool recognizes text in an image transmitted in base64 encoding. In the recognized 
        text, the tool extracts "article":"quantity" pairs and returns them in JSON structure format.
        
      3. In the Function field, select the Cloud Functions function to process the requests and its version.

      4. Under Tool parameters, specify the names, types, and text descriptions of the parameters the tool will use.

        You can add the parameters you need on the layout-header-cells-large Form tab one by one by clicking Add, or on the JSON schema tab, as a JSON structure.

        JSON schema:

        {
          properties?: { [key: string]: object };
          required?: string[];
          type: "object";
        }
        
        JSON struture example
        {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City name or zip code"
            }
          },
          "required": ["location"]
        }
        

      By default, an empty request body is generated with a flat JSON object consisting of pairs of tool parameters and their values. For example:

      {
        "parameter-a": <parameter-a_value>,
        "parameter-b": <parameter-b_value>,
        "parameter-c": <parameter-c_value>
      }
      
      1. In the Tool name field, enter a name for the new tool. Follow these naming requirements:

        • It must be from 2 to 63 characters long.
        • It can only contain lowercase Latin letters, numbers, and hyphens.
        • It must start with a letter and cannot end with a hyphen.
      2. In the Instructions for agent field, enter the required text description for the tool. This description must define conditions for the AI agent to use this tool. Here is an example:

        This tool invokes a workflow to automatically summarize long text. Provides 
        the source text, maximum summation length, and language.
        
      3. In the Workflow field, select the Workflows workflow to process the requests.

      4. Under Tool parameters, specify the names, types, and text descriptions of the parameters the tool will use.

        You can add the parameters you need on the layout-header-cells-large Form tab one by one by clicking Add, or on the JSON schema tab, as a JSON structure.

        JSON schema:

        {
          properties?: { [key: string]: object };
          required?: string[];
          type: "object";
        }
        
        JSON struture example
        {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City name or zip code"
            }
          },
          "required": ["location"]
        }
        

      By default, an empty request body is generated with a flat JSON object consisting of pairs of tool parameters and their values. For example:

      {
        "parameter-a": <parameter-a_value>,
        "parameter-b": <parameter-b_value>,
        "parameter-c": <parameter-c_value>
      }
      
    3. To add an additional tool to the MCP server, click Add tool.

      Note

      One MCP server can contain up to 50 tools.

    4. Under Server parameters:

      1. In the Name field, enter a name for the new MCP server. Follow these naming requirements:

        • It must be from 2 to 63 characters long.
        • It can only contain lowercase Latin letters, numbers, and hyphens.
        • It must start with a letter and cannot end with a hyphen.
      2. Optionally, add a description and labels for the server you are creating by using the corresponding buttons.

      3. In the Access field, select the type of your new server:

        • Private: To build a private MCP server with the authentication-based access.
        • Public: To build a public MCP server that requires no authentication.
      4. In the Service account field, select the service account your MCP server will use to access Yandex Cloud services and resources. The service account should get the roles sufficient to access these resources and services.

      5. Optionally, enable Select network to specify a cloud network to host your MCP server instances.

      6. Optionally, turn on the Enable logging option and configure the logging settings to keep a log of the MCP server you are creating.

    5. Click Save.

Note

The example below demonstrates how to create a simple MCP server with a single tool, an HTTPS request. To set up an MCP server with multiple tools, add the descriptions of these tools as separate JSON objects in the tools list. For more information about the parameters used to create an MCP server, see McpGateway.Create in the API reference.

  1. Get an IAM token, which is required for authentication.

  2. Save the IAM token to an environment variable:

    export IAM_TOKEN="<IAM_token_contents>"
    
  3. Create a file with the request body, e.g., body.json:

    body.json

    {
      "folderId": "<folder_ID>",
      "name": "<MCP_server_name>",
      "description": "<MCP_server_description>",
      "serviceAccountId": "<service_account_ID>",
      "public": "true|false",
      "tools": [
        {
          "name": "<tool_name>",
          "description": "<tool_description>",
          "inputJsonSchema": "<tool_JSON_schema>",
          "action": {
            "httpCall": {
              "url": "<endpoint_URL>",
              "method": "<HTTP_method>",
              "body": "<request_body>",
              "headers": {
                "header1": "<header1_value>",
                "header2": "<header2_value>"
              },
              "query": {
                "parameter1": "<parameter1_value>"
              },
              "useServiceAccount": "true|false"
            }
          }
        }
      ]
    }
    

    Where:

    • folderId: ID of the folder the MCP server is created in. Make sure to assign the serverless.mcpGateways.editor and iam.serviceAccounts.user roles or higher for this folder to your account.

    • name: Name of the new MCP server. Follow these naming requirements:

      • It must be from 2 to 63 characters long.
      • It can only contain lowercase Latin letters, numbers, and hyphens.
      • It must start with a letter and cannot end with a hyphen.
    • description: Description of the new MCP server.

    • serviceAccountId: ID of the service account your MCP server will use to access Yandex Cloud services and resources. The service account should get the roles sufficient to access these resources and services.

    • public: Type of the new server. The possible values are:

      • true: To create a public MCP server.
      • false: To create a private MCP server.
    • tools: Description of the tools you add to the MCP server:

      • name: Tool name. Follow these naming requirements:

        • It must be from 2 to 63 characters long.
        • It can only contain lowercase Latin letters, numbers, and hyphens.
        • It must start with a letter and cannot end with a hyphen.
      • description: Tool description.

      • inputJsonSchema: JSON schema describing the tool input parameters.

        JSON schema:

        {
          properties?: { [key: string]: object };
          required?: string[];
          type: "object";
        }
        
        JSON struture example
        {
          "type": "object",
          "properties": {
            "location": {
              "type": "string",
              "description": "City name or zip code"
            }
          },
          "required": ["location"]
        }
        
      • action.httpCall: Description of configuration parameters for a tool of the HTTPS request type.

        • url: URL to send the requests to, e.g., https://example.com.
        • method: Request method. The possible values are OPTIONS, GET, HEAD, POST, PUT, PATCH, DELETE, TRACE, and CONNECT.
        • body: HTTP request body.
        • headers: List of name:value pairs of the headers to provide in requests.
        • query: List of name:value pairs of the query parameters to provide with requests.
        • useServiceAccount: If set to true, requests will be authenticated using an IAM token issued for the service account attached to the MCP server.

        All HTTPS request parameters support templating: their values can be generated dynamically in the jq language. For more information, see the jq guide.

        For example, the \(.city) value of the HTTPS request parameter will be taken from the city tool parameter. In addition, you can use the syntax Bearer \(.token) for the Authorization header to set up authorization via a token provided in the tool parameter.

      Request body example
      {
        "folderId": "b1gt6g8ht345********",
        "name": "my-mcp-server",
        "description": "My sample MCP-server implementing an HTTPS tool",
        "serviceAccountId": "ajegtlf2q28a********",
        "public": "true",
        "tools": [
          {
            "name": "the-https-tool",
            "description": "My HTTPS tool",
            "inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"City name or zip code\"},\"name\":{\"type\":\"string\",\"description\":\"Full name\"}},\"required\":[\"location\",\"name\"]}",
            "action": {
              "httpCall": {
                "url": "https://example.com",
                "method": "GET",
                "body": "\\( . )",
                "headers": {
                  "location": "\\(.location)",
                  "name": "\\(.name)"
                },
                "query": {
                  "name": "\\(.name)"
                },
                "useServiceAccount": "false"
              }
            }
          }
        ]
      }
      
  4. Use the McpGateway.Create REST API method to create a new MCP server in the folder:

    curl \
      --request POST \
      --header "Authorization: Bearer $IAM_TOKEN" \
      --data "@body.json" \
      "https://serverless-mcp-gateway.api.cloud.yandex.net/mcpgateway/v1/mcpGateways"
    

    Result:

    {
    "done": false,
    "metadata": {
      "@type": "type.googleapis.com/yandex.cloud.serverless.mcpgateway.v1.CreateMcpGatewayMetadata",
      "mcpGatewayId": "db8f3fgm7vq1********",
      "folderId": "b1gt6g8ht345********"
    },
    "id": "db8h3djc7vjt********",
    "description": "Create MCP Gateway",
    "createdAt": "2025-12-24T06:38:31.834344392Z",
    "createdBy": "ajeol2afu1js********",
    "modifiedAt": "2025-12-24T06:38:31.834344392Z"
    }
    

    Save the new MCP server's ID (the mcpGatewayId field value) for the next step.

  5. Wait until the MCP server is created, then view its details by specifying the ID you saved in the previous step:

    curl \
      --request GET \
      --header "Authorization: Bearer $IAM_TOKEN" \
      "https://serverless-mcp-gateway.api.cloud.yandex.net/mcpgateway/v1/mcpGateways/<MCP_server_ID>"
    
    Result
    {
      "tools": [
        {
          "action": {
            "httpCall": {
              "headers": {
                "location": "\\(.location)",
                "name": "\\(.name)"
              },
              "query": {
                "name": "\\(.name)"
              },
              "useServiceAccount": false,
              "url": "https://example.com",
              "method": "GET",
              "body": "\\( . )"
            }
          },
          "name": "the-https-tool",
          "description": "My HTTPS tool",
          "inputJsonSchema": "{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"City name or zip code\"},\"name\":{\"type\":\"string\",\"description\":\"Full name\"}},\"required\":[\"location\",\"name\"]}"
        }
      ],
      "logOptions": {
        "disabled": false
      },
      "public": true,
      "id": "db8f3fgm7vq1********",
      "folderId": "b1gt6g8ht345********",
      "createdAt": "2025-12-24T06:38:31.884226Z",
      "name": "my-mcp-server",
      "description": "My sample MCP-server implementing an HTTPS tool",
      "status": "ACTIVE",
      "baseDomain": "https://db8f3fgm7vq1********.ibiatp37.mcpgw.serverless.yandexcloud.net",
      "serviceAccountId": "ajegtlf2q28a********",
      "cloudId": "b1gia87mbaom********"
    }
    

This will create an MCP server in MCP Hub, containing the added tools and accessible to AI agents.

See alsoSee also

  • MCP Hub

Was the article helpful?

Previous
Creating an MCP server from a template
Next
Viewing information about an MCP server
© 2026 Direct Cursus Technology L.L.C.