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

# Set up Firebase in Metorial for Claude, ChatGPT and Cursor
URL: https://metorial.com/docs/integrations/google-firebase
Last updated: 2026-11-24

Share Firebase with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or service account key sign-in, 12 tools (5 read-only).

---

To give your team Firebase in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Firebase integration in a Metorial portal, and each person signs in to Firebase with their own account. Agents can manage backend services for mobile and web applications. The integration has 12 tools, 5 read-only, 2 write and 5 destructive, plus 4 triggers.

**What you will learn**

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

**Before you start**

- A [portal](https://metorial.com/docs/platform/workforce/portals) with at least one access group
- An account with Firebase 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 |
| --- | --- | --- |
| **Google OAuth** (default) | OAuth | Signs in to Firebase |
| **Service Account Key** | Custom credentials | `serviceAccountJson` |

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

### Google OAuth

People sign in to Firebase 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 Google Cloud Platform resources including Firestore, Cloud Messaging, Cloud Storage, Cloud Functions, and Remote Config |
| `https://www.googleapis.com/auth/firebase.database` | Realtime Database | Read and write access to Firebase Realtime Database |
| `https://www.googleapis.com/auth/userinfo.email` | User Email | View your email address (required for Realtime Database authentication) |
| `https://www.googleapis.com/auth/userinfo.profile` | User Profile | View your basic profile information |

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

### Service Account Key

To connect, a person enters:

- `serviceAccountJson`: Full JSON content of the Firebase service account key file

### Setup settings

Whichever method you pick, setup also asks for:

- `projectId`: Firebase project ID (found in Firebase Console > Project Settings)
- `databaseUrl` (optional): Realtime Database URL, e.g. https://&lt;DATABASE_NAME>.firebaseio.com. Required for Realtime Database operations.
- `storageBucket` (optional): Default Firebase Storage bucket name. If omitted, storage tools use &lt;projectId>.appspot.com.
- `webApiKey` (optional): Firebase Web API key. Required by the Firebase Authentication REST API for create user operations.

## Use your own Firebase OAuth app

With your own OAuth app, people see your company's name on the Firebase 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 Firebase and copy the **Redirect URI**.

2. **Register the app**

   In the Google Cloud console, enable the API behind Firebase 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 Firebase integration.

## Admin: share Firebase 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 Firebase. Under **Auth Method**, keep **Google OAuth** or pick another. For how members connect, choose **Each person connects**, so everyone signs in to Firebase as themselves.

3. **Limit the tools**

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

4. **Choose who gets it**

   Add the access groups that should see Firebase. 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 Firebase integration. Once it exists, check which groups have it:

```bash
metorial-admin portals access list <portal-id> --type provider_template --search firebase
```

## Employee: connect Firebase

### In the portal

1. **Open Firebase in the catalog**

   Sign in to your portal and open Firebase. The status reads **Available**.

2. **Authenticate**

   Under **Quick setup**, select **Authenticate**. A Firebase 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 firebase
metorial setup <catalog-item-id>
```

`catalog search` prints the catalog item ID. `metorial setup` uses **Google OAuth**. To connect with **Service Account 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 Firebase 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 firebase
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 `list_users` and `lookup_user`, and lose the 2 write tools, such as `send_fcm_message` or `manage_topic_subscriptions`, and the 5 destructive tools, such as `manage_user` or `manage_storage`.

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 firebase
metorial tools <integration-id>
metorial call <integration-id> get_firebase_apps -d '{"operation":"list"}'
```

`metorial tools` lists the 12 tools, minus any you rejected. `get_firebase_apps` needs `operation`, so replace the placeholders. It lists Firebase Android, iOS, and Web apps in a project, retrieve a specific app, or download its SDK configuration artifact.

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

## Tools

### Read-only tools (5)

- `lookup_user`: Look up a Firebase Authentication user by email address or phone number.
- `list_users`: List Firebase Authentication users with pagination support.
- `query_firestore`: Query or list documents from a Cloud Firestore collection. Needs `collectionPath`.
- `get_remote_config`: Retrieve the current Firebase Remote Config template including all parameters, conditions, and parameter groups.
- `get_firebase_apps`: List Firebase Android, iOS, and Web apps in a project, retrieve a specific app, or download its SDK configuration artifact. Needs `operation`.

### Write tools (2)

- `send_fcm_message`: Send a push notification or data message via Firebase Cloud Messaging (FCM).
- `manage_topic_subscriptions`: Subscribe or unsubscribe device tokens to/from FCM topics. Needs `operation`, `topic` and `deviceTokens`.

### Destructive tools (5)

- `manage_storage`: List, upload, get metadata, delete, or copy objects in Firebase Cloud Storage. Needs `operation`.
- `update_remote_config`: Publish an updated Firebase Remote Config template or roll back to a previous version. Needs `operation`.
- `manage_firestore_document`: Create, read, update, or delete a document in Cloud Firestore. Needs `operation` and `collectionPath`.
- `manage_realtime_data`: Read, write, push, update, or delete data at any path in the Firebase Realtime Database. Needs `operation` and `path`.
- `manage_user`: Create, update, delete, or retrieve a Firebase Authentication user. Needs `operation`.

## Triggers

Firebase has 4 triggers, which fire on events in Firebase:

- `firestore_document_changes`: Monitors a Firestore collection for new or updated documents by polling for changes.
- `user_changes`: Monitors Firebase Authentication for new user accounts and detects when users are created or removed by comparing user lists between polls.
- `inbound_webhook`
- `realtime_db_changes`: Monitors a path in the Firebase Realtime Database for data changes by polling.

## 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 Firebase 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
- [Firebase on metorial.com](https://metorial.com/integrations/google-firebase): the integration overview