Firebase MCP server for AI agents

Live

OAUTH 2.0

APP DATA

Developer Tools

Firebase gives your agent access to your Firebase projects: query Cloud Firestore documents, aggregate counts and sums, and look up, create, update, and delete Firebase Auth users.

  • Per-user credentials: each call uses the actual user's token, never a shared bot.
  • Encrypted per-tenant vault: AES-256, resolved at request time, never in LLM context.
  • Scoped before every call: pre-call scope check, 90-day SIEM-exportable audit chain.
Firebase
agent · Acme Q3
Run
How many orders were placed in the last 7 days?
S
firebase_firestore_aggregation_query_run
352ms
App data agent
Counted 312 documents in the orders collection created in the last 7 days.
Sources: Cloud Firestore, orders collection
firebase
312 orders
18:29
Message Claude...

Tools your app data agent reaches for on Firebase, scoped per user.

CALL ANY TOOL
17 tools for app data in Firebase: query and read Cloud Firestore documents, write and delete them, and manage Firebase Auth users.
firebase_auth_email_action_link_generate
Generate auth email action link
Generate a password reset, email verification or email sign-in link for a Firebase Auth user, for you to send yourself. Returns the email and oobLink with the action link. This tool does not have Firebase email a verification link: that needs the user's ID token, which this tool does not take. Use this to help a user reset a password, verify an email address or sign in by email link. Use firebase_auth_user_update to set a password directly.
Parameters
Name
Type
Required
Description
email
string
Required
The email address of the user the link is for. Example: alice@example.com.
project_id
string
Required
The Firebase project ID (the same as its Google Cloud project ID). Find it in the Firebase console under Project settings > General. Example: my-app-12345.
request_type
string
Required
The kind of link: PASSWORD_RESET, VERIFY_EMAIL or EMAIL_SIGNIN. Example: PASSWORD_RESET. One of: `PASSWORD_RESET`, `VERIFY_EMAIL`, `EMAIL_SIGNIN`.
continue_url
string
Optional
The URL the user is sent to after using the link. Required for EMAIL_SIGNIN; its domain must be in the project's authorized domains. Example: https://app.example.com/finish.
return_oob_link
boolean
Optional
If true (the default), the link is returned in oobLink for you to send, and no email is sent. Keep it true for VERIFY_EMAIL: Firebase emails a verification link only when given the user's ID token, which this tool does not send. Example: true. Default: `true`.
tenant_id
string
Optional
The Identity Platform tenant ID the user belongs to. Only set this when the project uses multi-tenancy; leave it empty for a standard Firebase Auth project. Example: tenant-a1b2c.
firebase_auth_user_create
Create auth user
firebase_auth_user_delete
Delete auth user
firebase_auth_user_lookup
Auth user lookup
firebase_auth_user_update
Update auth user
firebase_auth_users_list
List auth users
firebase_auth_users_query
Query auth users
firebase_firestore_aggregation_query_run
Run firestore aggregation query
firebase_firestore_collection_ids_list
List firestore collection ids
firebase_firestore_databases_list
List firestore databases
firebase_firestore_document_create
Create firestore document
firebase_firestore_document_delete
Delete firestore document
firebase_firestore_document_get
Get firestore document
firebase_firestore_document_update
Update firestore document
firebase_firestore_documents_batch_get
Get firestore documents batch
firebase_firestore_documents_list
List firestore documents
firebase_firestore_query_run
Run firestore query
Build your Agent
Same auth pattern across LangChain, OpenAI, Anthropic, and Google ADK.
Python · LlamaIndex
import { ScalekitClient } from "@scalekit-sdk/node";
import { createReactAgent } from "@langchain/langgraph/prebuilt";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

// Firebase tools scoped to this user
const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["firebase"], toolNames: [
    "firebase_firestore_collection_ids_list",
    "firebase_firestore_query_run",
    "firebase_auth_user_lookup"] },
  pageSize: 100,
});

const agent = createReactAgent({ llm, tools });
await agent.invoke({ messages: [{ role: "user", content: "List my Firestore collections, query the orders collection for orders over 100 dollars, and look up the Auth user who placed the largest one" }] });
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const openai = new OpenAI();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["firebase"] }, pageSize: 100,
});

const res = await openai.chat.completions.create({
  model: "gpt-5",
  messages: [{ role: "user", content: "List my Firestore collections, query the orders collection for orders over 100 dollars, and look up the Auth user who placed the largest one" }],
  tools,
});

// Execute the tool call with the user's vaulted Firebase OAuth token
await sk.tools.executeTool(res.choices[0].message.tool_calls[0], "user_123");
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);
const anthropic = new Anthropic();

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["firebase"] }, pageSize: 100,
});

const msg = await anthropic.messages.create({
  model: "claude-sonnet-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "List my Firestore collections, query the orders collection for orders over 100 dollars, and look up the Auth user who placed the largest one" }],
  tools,
});

// Tool call runs with the user's vaulted Firebase OAuth token
await sk.tools.executeTool(msg.content, "user_123");
import { Agent } from "@google/adk/agents";
import { ScalekitClient } from "@scalekit-sdk/node";

const sk = new ScalekitClient(env.SCALEKIT_ENV_URL, env.SCALEKIT_CLIENT_ID, env.SCALEKIT_CLIENT_SECRET);

const { tools } = await sk.tools.listScopedTools("user_123", {
  filter: { connectionNames: ["firebase"] }, pageSize: 100,
});

const agent = new Agent({
  name: "app_data_agent",
  model: "gemini-2.5-pro",
  instruction: "Firebase tools scoped to this user",
  tools,
});

await agent.run("List my Firestore collections, query the orders collection for orders over 100 dollars, and look up the Auth user who placed the largest one");
Try these prompts
Copy any prompt into your agent. Each maps directly to a Firebase tool. Click to copy, paste into your agent, done.
Firestore documents
Copy the prompt
Copied
List the collections in my Firestore database.
Copy the prompt
Copied
Get the document at this path.
Copy the prompt
Copied
Run a query for orders over 100 dollars.
Aggregations
Copy the prompt
Copied
Count the documents in this collection that match a filter.
Copy the prompt
Copied
Average the total field across this month's orders.
Copy the prompt
Copied
List the Firestore databases in this project.
Auth users
Copy the prompt
Copied
Look up this user by email.
Copy the prompt
Copied
List the users in this project.
Copy the prompt
Copied
Generate a password reset link for this user.
SEE HOW AUTH WORKS
Each user signs in to Firebase once, and Scalekit stores and refreshes their tokens. Credentials stay vaulted, every call is scope checked, and every action is logged.
1
Authorize
Your user connects
Firebase
once. We tie it to their identity and the access they approved, with no shared bot account and no org-wide access
Who:
user ‘A’
when:
Once per user
access:
Limited to user
2
Store
Their
Firebase
credential lives in a vault scoped to them. User A's data is never reachable by an agent acting for user B, even on the same connection
vault:
encrypted
scope:
per-user
tenants:
isolated
3
Resolve
When your agent calls a
Firebase
tool, we fetch the right credential server-side. It never touches your agent, never appears in the LLM context, never shows up in your logs
speed:
~40ms
check:
before every call
seen by:
nobody
4
Audit
Every
Firebase
tool call is logged: who triggered it, which tool ran, what came back. 90 days of history, tied to the user who authorized it
history:
90 days
export:
SIEM-ready
logged:
every call
Test other agents
See the same per-user auth pattern across other database and developer connectors.
GTM and RevOps Teams
CRM AI agent
Reads the Granola transcript after every call, extracts next steps and updates the HubSpot record, drafts the follow-up in Gmail, and confirms in Slack, all on the rep's own delegated OAuth.
Support and Ops Teams
Support ticket automation agent
Fetches new Zendesk tickets, drafts a reply from Notion knowledge base articles, digests what it cannot answer to Slack, and archives the rest, acting as the support agent rather than a shared API key.
Test other agents
See the same per-user auth pattern across other database and developer connectors.
GTM
CRM AI agent
Turn each Granola call transcript into a HubSpot record update, a drafted Gmail follow-up, and a Slack recap.
SUPPORT
Support ticket automation (Google ADK)
Fetch, annotate, and archive Zendesk tickets with Notion context, digesting anything it cannot answer to Slack.
Why Scalekit
Secure your agent's access. Connectors ship in minutes
01.
Shared tokens break per-user analytics
A shared Firebase token looks fine in a demo. In production every Firestore write and user change looks like one service account, and you cannot tell which user triggered it. Scalekit resolves the credential of the actual user who triggered the agent, never a shared bot.
// shared token
audit → bot_service_account

// scalekit
audit → user_abc ✓
02.
Authentication is not authorization
03.
Multi-tenancy is architectural
04.
Firebase today. Ten connectors tomorrow.
“Our agents act across Salesforce, Gong, Google Drive, and more, on behalf of every customer. Scalekit behind the scenes meant we can keep adding tools without ever rebuilding how credentials or tool calling work.”
Venu Madhav Kattagoni
Head of Engineering / Von
FAQs
Frequently Asked Questions
Does the agent access Firebase as the user or through a shared service account?
As the user. Each user signs in to Firebase once, and Scalekit stores and refreshes their tokens. Every Firestore write and user change in your audit trail is attributed to that user, not a shared service account.
Where is the Firebase OAuth token stored?
In Scalekit's managed AES-256 token vault, namespaced per tenant. Refresh is automatic. Revocation is a single dashboard action. Credentials never appear in prompts, logs, or LLM context.
Can I limit what the agent does in Firebase?
Yes. Filter by tool name in listScopedTools to expose only what you want, for example the Firestore read tools without firebase_firestore_document_delete and firebase_auth_user_delete, which remove a document or an Auth user. Scalekit also enforces scope checks before every API call.
What happens when a user revokes Firebase access?
The connection is invalidated on the next tool call. Subsequent requests for that user fail closed with a clear error. Other users in the tenant remain unaffected. The event is logged for audit.
Which Firebase products does the connector cover?
Cloud Firestore and Firebase Auth. It reads and writes Firestore documents and manages Auth users, and firebase_auth_email_action_link_generate creates password reset, email verification, and email sign-in links.
Start in your coding agent
Up and running in one command
Install the Scalekit skill in your editor of choice. Connector, auth, tools, prompt, all wired up
Claude Code REPL
/plugin marketplace add scalekit-inc/claude-code-authstack
/plugin install agentkit@scalekit-auth-stack
Cursor Code REPL
# ~/.cursor/mcp.json
{
""mcpServers"": {
""firebase"": {
""url"": ""https://mcp.scalekit.com/firebase"",
""headers"": { ""Authorization"": ""Bearer $SCALEKIT_TOKEN"" }
}
}
}
Codex Code REPL
# ~/.codex/config.toml
[mcp_servers.firebase]
url = ""https://mcp.scalekit.com/firebase""
auth_env = ""SCALEKIT_TOKEN""
Copilot Code REPL
# .vscode/mcp.json
{
""servers"": {
""firebase"": {
""url"": ""https://mcp.scalekit.com/firebase"",
""type"": ""http""
}
}
}