Cloud API Registry lets you discover, govern, use, and monitor Model Context Protocol (MCP) servers and tools for your AI applications and agents.
An MCP server is an endpoint that exposes functionalities known as MCP tools. An MCP tool is a specific function or capability provided by an MCP server that an AI agent or application can invoke. Each tool has defined schemas for its inputs and outputs. For more information, see the Cloud API Registry overview.
This document shows you how to discover and list MCP servers and tools using the Google Cloud CLI or by sending a request to the Cloud API Registry API.
Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init -
Create or select a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Create a Google Cloud project:
gcloud projects create PROJECT_ID
Replace
PROJECT_IDwith a name for the Google Cloud project you are creating. -
Select the Google Cloud project that you created:
gcloud config set project PROJECT_ID
Replace
PROJECT_IDwith your Google Cloud project name.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Apigee API hub and Cloud API Registry APIs:
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.gcloud services enable apihub.googleapis.com
cloudapiregistry.googleapis.com -
Install the Google Cloud CLI.
-
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
-
To initialize the gcloud CLI, run the following command:
gcloud init -
Create or select a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Create a Google Cloud project:
gcloud projects create PROJECT_ID
Replace
PROJECT_IDwith a name for the Google Cloud project you are creating. -
Select the Google Cloud project that you created:
gcloud config set project PROJECT_ID
Replace
PROJECT_IDwith your Google Cloud project name.
-
If you're using an existing project for this guide, verify that you have the permissions required to complete this guide. If you created a new project, then you already have the required permissions.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Apigee API hub and Cloud API Registry APIs:
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.gcloud services enable apihub.googleapis.com
cloudapiregistry.googleapis.com - The commands in this document default to the current project. For example,
gcloud beta api-registry mcp servers listreturns a list of enabled MCP servers for the current project.You can retrieve the current project ID:
gcloud config list --format='text(core.project)'
You can set the current project ID:
gcloud config set project PROJECT_ID
Required roles
To get the permissions that you need to discover and list MCP tools, ask your administrator to grant you the following IAM roles on your project:
- Cloud API Registry Admin (
roles/cloudapiregistry.admin) - Cloud API hub Viewer (
roles/apihub.viewer)
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.
List MCP servers
You can list MCP servers or use filters to retrieve a specific server.
gcloud
List MCP servers that are enabled or available for your project by using
the
gcloud beta api-registry mcp servers list
command.
To list all enabled MCP servers, run the following command:
gcloud beta api-registry mcp servers listA list of enabled MCP servers for the current project is returned.
To list all available MCP servers, run the following command:
gcloud beta api-registry mcp servers list --allA list of available MCP servers—both enabled and not enabled—for the current project is returned.
To filter the list of servers, use the
--filterflag. For more details and examples of filter expressions, seegcloud topic filters.For example, if you are searching for a specific endpoint, you can filter on the
urlsfield:gcloud beta api-registry mcp servers list \ --filter='urls="https://servicemanagement.googleapis.com/mcp"'
After successfully running the gcloud CLI command, the output
contains one or more instances of
McpServer
similar to the following:
[ { "name": "projects/PROJECT_ID/locations/LOCATION/mcpServers/SERVER_ID", "displayName": "Example Pet Store API", "description": "MCP endpoint for Example Pet Store API.", "urls": ["https://example-pet-store.com/catalog/v1"], "state": "ENABLED", }, { "name": "projects/PROJECT_ID/locations/LOCATION/mcpServers/SERVER_ID", "displayName": "Google Cloud BigQuery", "description": "MCP endpoint for BigQuery API.", "urls": ["https://bigquery.googleapis.com/mcp"], "state": "DISABLED", }, { ... } ]
REST
List MCP servers in a given project and location by using the
projects.locations.mcpServers.list
method.
Alternatively, to retrieve the details of a specific MCP server, use the
projects.locations.mcpServers.get
method.
Before using any of the request data, make the following replacements:
PROJECT_ID: your Google Cloud project ID.LOCATION: the location in which the servers are deployed—for example,global.
To send your request, expand one of these options:
If successful, the response body contains instances of
McpServer
and the response should be similar to the following:
{
"mcpServers": [
{
"name": "projects/PROJECT_ID/locations/LOCATION/mcpServers/SERVER_ID",
"displayName": "Google Cloud BigQuery",
"description": "MCP endpoint for BigQuery API.",
"urls": ["https://bigquery.googleapis.com/mcp"],
"capabilities": {
"CAPABILITIES"
},
"state": "ENABLED",
},
{
object (McpServer)
}
],
"nextPageToken": string,
"unreachable": [
string
]
}
List MCP tools
You can list MCP tools or use filters to retrieve tools from a specific MCP server.
gcloud
List MCP tools that are available for your project by using
the
gcloud beta api-registry mcp tools list
command.
To list the tools across all enabled MCP servers, run the following command:
gcloud beta api-registry mcp tools listA list of MCP tools across all enabled MCP servers for the current project is returned.
To list the tools across all available MCP servers, run the following command:
gcloud beta api-registry mcp tools list --allA list of MCP tools across all available MCP servers—both enabled and not enabled—for the current project is returned.
To filter the list of tools, use the
--filterflag. For more details and examples of filter expressions, seegcloud topic filters.For example, if you are searching for tools from a specific MCP server endpoint, you can filter on the
mcpServerUrlsfield:gcloud beta api-registry mcp tools list --all \ --filter='mcpServerUrls="https://servicemanagement.googleapis.com/mcp"'
After successfully running the gcloud CLI command, the output
contains one or more instances of
McpTool
similar to the following:
[ { "name": "projects/PROJECT_ID/locations/LOCATION/mcpServers/SERVER_ID/mcpTools/TOOL_ID", "displayName": "Get pet details", "description": "Retrieves detailed information about a pet.", "mcpServerUrls": ["https://example-pet-store.com/catalog/v1"], "inputSchema": { "INPUT_SCHEMA" }, "outputSchema": { "OUTPUT_SCHEMA" }, "annotations": { "ANNOTATION" } }, { ... } ]
REST
List MCP tools for an MCP server in a given project and location, by using
the
projects.locations.mcpServers.mcpTools.list
method.
Alternatively, to retrieve the details of a specific MCP tool, use the
projects.locations.mcpServers.mcpTools.get
method.
Before using any of the request data, make the following replacements:
PROJECT_ID: your Google Cloud project ID.LOCATION: the location in which the MCP server is deployed—for example,global.MCP_SERVER: the MCP server ID.
To send your request, expand one of these options:
If successful, the response body contains instances of
McpTool
and the response should be similar to the following:
{
"mcpTools": [
{
"name": "projects/PROJECT_ID/locations/LOCATION/mcpServers/SERVER_ID/mcpTools/TOOL_ID",
"displayName": "Get pet details",
"description": "Retrieves detailed information about a pet.",
"mcpServerUrls": ["https://example-pet-store.com/catalog/v1"],
"inputSchema": {
"INPUT_SCHEMA"
},
"outputSchema": {
"OUTPUT_SCHEMA"
},
"annotations": {
"ANNOTATION"
}
},
{
object (McpTool)
}
],
"nextPageToken": string,
"unreachable": [
string
]
}
What's next
- Before using an MCP tool, you must enable the corresponding MCP server. Learn how to enable and disable MCP servers.