跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Firebase,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 使用 Firebase:列出项目和应用,浏览和查询 Cloud Firestore,创建和更新文档,查找和停用 Authentication 用户,读取 Remote Config,以及(默认关闭)发布 Remote Config 或发送推送通知。使用你的 Google 账户登录。
试试这样问
Firebase 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Firebase、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Firebase
让你的 AI 使用 Firebase:列出项目和应用,浏览和查询 Cloud Firestore,创建和更新文档,查找和停用 Authentication 用户,读取 Remote Config,以及(默认关闭)发布 Remote Config 或发送推送通知。使用你的 Google 账户登录。
设置
- 打开 console.cloud.google.com,选择你的 Firebase 项目所对应的 Google Cloud 项目(两者的项目 ID 相同)。在这里创建 OAuth 客户端最简单,因为 API 调用会计入客户端所在的项目,而该项目需要启用这些 API。
- 进入 APIs & Services → Library,启用你要用到的 API:Firebase Management API、Cloud Firestore API、Identity Toolkit API、Firebase Remote Config API 和 Firebase Cloud Messaging API。
- 打开 APIs & Services → OAuth consent screen。如果你使用 Google Workspace,选择 Internal(最简单),否则选择 External。选择 External 时,请把发布状态设为 In production:应用处于 Testing 状态时,Google 会在 7 天后撤销它的刷新令牌,连接器每周都会停止工作。
- 打开 APIs & Services → Credentials → Create credentials → OAuth client ID,应用类型选择 Web application,并添加已授权的重定向 URI
https://cloud.anythingmcp.com/api/mcp-oauth/callback。如果你自行托管 AnythingMCP,请改填https://your-anythingmcp-host/api/mcp-oauth/callback。 - 把客户端 ID 填入
GOOGLE_CLIENT_ID,把客户端密钥填入GOOGLE_CLIENT_SECRET,安装连接器,然后点击 Authorize with Provider,用 Firebase 项目成员的账户登录。
一个 Google 客户端服务所有 Google 连接器:同一个 Cloud 项目和 OAuth 客户端可以服务所有 Google 连接器,从 Gmail 和 Google Sheets 到 Search Console 和 BigQuery。在该项目中启用每个 API,复用同一个客户端 ID 和密钥,并为每个连接器各授权一次。
Scope 和角色:连接器请求 https://www.googleapis.com/auth/cloud-platform,因为范围更窄的 Firebase scope 不涵盖用户管理和 Remote Config。AI 能做什么受该账户在项目中的角色限制:只读使用时,给它 Firebase Viewer 和 Cloud Datastore Viewer;修改则需要 Cloud Datastore User、Firebase Authentication Admin、Firebase Remote Config Admin 和 Firebase Cloud Messaging Admin 等角色。
它能做什么:列出项目及其 Android、iOS 和 Web 应用;浏览 Firestore 集合和文档,并用过滤条件、排序和数量限制进行查询;创建和更新文档;查找和列出 Authentication 用户,停用或重新启用他们的登录;读取 Remote Config 模板及其版本历史。
修改会等你同意:在执行 firebase_create_document、firebase_update_document 或 firebase_set_user_disabled 之前,AI 会准确告诉你将要修改什么,并等你明确同意。修改会立即影响你的线上应用。Firestore 安全规则在这里不起作用:连接器以登录账户的权限操作,就像 Admin SDK 一样。
安装时默认关闭:firebase_delete_document(永久删除)、firebase_publish_remote_config(替换所有应用的线上配置)和 firebase_send_message(向真实设备发送真实的推送通知)。管理员可以按需逐个开启;即便开启了,AI 也会先通过一次验证运行检查改动,并且只在你同意后才发布或发送。
Firestore 读取会计费:返回的每个文档都会在你的 Firebase 账单上计为一次读取,因此 AI 会让每页保持较小(默认 20 个文档),并且只请求它需要的字段。对一个字段过滤、同时按另一个字段排序时需要复合索引,错误信息中会附带创建该索引的页面链接。用户的密码哈希和盐值永远不会返回。
不包含的内容:Crashlytics 没有公开文档化的 REST API,因此无法获取崩溃数据。Cloud Storage 文件、Realtime Database、Data Connect、App Check 和 Analytics 同样不在范围内。
常见错误:401 表示授权已过期或被撤销:请再次点击 Authorize with Provider。403 PERMISSION_DENIED 并带有“API has not been used in project”或 SERVICE_DISABLED:请在 OAuth 客户端所在的 Cloud 项目中启用该 API;其他 403 表示账户缺少相应角色。404:项目 ID、数据库 ID 或路径错误(在需要集合路径的地方用了文档路径,或者反过来)。400 FAILED_PRECONDITION“The query requires an index”:打开错误信息中的链接创建索引。发布 Remote Config 时出现 409:模板在此期间已被修改,因此 AI 会重新读取它。429:已达到某项配额;请稍候再试。
前提条件: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
本地安装连接器
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
打开 http://localhost:3000/connectors/store,选择 Firebase 并填入前提条件中列出的环境变量。
可用工具
| Tool | What it does |
|---|---|
firebase_list_projects | List the Firebase projects the signed-in account can access, with projectId, display name, project number and state |
firebase_get_project | Get one Firebase project: display name, project number, state and its default resources (Hosting site, Realtime Database instance, Storage… |
firebase_list_apps | List the apps registered in a Firebase project (Android, iOS and web) with appId, display name, platform, bundle or package namespace and… |
firebase_list_collections | List Firestore collection ids: the top-level collections of the database, or the subcollections of one document |
firebase_list_documents | List the documents of a Firestore collection with their typed fields, a page at a time (default 20) |
firebase_get_document | Get one Firestore document with its typed fields and create and update times |
firebase_query_documents | Query a Firestore collection with filters, ordering and a limit (structured query, read-only) |
firebase_create_document | Create a Firestore document in a collection with typed fields |
firebase_update_document | Update fields of an existing Firestore document |
firebase_delete_document | Permanently delete a Firestore document (its subcollections stay) |
firebase_lookup_users | Find Firebase Authentication users by email address, uid or phone number: sign-in providers, verified email, disabled flag, creation and… |
firebase_list_users | List the Firebase Authentication users of a project, a page at a time (default 100), with email, providers, disabled flag and sign-in times |
firebase_set_user_disabled | Disable or re-enable a Firebase Authentication user's sign-in |
firebase_get_remote_config | Get the current Remote Config template of a project: conditions, parameters with default and conditional values, parameter groups and… |
firebase_list_remote_config_versions | List the published Remote Config versions of a project, newest first: version number, update time, who published it, how (console, REST… |
firebase_publish_remote_config | Publish a new Remote Config template |
firebase_send_message | Send one Firebase Cloud Messaging notification or data message to a device token, a topic or a condition |
示例提示
- “列出我的 Firebase 项目,以及每个项目中的 Android、iOS 和 Web 应用。”
- “在 Firestore 中,给我看 orders 里状态为 open 的最近十个文档。”
- “Firebase Authentication 中有没有邮箱为 [email protected] 的用户?她最近一次登录是什么时候?”
- “停用 [email protected] 这个账户的登录。操作前先告诉我是哪个账户。”
- “我们的 Remote Config 模板里有什么,最近三个版本分别是谁发布的?”
下一步
这份指南对你有帮助吗?