remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
Provides comprehensive access to Firestore databases, enabling CRUD operations, complex queries with multiple filters, transactions, batch operations, special data types handling, TTL management, and advanced search capabilities across collections.
🔥 Firestore 高级 MCP
Firebase Firestore 的高级 MCP(模型上下文协议)服务器,允许像 Claude 这样的大型语言模型与您的 Firebase 数据库完全交互。
✨ 特点
- 📝全面支持 Firestore :CRUD、复合查询、多个过滤器
- ⚡高级操作:事务、原子操作、批量更新
- 🔄特殊数据类型:GeoPoint、文档引用、时间戳
- ⏱️ TTL 管理:文档的生存时间配置
- 🔍智能缺失索引检测:自动指示创建必要的索引
- 🎯高级搜索:集合组查询、复杂过滤器
📋 先决条件
- Node.js >= 16.0.0
- 启用了 Firestore 的 Firebase 项目
- Firebase 服务帐户密钥(JSON 文件)
🚀 安装
通过 npm
通过 GitHub
🔧 配置
- 获取您的 Firebase 服务帐户密钥:
- 前往Firebase 控制台
- 选择您的项目
- 项目设置 > 服务帐户
- 生成新的私钥并上传JSON文件
- 设置环境变量:
🖥️ 使用
使用 npm global
使用 npx
从克隆的目录
Claude中的配置
要将此 MCP 服务器与 Claude 一起使用,请将以下配置添加到您的claude_desktop_config.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
- 在文档中进行全文搜索
📝 示例
检索文档
参考另一个文档创建文档
在文档上配置 TTL
使用多个过滤器运行查询
📄 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
👨🏽💻作者
- 迪兹7lm
🙏 致谢
🦾 贡献
欢迎投稿!请随时通过 GitHub 问题提交拉取请求或报告问题。
📚 附加文档
有关将 Firestore 与 Firebase 结合使用的更多信息,请参阅Firebase 官方文档。
要了解有关模型上下文协议 (MCP) 及其与 Claude 的使用的更多信息,请参阅Anthropic 文档。
This server cannot be installed
模型上下文协议服务器,使 Claude 等大型语言模型能够与 Firebase Firestore 数据库进行全面交互,支持完整的 CRUD 操作、复杂查询以及事务和 TTL 管理等高级功能。