Skip to main content
Use Firebase through Corsair: one client, typed API calls. Connect with a service account’s JSON key (Firebase console > Project settings > Service accounts > Generate new private key), stored whole as the key. The plugin signs a JWT with it and trades it at oauth2.googleapis.com for an access token (scopes cloud-platform, firebase, firebase.database, firebase.messaging, userinfo.email), cached until a minute before it expires. A ready OAuth access token works too. Give the service account the roles the calls need (Firebase Admin covers most).
  • Resource names. Google’s APIs address everything by its full name: projects/<project>/databases/(default)/documents/users/ada, projects/<project>/sites/<site>, projects/<project>/apps/<app>. Pass them whole in name or parent; slashes are kept.
  • Groups. firestore.* (documents, queries, transactions, indexes, databases, backups), auth.* (Identity Toolkit v1: users and sign-in) and authAdmin.* (v2: project config, tenants, providers), database.* (the Realtime Database’s data and rules, by databaseUrl) and databaseInstances.*, storage.* (Cloud Storage objects and buckets; storage.objects.insert with file uploads, storage.objects.download returns the bytes) and storageBuckets.*, hosting.*, remoteConfig.*, messaging.* (FCM v1), appDistribution.*, rules.*, appCheck.* and management.* (projects and apps).
  • Lists page with pageSize and pageToken; pass the response’s nextPageToken for the next page. Cloud Storage lists (storage.*) take maxResults instead of pageSize.
  • Client sign-in calls (auth.accounts.*, auth.getPublicKeys and the other top-level auth.get* reads) take the project’s Web API key as apiKey (Project settings > General).
  • Remote Config. The get operations return the template’s etag; pass it as ifMatch when you publish, so a change someone published in between is refused instead of overwritten.
  • Emulators. emulatorUrls in the plugin options points groups at the Firebase Local Emulator Suite (calls then send Bearer owner).
  • Risk. Reads (GETs and the POSTs that only read, such as runQuery and accounts.lookup) are read. Deletes, sends (FCM messages, email and SMS codes including MFA starts, tester invitations), bulk document deletes, bucket retention locks, imports, restores and rollbacks, publishing Remote Config, rules and Hosting releases, writing a whole Realtime Database path (database.set) or its rules, adding Firebase or Analytics to a project and minting credentials are destructive; other writes are write.
  • Not wrapped: Firestore’s streaming Listen and Write RPCs, Cloud Storage push channels, and the rest of Cloud Storage (ACLs, HMAC keys, caches, folders, notifications), Data Connect, App Hosting, Crashlytics and ML.
What you get:
  • 405 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

Get a Firestore document
Write to the Realtime Database
See the full list on the API page.

What’s next

API reference

Every firebase.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.