Firestore Advanced MCP

MIT License
48
2

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 Advanced MCP

Advanced MCP (Model Context Protocol) server for Firebase Firestore, allowing large language models like Claude to fully interact with your Firebase databases.

✨ Features

  • 📝 Full Firestore support : CRUD, compound queries, multiple filters
  • Advanced operations : Transactions, atomic operations, batch updates
  • 🔄 Special data types : GeoPoint, document references, timestamps
  • ⏱️ TTL Management : Time-To-Live Configuration for Documents
  • 🔍 Smart Missing Index Detection : Automatic instructions to create the necessary indexes
  • 🎯 Advanced search : Queries on collection groups, complex filters

📋 Prerequisites

  • Node.js >= 16.0.0
  • A Firebase project with Firestore enabled
  • A Firebase service account key (JSON file)

🚀 Installation

Via npm

npm install -g firestore-advanced-mcp

Via GitHub

git clone https://github.com/diez7lm/firestore-advanced-mcp.git cd firestore-advanced-mcp npm install

🔧 Configuration

  1. Get your Firebase service account key :
    • Go to the Firebase console
    • Select your project
    • Project Settings > Service Accounts
    • Generate a new private key and upload the JSON file
  2. Set the environment variable :
export SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json"

🖥️ Use

With npm global

SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json" firestore-advanced-mcp

With npx

SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json" npx firestore-advanced-mcp

From the cloned directory

SERVICE_ACCOUNT_KEY_PATH="/chemin/vers/votre/serviceAccountKey.json" node index.js

Configuration in Claude

To use this MCP server with Claude, add the following configuration to your claude_desktop_config.json file:

"firebase-mcp": { "command": "npx", "args": ["firestore-advanced-mcp"], "env": { "SERVICE_ACCOUNT_KEY_PATH": "/chemin/vers/votre/serviceAccountKey.json" } }

Or for a locally installed version:

"firebase-mcp": { "command": "node", "args": ["/chemin/vers/firestore-advanced-mcp/index.js"], "env": { "SERVICE_ACCOUNT_KEY_PATH": "/chemin/vers/votre/serviceAccountKey.json" } }

🛠️ Available tools

The server provides the following tools to Claude:

Basic operations

  • firestore_get - Retrieve a document
  • firestore_create - Create a new document
  • firestore_update - Update an existing document
  • firestore_delete - Delete a document
  • firestore_query - Run a query with filters
  • firestore_list_collections - List available collections

Advanced queries

  • firestore_collection_group_query - Collection group query
  • firestore_composite_query - Query with multiple filters and sorts
  • firestore_count_documents - Count documents without retrieving everything

Special Types and Advanced Features

  • firestore_special_data_types - Manage GeoPoints and References
  • firestore_set_ttl - Configure automatic document expiration
  • firestore_transaction - Execute a transaction consisting of multiple operations
  • firestore_batch - Execute batch operations
  • firestore_field_operations - Atomic operations (increment, arrayUnion, etc.)
  • firestore_full_text_search - Full text search in documents

📝 Examples

Retrieve a document

{ "collection": "users", "id": "user123" }

Create a document with reference to another document

{ "collection": "orders", "data": { "product": "Laptop", "price": 999.99, "fields": [ { "fieldPath": "user", "type": "reference", "value": "users/user123" } ] } }

Configure TTL on a document

{ "collection": "temporaryData", "id": "session123", "expiresIn": 86400000, "fieldName": "expires_at" }

Run a query with multiple filters

{ "collection": "products", "filters": [ { "field": "category", "operator": "==", "value": "electronics" }, { "field": "price", "operator": "<", "value": 1000 } ], "orderBy": { "field": "price", "direction": "asc" }, "limit": 10 }

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨🏽‍💻 Author

  • Diez7lm

🙏 Acknowledgments

  • Anthropic for Claude and the Model Context Protocol
  • Firebase for Firestore and Developer Tools

🦾 Contribution

Contributions are welcome! Feel free to submit a pull request or report issues via GitHub issues.

📚 Additional documentation

For more information on using Firestore with Firebase, see the official Firebase documentation .

To learn more about the Model Context Protocol (MCP) and its use with Claude, see the Anthropic documentation .

-
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.

A Model Context Protocol server that enables large language models like Claude to perform comprehensive interactions with Firebase Firestore databases, supporting full CRUD operations, complex queries, and advanced features like transactions and TTL management.

  1. ✨ Features
    1. 📋 Prerequisites
      1. 🚀 Installation
        1. Via npm
        2. Via GitHub
      2. 🔧 Configuration
        1. 🖥️ Use
          1. With npm global
          2. With npx
          3. From the cloned directory
          4. Configuration in Claude
        2. 🛠️ Available tools
          1. Basic operations
          2. Advanced queries
          3. Special Types and Advanced Features
        3. 📝 Examples
          1. Retrieve a document
          2. Create a document with reference to another document
          3. Configure TTL on a document
          4. Run a query with multiple filters
        4. 📄 License
          1. 👨🏽‍💻 Author
            1. 🙏 Acknowledgments
              1. 🦾 Contribution
                1. 📚 Additional documentation

                  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 4 months ago
                    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 5 months ago
                    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 a month ago
                    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 a month ago
                    TypeScript
                    • Apple

                  View all related MCP servers

                  ID: idmcv2gi9b