MetorialDocs

Set up Google Cloud Functions in Metorial for AI agents

Share Google Cloud Functions with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or service account JSON key sign-in, 10 tools (5 read-only).

To give your team Google Cloud Functions in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Google Cloud Functions integration in a Metorial portal, and each person signs in to Google Cloud Functions with their own account. Agents can manage serverless cloud functions on Google Cloud. The integration has 10 tools, 5 read-only, 4 write and 1 destructive, plus 2 triggers.

What you'll learn

  • How an admin shares Google Cloud Functions in a portal and how each person connects
  • The 4 OAuth scopes Google Cloud Functions can request, and what each one allows
  • How to keep the 5 read-only tools and reject the other 5

Before you start

Sign-in methods

MethodTypeWhat a person provides
Service Account JSON KeyCustom credentialsserviceAccountJson
Google OAuth (default)OAuthSigns in to Google Cloud Functions

The portal and metorial setup use Google OAuth unless someone picks another method.

Service Account JSON Key

To connect, a person enters:

  • serviceAccountJson: The full JSON key file content for the Google Cloud service account

Google OAuth

People sign in to Google Cloud Functions and approve the scopes you allow. The integration can request:

ScopeNameWhat it allows
https://www.googleapis.com/auth/cloud-platformCloud PlatformFull access to all Google Cloud resources including Cloud Functions
https://www.googleapis.com/auth/cloud-platform.read-onlyCloud Platform Read-OnlyRead-only access to Google Cloud resources
https://www.googleapis.com/auth/userinfo.profileUser ProfileView your basic profile information
https://www.googleapis.com/auth/userinfo.emailUser EmailView your email address

The read-only tools need only https://www.googleapis.com/auth/cloud-platform.read-only. Allow just that scope in the Scopes picker when you create your own auth credentials, and the connection cannot change anything.

Setup settings

Whichever method you pick, setup also asks for:

  • projectId: Google Cloud Project ID
  • region (optional): Default region/location for Cloud Functions (e.g. us-central1, europe-west1)

Use your own Google Cloud Functions OAuth app

With your own OAuth app, people see your company's name on the Google Cloud Functions consent screen, and the client ID and secret belong to you.

Start the credentials in Metorial

In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Google Cloud Functions and copy the Redirect URI.

Register the app

In the Google Cloud console, enable the API behind Google Cloud Functions under APIs & Services, Library. Then go to Google Auth platform, Clients, click Create Client, choose Web application, and paste the redirect URI from Metorial under Authorized redirect URIs. Google shows the client secret only when you create the client.

The Google Workspace guide covers the consent screen and the OAuth client in Google Cloud step by step.

Finish in Metorial

Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Google Cloud Functions integration.

Admin: share Google Cloud Functions in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Google Cloud Functions. Under Auth Method, keep Google OAuth or pick another. For how members connect, choose Each person connects, so everyone signs in to Google Cloud Functions as themselves.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Google Cloud Functions.

Choose who gets it

Add the access groups that should see Google Cloud Functions. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Google Cloud Functions integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search "google cloud functions"

Employee: connect Google Cloud Functions

In the portal

Open Google Cloud Functions in the catalog

Sign in to your portal and open Google Cloud Functions. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. A Google Cloud Functions sign-in tab opens. Sign in and approve the permissions listed.

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search "google cloud functions"
metorial setup <catalog-item-id>

catalog search prints the catalog item ID. metorial setup uses Google OAuth. To connect with Service Account JSON Key instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.

Add it to your AI client

metorial install adds your Google Cloud Functions connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list "google cloud functions"
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 5 read-only tools, such as get_function and get_operation, and lose the 4 write tools, such as create_function or update_function, and the destructive tool delete_function.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list "google cloud functions"
metorial tools <integration-id>
metorial call <integration-id> list_runtimes -d '{}'

metorial tools lists the 10 tools, minus any you rejected. list_runtimes takes no input. It lists available runtime environments for Cloud Functions, including their lifecycle status (supported, deprecated, decommissioned).

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (5)

  • get_function: Retrieve full details of a specific Cloud Function including its build configuration, service configuration, event trigger settings, state, and deployment URL. Needs functionName.
  • list_functions: List Cloud Functions in a Google Cloud project.
  • list_runtimes: List available runtime environments for Cloud Functions, including their lifecycle status (supported, deprecated, decommissioned).
  • generate_download_url: Generate a signed URL for downloading the source code of a deployed Cloud Function. Needs functionName.
  • get_operation: Check the status of a long-running operation such as function creation, update, or deletion. Needs operationName.

Write tools (4)

  • update_function: Update an existing Cloud Function's configuration. Needs functionName.
  • generate_upload_url: Generate a signed URL for uploading function source code to Cloud Storage.
  • create_function: Create and deploy a new Cloud Function. Needs functionId, runtime and entryPoint.
  • manage_iam_policy: Get or set the IAM policy for a Cloud Function. Needs action and functionName.

Destructive tools (1)

  • delete_function: Permanently delete a Cloud Function. Needs functionName.

Triggers

Google Cloud Functions has 2 triggers, which fire on events in Google Cloud Functions:

  • inbound_webhook
  • function_changes: Detects changes to Cloud Functions in a project, including new functions, updates, deletions, and state changes.

Next steps