> Documentation index: https://metorial.com/llms.txt. Every page is available as Markdown by adding .md to its URL.

# Set up Google Cloud Functions in Metorial for AI agents
URL: https://metorial.com/docs/integrations/google-cloud-functions
Last updated: 2026-11-24

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 will 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](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Google Cloud Functions for each person who connects
- For the CLI steps: the [Metorial CLI](https://metorial.com/docs/platform/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 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.

1. **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**.

2. **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](https://metorial.com/docs/platform/integrations/google-workspace) covers the consent screen and the OAuth client in Google Cloud step by step.

3. **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

1. **Open Shared Resources**

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

2. **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.

3. **Limit the tools**

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

4. **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:

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

## Employee: connect Google Cloud Functions

### In the portal

1. **Open Google Cloud Functions in the catalog**

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

2. **Authenticate**

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

3. **Confirm**

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

### With the CLI

```bash
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.

```bash
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](https://metorial.com/docs/platform/guides/tool-permissions).

## Check it worked

```bash
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

- [Claude Code](https://metorial.com/docs/platform/clients/claude-code), [Cursor](https://metorial.com/docs/platform/clients/cursor), [Codex](https://metorial.com/docs/platform/clients/codex) and [ChatGPT](https://metorial.com/docs/platform/clients/chatgpt): connect each client to your portal and use Google Cloud Functions there
- [Create custom OAuth credentials](https://metorial.com/docs/platform/integrations/create-custom-oauth-credentials): the Provider Auth screens in more detail
- [Tool permissions](https://metorial.com/docs/platform/guides/tool-permissions): tool filters and what employees see
- [Google Workspace guide](https://metorial.com/docs/platform/integrations/google-workspace): the consent screen and the OAuth client in Google Cloud
- [Google Cloud Functions on metorial.com](https://metorial.com/integrations/google-cloud-functions): the integration overview