MCP FirestoreDB is a Node.js-based server that implements the Model Context Protocol (MCP) for Google Cloud Firestore operations. Currently at version 1.1.2, this package provides a robust set of 17 specialized tools, including document CRUD, batch operations, collection management, and advanced index configuration and analysis. It acts as an intermediary, enabling MCP-compatible clients (such as AI agents like Claude Desktop or Cursor IDE) to interact with Firestore databases via a standardized protocol. Key differentiators include its adherence to the MCP standard, comprehensive tooling for common and complex Firestore tasks (e.g., schema analysis, index generation), and capabilities for real-time operations, advanced querying, and high-performance batch processing. The package emphasizes production readiness with robust error handling and validation, and is primarily consumed by configuring it within an MCP client environment rather than requiring direct programmatic integration of its individual tools into an application. It provides the server-side logic for managing Firestore resources.
npm install mcpfirestoredbVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to programmatically start the MCP FirestoreDB server, loading necessary Google Cloud credentials from environment variables. It showcases basic initialization for integration into a Node.js application.
Always double-check the target collection ID and ensure proper authorization before invoking `delete_collection`. Consider implementing additional safeguards in your client application if exposing this tool broadly.
Upgrade your Node.js environment to version 18.0.0 or higher. Use a Node Version Manager (nvm) for easy switching: `nvm install 18 && nvm use 18`.
Ensure `GOOGLE_APPLICATION_CREDENTIALS` points to the correct, accessible path of your service account JSON file and `FIREBASE_PROJECT_ID` matches your Firebase/GCP project ID. Verify file permissions for the credentials file.
Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the absolute path of your service account JSON key file (e.g., `export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json`).
Set the `FIREBASE_PROJECT_ID` environment variable to your specific project ID (e.g., `export FIREBASE_PROJECT_ID=my-gcp-project-123`).
Ensure `FIREBASE_PROJECT_ID` is correctly loaded. For programmatic usage, explicitly pass `projectId` in the configuration object to `startMCPServer`. For CLI/agent usage, verify the client's configuration for passing the project ID.