Skip to main content
Glama

Firestore Advanced MCP

by diez7lm

🔥 Firestore 高级 MCP

版本执照节点

Firebase Firestore 的高级 MCP(模型上下文协议)服务器,允许像 Claude 这样的大型语言模型与您的 Firebase 数据库完全交互。

✨ 特点

  • 📝全面支持 Firestore :CRUD、复合查询、多个过滤器
  • 高级操作:事务、原子操作、批量更新
  • 🔄特殊数据类型:GeoPoint、文档引用、时间戳
  • ⏱️ TTL 管理:文档的生存时间配置
  • 🔍智能缺失索引检测:自动指示创建必要的索引
  • 🎯高级搜索:集合组查询、复杂过滤器

📋 先决条件

  • 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

🔧 配置

  1. 获取您的 Firebase 服务帐户密钥
    • 前往Firebase 控制台
    • 选择您的项目
    • 项目设置 > 服务帐户
    • 生成新的私钥并上传JSON文件
  2. 设置环境变量
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.js

Claude中的配置

要将此 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

🙏 致谢

  • 克劳德的人类学和模型上下文协议
  • Firebase for Firestore 和开发者工具

🦾 贡献

欢迎投稿!请随时通过 GitHub 问题提交拉取请求或报告问题。

📚 附加文档

有关将 Firestore 与 Firebase 结合使用的更多信息,请参阅Firebase 官方文档

要了解有关模型上下文协议 (MCP) 及其与 Claude 的使用的更多信息,请参阅Anthropic 文档

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

模型上下文协议服务器,使 Claude 等大型语言模型能够与 Firebase Firestore 数据库进行全面交互,支持完整的 CRUD 操作、复杂查询以及事务和 TTL 管理等高级功能。

  1. ✨ 特点
    1. 📋 先决条件
      1. 🚀 安装
        1. 通过 npm
        2. 通过 GitHub
      2. 🔧 配置
        1. 🖥️ 使用
          1. 使用 npm global
          2. 使用 npx
          3. 从克隆的目录
          4. Claude中的配置
        2. 🛠️ 可用工具
          1. 基本操作
          2. 高级查询
          3. 特殊类型和高级功能
        3. 📝 示例
          1. 检索文档
          2. 参考另一个文档创建文档
          3. 在文档上配置 TTL
          4. 使用多个过滤器运行查询
        4. 📄 许可证
          1. 👨🏽‍💻作者
            1. 🙏 致谢
              1. 🦾 贡献
                1. 📚 附加文档

                  Related MCP Servers

                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol server that allows creation and management of multiple Fireproof JSON databases with CRUD operations, querying capabilities, and cloud synchronization for sharing databases with others.
                    Last updated -
                    9
                    2
                    JavaScript
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables Large Language Models to seamlessly interact with ClickHouse databases, supporting resource listing, schema retrieval, and query execution.
                    Last updated -
                    1
                    Python
                    MIT License
                    • Linux
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server that allows Large Language Models to interact with Astra DB databases, providing tools for managing collections and records through natural language commands.
                    Last updated -
                    10
                    115
                    12
                    TypeScript
                    Apache 2.0
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables Large Language Models to access and interact with database connections, including viewing schemas and performing CRUD operations on connected databases.
                    Last updated -
                    • Apple

                  View all related MCP servers

                  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