Register MCP servers

Agent Registry acts as a centralized catalog by registering and managing Model Context Protocol (MCP) server endpoints and the specific tools they expose.

This document describes how to register MCP servers and how their tool specifications are managed within Agent Registry.

Automatic discovery of Google Cloud MCP servers

Official Google and Google Cloud remote MCP servers are automatically registered and ingested into Agent Registry. Available Google and Google Cloud remote MCP servers are listed in Supported products from the Google Cloud MCP servers documentation.

When you enable a supported Google Cloud API in your project, such as the Compute Engine API, the corresponding MCP server and its tools are immediately registered and made available for discovery in Agent Registry. You don't need to manually configure or upload tool specifications for these services.

Register external MCP servers

To manage and reuse tools provided by external services or custom APIs, you must explicitly register the MCP server.

When registering an MCP server manually, Agent Registry registers the endpoint. However, it doesn't automatically introspect the server to determine which tools are available. To let users discover the exact tools available on your MCP server, you must provide the tool specifications during registration by uploading a toolspec.json file.

Before you begin

Before you start, set up Agent Registry. You need the project ID to perform these tasks.

To use the gcloud CLI commands in this document, make sure you have set up your Google Cloud CLI environment.

Required roles

To get the permissions that you need to register MCP servers manually in Agent Registry, ask your administrator to grant you the Agent Registry API Editor (roles/agentregistry.editor) IAM role on the project. For more information about granting roles, see Manage access to projects, folders, and organizations.

You might also be able to get the required permissions through custom roles or other predefined roles.

Prepare your tool specification

Create a toolspec.json file that outlines the tools the server provides. This JSON file must align with the MCP specification for tool schemas, for example:

{
  "tools": [
    {
      "name": "get_customer_info",
      "description": "Retrieves customer details from the database.",
      "annotations": {
        "title": "Get Customer Info",
        "readOnlyHint": true,
        "idempotentHint": true
      }
    },
    {
      "name": "create_support_ticket",
      "description": "Creates a new support ticket in the issue tracking system.",
      "annotations": {
        "title": "Create Support Ticket",
        "destructiveHint": true,
        "idempotentHint": false,
        "openWorldHint": true
      }
    }
  ]
}

For detailed structural requirements, see JSON schemas and the REST reference.

Register the server and tools

Register the MCP server and upload the tool definition simultaneously:

Console

  1. In the Google Cloud console, go to Agent Registry:

    Go to Agent Registry

  2. From the project picker, select the Google Cloud project where you set up Agent Registry.

  3. Select the MCP servers tab.

  4. Click Add MCP server.

  5. In the MCP server details panel, enter the display name, a description, and the geographic region.

  6. In the Tool specification section, enter the MCP server endpoint URL and paste the content of your toolspec.json file. You can also click Import tools in this panel to import the MCP tools from the URL.

  7. Click Next.

    The Select MCP tools panel displays a list of tools with names and descriptions from your MCP server.

  8. Select all the MCP tools that you want to include. You can filter tools from the list by name or value.

  9. Click Save.

gcloud

Register the MCP server with the tool specification:

gcloud alpha agent-registry services create SERVER_NAME \
  --project=PROJECT_ID \
  --location=REGION \
  --display-name="DISPLAY_NAME" \
  --mcp-server-spec-type=tool-spec \
  --mcp-server-spec-content=@toolspec.json \
  --interfaces=url=SERVER_URL,protocolBinding=PROTOCOL

Replace the following:

  • SERVER_NAME: The name you want to give to your MCP server, for example, custom-mcp-server.
  • PROJECT_ID: The project ID.
  • REGION: The registry region.
  • DISPLAY_NAME: The human-readable name that you want to give to your server, for example, Custom MCP Server.
  • SERVER_URL: The endpoint URL of the MCP server, for example, https://api.example.com/mcp.
  • PROTOCOL: The protocol binding for the endpoint. Valid values are JSONRPC, HTTP_JSON, or GRPC. For MCP servers, this value is often JSONRPC.

Verify registration

List, filter, and view the details of your newly registered MCP server. To confirm that your MCP server was successfully registered, you can list the servers in your registry.