mcp_firebase_query_firestore_collectionLABSCO SUMMARY
Firestore in reach of the assistant, with the credential left on disk.
The service account key stays a file and is found through an environment variable, which is the difference between handing an agent a path and handing it your database. Writes are part of the surface, so scope the service account to the collections you actually meant to open.
What it is
A Python bridge between an MCP client and Firebase Firestore, built on the official mcp SDK. It exposes Firestore reads and writes as tools, authenticated with a Firebase service account key.
What you get
- Documents read out of a Firestore collection you name
- Writes back into a Firestore collection
- Authentication from a service account key file, located by SERVICE_ACCOUNT_KEY_PATH or, failing that, by a serviceAccountKey.json sitting beside the server
Requirements
Python 3.7 or later, the packages in requirements.txt installed with pip or uv, a Firebase project with Firestore enabled, and a service account key JSON. Set SERVICE_ACCOUNT_KEY_PATH when the server is launched by a client, since that is the flexible path; otherwise keep the key next to the server file.
Setup effort
Build from source — git clone https://github.com/davo20019/mcp-firebase-server.git
USE CASES
Answering questions about data that lives in Firestore
Name the collection and the assistant reads documents straight out of it, so a question about users or orders is answered from the database rather than from an export somebody made last month.
Using Firestore as an agent's memory
The same server reads and writes, so an agent can persist what it learned into a collection and pick it up in the next session, with the storage being a database you already operate.
Keeping the blast radius small
Point SERVICE_ACCOUNT_KEY_PATH at a key whose service account only has rights over the collections you intend to expose. The server's reach is exactly that account's reach, and nothing in the config widens it.
7 tools
Listed in project docs. Your client may show a different list.
mcp_firebase_add_document_to_firestoremcp_firebase_list_firestore_collectionsmcp_firebase_get_firestore_documentmcp_firebase_list_document_subcollectionsmcp_firebase_update_firestore_documentmcp_firebase_query_firestore_collection_with_filterBEFORE YOU INSTALL
What to know first
Tools you get
7 tools named in the project's documentation.
Requires
- Python 3.7+
- SERVICE_ACCOUNT_KEY_PATH in your environment
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
You clone this one yourself.
Server setup
git clone https://github.com/davo20019/mcp-firebase-server.git
cd mcp-firebase-server
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
chmod +x run_server.shMCP Clients
Claude Desktop
{
"mcpServers": {
"firebase": {
"command": "<YOUR_PATH_TO_MCP_FIREBASE_SERVER>/run_server.sh",
"args": [],
"env": {
"SERVICE_ACCOUNT_KEY_PATH": "<YOUR_SERVICE_ACCOUNT_KEY_PATH>",
"FIREBASE_STORAGE_BUCKET": "<YOUR_PROJECT_ID>.appspot.com"
}
}
}
}