To register and discover your AI agents and Model Context Protocol (MCP) servers in Agent Registry, you must enable the Agent Registry API in your Google Cloud project. Agent Registry operates at the project level, letting you discover and manage agents deployed within the specific project where the API is enabled.
This document explains how to set up Agent Registry and enable the required API.
Before you begin
To set up Agent Registry, use an existing project or create a new one.
Required roles
To get the permissions that you need to set up Agent Registry, ask your administrator to grant you the following IAM roles on your Google Cloud project:
-
Enable the Agent Registry API:
Service Usage Admin (
roles/serviceusage.serviceUsageAdmin) -
Grant roles for using the Agent Registry API:
Project IAM Admin (
roles/resourcemanager.projectIamAdmin) -
Get full access to Agent Registry API resources:
Agent Registry API Admin (
roles/agentregistry.admin)
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.
Set up your gcloud CLI environment
If you plan to use the Google Cloud CLI for Agent Registry, follow these steps:
-
In the Google Cloud console, activate Cloud Shell.
At the bottom of the Google Cloud console, a Cloud Shell session starts and displays a command-line prompt. Cloud Shell is a shell environment with the Google Cloud CLI already installed and with values already set for your current project. It can take a few seconds for the session to initialize.
Install the
alphacomponent:gcloud components install alphaMake sure that the most recent version of Google Cloud CLI is installed:
gcloud components update
Enable the Agent Registry API
Console
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
gcloud
Enable the Agent Registry API in your project:
gcloud services enable agentregistry.googleapis.com \
--project=PROJECT_ID
Replace PROJECT_ID with
the ID of your project.
After enabling the Agent Registry API, you can begin registering and discovering agents in this project.
Grant permissions
To view and manage services in Agent Registry, you must grant users the appropriate Identity and Access Management permissions.
Grant your users one or more of the following Agent Registry roles:
- Agent Registry API Viewer (
roles/agentregistry.viewer): View agents, tools, and their attributes. - Agent Registry API Editor (
roles/agentregistry.editor): Edit access to Agent Registry resources. - Agent Registry API Admin (
roles/agentregistry.admin): Perform all actions, including manually registering agents and updating metadata.
To learn how to grant IAM roles on a project, see Manage access to projects, folders, and organizations.
Change your Agent Registry project
If you want to change the project where you use Agent Registry and remove dependencies from the old project, disable the Agent Registry API in that project. You can then enable the Agent Registry API in another project. Your data isn't migrated, and you must recreate your resources in this new project.
Disable the Agent Registry API
If you no longer need Agent Registry, disable the Agent Registry API on the project:
Console
In the Google Cloud console, go to the Agent Registry API management page:
From the project picker, select the Google Cloud project where you set up Agent Registry.
Click Disable API.
In the confirmation dialog, click Disable.
gcloud
gcloud services disable agentregistry.googleapis.com \
--project=PROJECT_ID
Replace PROJECT_ID with
the ID of the project.
What's next
- Register an agent
- Discover an agent
- Manage agents
- Register MCP servers
- Manage MCP tools
- Register endpoints
- Manage and discover endpoints