Method: projects.locations.servers.configureAndDeployServer

Configures and deploys a given server config for given target. Currently this API supports only deploying MCP server in Apigee X. For mcp server deployment in apigee X, if there is already a mcp proxy deployed, then this method will try to overwrite it by creating new revision i.e. all existing tools will be removed and new set of tools will be deployed.

HTTP request

POST https://apihub.googleapis.com/v1/{parent=projects/*/locations/*}/servers:configureAndDeployServer

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Format: projects/{project}/locations/{location}

Request body

The request body contains data with the following structure:

JSON representation
{

  // Union field server_config can be only one of the following:
  "mcpServerConfig": {
    object (McpServerConfig)
  }
  // End of list of possible types for union field server_config.
}
Fields
Union field server_config. Protocol-specific server configuration. server_config can be only one of the following:
mcpServerConfig

object (McpServerConfig)

MCP (Model Context Protocol) server configuration.

Response body

If successful, the response body contains an instance of Operation.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/apihub.readwrite
  • https://www.googleapis.com/auth/cloud-platform

IAM Permissions

Requires the following IAM permissions on the parent resource:

  • apihub.apiOperations.listAll
  • apihub.apis.list
  • apihub.deployments.list
  • apihub.specs.listAll
  • apihub.versions.listAll

For more information, see the IAM documentation.

McpServerConfig

MCP-specific server configuration.

JSON representation
{
  "tools": [
    {
      object (McpToolConfig)
    }
  ],

  // Union field target can be only one of the following:
  "apigeeXTargetDetails": {
    object (ApigeeXTargetDetails)
  }
  // End of list of possible types for union field target.
}
Fields
tools[]

object (McpToolConfig)

Required. The tools to expose on the MCP server.

Union field target. The target runtime where the MCP server will be deployed. Currently only Apigee X is supported. target can be only one of the following:
apigeeXTargetDetails

object (ApigeeXTargetDetails)

Optional. The target Apigee X configuration.

ApigeeXTargetDetails

The target configuration for Apigee X. Note: If this API is called while an earlier deployment is still in progress, the earlier deployment will be aborted and a new deployment will be triggered.

JSON representation
{
  "environment": string,
  "proxy": string,
  "targetProject": string,
  "metadata": {
    object (MetaData)
  },
  "deployedRevision": string
}
Fields
environment

string

Required. The specific Apigee environment where the server will be deployed.

proxy

string

Required. This name identifies the proxy resource in Apigee. It typically follows a standard alphanumeric format (e.g., "mcp-discovery-server").

targetProject

string

Required. The runtime project that hosts the Apigee X organization. This must be one of the runtime projects attached to the API Hub host project.

metadata

object (MetaData)

Optional. Metadata for the proxy configuration in Apigee X.

deployedRevision

string

Output only. The revision number of the Apigee proxy that was deployed.

MetaData

Metadata for the server configuration in Apigee X.

JSON representation
{
  "displayName": string,
  "description": string
}
Fields
displayName

string

Optional. Display name for the server. For apigee target, this will be used as revision display name.

description

string

Optional. Description for the server. For apigee target, this will be used as revision description.

McpToolConfig

A tool exposed by the MCP server. Each tool wraps exactly one API Hub operation under a caller-supplied identifier.

JSON representation
{
  "toolId": string,
  "description": string,
  "operation": {
    object (OperationConfig)
  }
}
Fields
toolId

string

Required. Caller-supplied identifier for the tool; each tool must have a unique identifier. This will be by used by agents to invoke the tool. Tool ID must be unique across all tools in the given MCP server configuration.

description

string

Required. Description of what the tool does and how it is used. Description serves as key reference for the agent to know about the tool capabilities.

operation

object (OperationConfig)

Required. The API Hub operation this tool exposes. Each tool wraps exactly one operation; callers that want to expose multiple operations should declare multiple tools.

OperationConfig

API hub Operation config.

JSON representation
{

  // Union field identifier can be only one of the following:
  "operation": string,
  "httpOperation": {
    object (HttpOperationConfig)
  }
  // End of list of possible types for union field identifier.
}
Fields
Union field identifier. The operation identifier. identifier can be only one of the following:
operation

string

Full API Hub operation resource name: projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}

httpOperation

object (HttpOperationConfig)

The HTTP operation config.

HttpOperationConfig

Identifies a single API Hub operation by spec resource name + HTTP path + HTTP method.

JSON representation
{
  "spec": string,
  "path": string,
  "method": enum (Method)
}
Fields
spec

string

Required. Spec resource name: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}

path

string

Required. HTTP path of the operation within the referenced spec. Match is exact (no template substitution): the path here must appear verbatim on an APIOperationRevision belonging to the spec.

method

enum (Method)

Required. HTTP method of the operation within the referenced spec. (GET / PUT / POST / DELETE / OPTIONS / HEAD / PATCH / TRACE).