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
- A portal with at least one access group
- An account with Google Cloud Functions for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Service Account JSON Key | Custom credentials | serviceAccountJson |
| Google OAuth (default) | OAuth | Signs 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:
| Scope | Name | What it allows |
|---|---|---|
https://www.googleapis.com/auth/cloud-platform | Cloud Platform | Full access to all Google Cloud resources including Cloud Functions |
https://www.googleapis.com/auth/cloud-platform.read-only | Cloud Platform Read-Only | Read-only access to Google Cloud resources |
https://www.googleapis.com/auth/userinfo.profile | User Profile | View your basic profile information |
https://www.googleapis.com/auth/userinfo.email | User Email | View 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 IDregion(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:
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
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.
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 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. NeedsfunctionName.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. NeedsfunctionName.get_operation: Check the status of a long-running operation such as function creation, update, or deletion. NeedsoperationName.
Write tools (4)
update_function: Update an existing Cloud Function's configuration. NeedsfunctionName.generate_upload_url: Generate a signed URL for uploading function source code to Cloud Storage.create_function: Create and deploy a new Cloud Function. NeedsfunctionId,runtimeandentryPoint.manage_iam_policy: Get or set the IAM policy for a Cloud Function. NeedsactionandfunctionName.
Destructive tools (1)
delete_function: Permanently delete a Cloud Function. NeedsfunctionName.
Triggers
Google Cloud Functions has 2 triggers, which fire on events in Google Cloud Functions:
inbound_webhookfunction_changes: Detects changes to Cloud Functions in a project, including new functions, updates, deletions, and state changes.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Google Cloud Functions there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Google Workspace guide: the consent screen and the OAuth client in Google Cloud
- Google Cloud Functions on metorial.com: the integration overview