You can configure most AI applications to use remote MCP servers. This guide provides general information on MCP configuration as well as detailed configuration instructions for several common MCP AI applications.
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.
-
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.
- Install the Google Cloud CLI beta component:
gcloud components install beta
Required roles
To get the permissions that you need to enable and use Google and Google Cloud remote MCP servers, ask your administrator to grant you the following IAM roles:
-
Enable MCP servers:
Service Usage Admin (
roles/serviceusage.serviceUsageAdmin) on the Google Cloud project -
Make MCP tool calls to Google and Google Cloud MCP tools:
MCP Tool User (
roles/mcp.toolUser) on the Google Cloud project
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to enable and use Google and Google Cloud remote MCP servers. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to enable and use Google and Google Cloud remote MCP servers:
-
Enable MCP servers:
-
serviceusage.mcppolicy.get -
serviceusage.mcppolicy.update
-
-
Make MCP tool calls to Google and Google Cloud MCP tools:
-
mcp.tools.call -
resourcemanager.projects.get -
resourcemanager.projects.list
-
You might also be able to get these permissions with custom roles or other predefined roles.
Enable the Google or Google Cloud remote MCP server in your Google Cloud project
To enable a Google or Google Cloud remote MCP server in your Google Cloud project, you need to know the service name.
Get the service name
To view a list of all available Google and Google Cloud remote MCP servers and their service names, see Supported products.
Enable the remote MCP server
Run the following command to enable the remote MCP server
gcloud beta services mcp enable SERVICE \
--project=PROJECT_ID
Replace the following:
PROJECT_ID: your Google Cloud project ID.SERVICE: the service name.
The MCP server is enabled for use in your Google Cloud project. If the service isn't enabled in your project, then you are prompted to enable the service before enabling the MCP server.
As a security best practice, only enable MCP servers for the services that are required for your agentic functionality.
Configure an MCP client to use the remote MCP server
AI applications and agents, such as Claude or Gemini CLI, can instantiate an MCP client that connects to a single MCP server. An AI application can have multiple clients that connect to different MCP servers. To connect to a remote MCP server, the MCP client must know at a minimum the URL of the remote MCP server.
In your AI application, look for a way to connect to a remote MCP server. You are prompted to enter details about the server, such as its name and URL.
For the Google Cloud MCP servers MCP server, enter the following as required:
- Server name: the name of the remote MCP server—for example, BigQuery.
- Server URL or Endpoint: the service's MCP endpoint—for example,
bigquery.googleapis.com/mcp. - Transport: HTTP
- Authentication details: Depending on how you want to authenticate, you can enter your Google Cloud credentials, your OAuth Client ID and secret, or an agent identity and credentials. For more information on authentication, see Authenticate to MCP servers.
For more detailed, AI application specific instructions, consult the following section.
Gemini CLI
To add a Google or Google Cloud remote MCP server to your Gemini CLI, configure it as an extension.
Create an extension file in the following location:
~/.gemini/extensions/EXT_NAME/gemini-extension.jsonwhere~/is your home directory and EXT_NAME is the name you want to give the extension.Save the following content in your extension file:
{ "name": "EXT_NAME", "version": "1.0.0", "mcpServers": { "MCP_SERVER_NAME": { "httpUrl": "MCP_ENDPOINT", "authProviderType": "google_credentials", "oauth": { "scopes": ["https://www.googleapis.com/auth/cloud-platform"] }, "timeout": 30000, "headers": { "x-goog-user-project": "PROJECT_ID" } } } }Replace the following:
EXT_NAME: the name of the extension. You'll need to use this name if you want to specify which extensions to load when you use Gemini CLI. If you don't specify which extensions you want to use when you start Gemini CLI, then all extensions are loaded.MCP_SERVER_NAME: the human-readable name for the MCP server.MCP_ENDPOINT: the remote MCP endpoint—for example,bigquery.googleapis.com/mcp.PROJECT_ID: the Google Cloud project where you have enabled the MCP server.
Save the extensions file.
Start Gemini CLI:
geminiRun
/mcpto view your configured MCP server and its tools.The response is similar to the following:
Configured MCP servers: 🟢 BigQuery (from bigquery-mcp) - Ready (5 tools) Tools: - execute_sql - get_dataset_info - get_table_info - list_dataset_ids - list_table_ids
The remote MCP server is ready to use in Gemini CLI.
Claude.ai
You must have the Claude Enterprise, Pro, Max, or Team plan to configure Google and Google Cloud MCP servers in Claude.ai. For pricing information, see Claude Pricing.
To add a Google or Google Cloud remote MCP server to Claude.ai, configure a custom connector with a OAuth client ID and OAuth client secret:
Create an Oauth 2.0 Client ID and secret
In the Google Cloud console, go to Google Auth Platform > Clients > Create client.
You are prompted to create a project if you don't have one selected.
In the Application type list, select Web application.
In the Name field, enter a name for your application.
In the Authorized redirect URIs section, click + Add URI, and then add
https://claude.ai/api/mcp/auth_callbackin the URIs field.Click Create.
Copy the Client ID. The Client ID is required for the next section.
Create a custom connector in Claude.ai
Follow the instructions for the Claude plan that you're using:
Enterprise and Team
- In Claude.ai, navigate to Admin settings > Connectors.
- Click Add custom connector.
- In the Add custom connector dialog, enter the following:
- Server name: a human readable name for the server.
- Remote MCP server URL: the MCP endpoint for the Google or Google Cloud MCP server. For a list of available servers and their endpoints, see Supported products.
- Expand the Advanced settings menu and then enter the following:
- OAuth client ID: the OAuth 2.0 client ID you created.
- OAuth client secret: the secret for your OAuth 2.0 client. To retrieve the secret, go to Google Auth Platform > Clients and then select the OAuth client ID you created. In the Client secrets section, click to copy the Client secret.
Click Add.
The custom connector is created.
Open the Tools menu and enable the connector.
Claude.ai can use the MCP server.
Pro and Max
- In Claude.ai, navigate to Settings > Connectors.
- Click Add custom connector.
- In the Add custom connector dialog, enter the following:
- Server name: a human readable name for the server.
- Remote MCP server URL: the MCP endpoint for the Google or Google Cloud MCP server. For a list of available servers and their endpoints, see Supported products.
- Expand the Advanced settings menu and then enter the following:
- OAuth client ID: the OAuth 2.0 client ID you created.
- OAuth client secret: the secret for your OAuth 2.0 client. To retrieve the secret, go to Google Auth Platform > Clients and then select the OAuth client ID you created. In the Client secrets section, click to copy the Client secret.
Click Add.
The custom connector is created.
Open the Tools menu and enable the connector.
Claude.ai can use the MCP server.
What's next
- Learn about AI security and safety.
- Explore different methods to authenticate to Google and Google Cloud remote MCP servers.