Firestore Advanced MCP
🔥 Firestore 高级 MCP
Firebase Firestore 的高级 MCP(模型上下文协议)服务器,允许像 Claude 这样的大型语言模型与您的 Firebase 数据库完全交互。
✨ 特点
📝全面支持 Firestore :CRUD、复合查询、多个过滤器
⚡高级操作:事务、原子操作、批量更新
🔄特殊数据类型:GeoPoint、文档引用、时间戳
⏱️ TTL 管理:文档的生存时间配置
🔍智能缺失索引检测:自动指示创建必要的索引
🎯高级搜索:集合组查询、复杂过滤器
Related MCP server: MCP Firebase Server
📋 先决条件
Node.js >= 16.0.0
启用了 Firestore 的 Firebase 项目
Firebase 服务帐户密钥(JSON 文件)
🚀 安装
通过 npm
npm install -g firestore-advanced-mcp通过 GitHub
git clone https://github.com/diez7lm/firestore-advanced-mcp.git
cd firestore-advanced-mcp
npm install🔧 配置
获取您的 Firebase 服务帐户密钥:
选择您的项目
项目设置 > 服务帐户
生成新的私钥并上传JSON文件
设置环境变量:
export SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json"🖥️ 使用
使用 npm global
SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json" firestore-advanced-mcp使用 npx
SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json" npx firestore-advanced-mcp从克隆的目录
SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json" node index.jsClaude中的配置
要将此 MCP 服务器与 Claude 一起使用,请将以下配置添加到您的claude_desktop_config.json文件中:
"firebase-mcp": {
"command": "npx",
"args": ["firestore-advanced-mcp"],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "/chemin/vers/votre/serviceAccountKey.json"
}
}或者对于本地安装的版本:
"firebase-mcp": {
"command": "node",
"args": ["/chemin/vers/firestore-advanced-mcp/index.js"],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "/chemin/vers/votre/serviceAccountKey.json"
}
}🛠️ 可用工具
服务器为Claude提供了以下工具:
基本操作
firestore_get- 检索文档firestore_create创建新文档firestore_update- 更新现有文档firestore_delete- 删除文档firestore_query- 使用过滤器运行查询firestore_list_collections- 列出可用的集合
高级查询
firestore_collection_group_query- 集合组查询firestore_composite_query- 使用多个过滤器和排序进行查询firestore_count_documents- 统计文档数量但不检索所有内容
特殊类型和高级功能
firestore_special_data_types- 管理地理点和参考firestore_set_ttl- 配置自动文档过期firestore_transaction- 执行由多个操作组成的事务firestore_batch- 执行批处理操作firestore_field_operations- 原子操作(增量、arrayUnion 等)firestore_full_text_search- 在文档中进行全文搜索
📝 示例
检索文档
{
"collection": "users",
"id": "user123"
}参考另一个文档创建文档
{
"collection": "orders",
"data": {
"product": "Laptop",
"price": 999.99,
"fields": [
{
"fieldPath": "user",
"type": "reference",
"value": "users/user123"
}
]
}
}在文档上配置 TTL
{
"collection": "temporaryData",
"id": "session123",
"expiresIn": 86400000,
"fieldName": "expires_at"
}使用多个过滤器运行查询
{
"collection": "products",
"filters": [
{
"field": "category",
"operator": "==",
"value": "electronics"
},
{
"field": "price",
"operator": "<",
"value": 1000
}
],
"orderBy": {
"field": "price",
"direction": "asc"
},
"limit": 10
}📄 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
👨🏽💻作者
迪兹7lm
🙏 致谢
🦾 贡献
欢迎投稿!请随时通过 GitHub 问题提交拉取请求或报告问题。
📚 附加文档
有关将 Firestore 与 Firebase 结合使用的更多信息,请参阅Firebase 官方文档。
要了解有关模型上下文协议 (MCP) 及其与 Claude 的使用的更多信息,请参阅Anthropic 文档。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude AI to interact with Xano databases, providing comprehensive database operations, file management, and request history tracking through a standardized interface.1MIT
- FlicenseNot gradedqualityDmaintenanceA bridge that enables Large Language Models to read from and write to Firebase Firestore collections through Model Context Protocol (MCP) tools.1
- AlicenseBqualityDmaintenanceProvides secure, permission-controlled access to Firebase Firestore databases with full CRUD operations, advanced queries, batch operations, and transactions through a standardized MCP interface.239MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents and LLMs to securely interact with Firestore databases through complete CRUD operations (get, set, add, delete, query) while respecting Firestore Security Rules via the Firebase Client SDK.1MIT
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Butterbase MCP server — manage your backend: schemas, auth, functions, storage, RAG, deploys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/diez7lm/firestore-advanced-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server