markhilton/mcp-firestore-server
3.1
If you are the rightful owner of mcp-firestore-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The MCP Firestore Server is a Model Context Protocol server designed to facilitate Firestore database operations.
Tools
7
Resources
0
Prompts
0
MCP Firestore Server
A Model Context Protocol (MCP) server that provides Firestore database operations.
Installation
npx @nerd305/mcp-firestore-server
Configuration
The server requires the following environment variables:
GOOGLE_CLOUD_PROJECTorFIREBASE_PROJECT_ID: Your Firebase project ID (required)FIRESTORE_EMULATOR_HOST: Firestore emulator host (optional, e.g., "127.0.0.1:8080")
Usage with Claude Desktop
Add to your .mcp.json configuration:
{
"mcpServers": {
"firestore": {
"command": "npx",
"args": ["-y", "@nerd305/mcp-firestore-server"],
"env": {
"GOOGLE_CLOUD_PROJECT": "your-project-id",
"FIRESTORE_EMULATOR_HOST": "127.0.0.1:8080"
}
}
}
}
For production Firestore (requires authentication):
{
"mcpServers": {
"firestore": {
"command": "npx",
"args": ["-y", "@nerd305/mcp-firestore-server"],
"env": {
"GOOGLE_CLOUD_PROJECT": "your-project-id",
"GOOGLE_APPLICATION_CREDENTIALS": "/path/to/service-account.json"
}
}
}
}
Available Tools
query_collection
Query documents from a Firestore collection.
{
collection: string;
limit?: number;
orderBy?: string;
orderDirection?: "asc" | "desc";
}
get_document
Get a specific document by ID.
{
collection: string;
docId: string;
}
query_with_where
Query documents with where conditions.
{
collection: string;
field: string;
operator: "==" | "!=" | "<" | "<=" | ">" | ">=" | "array-contains" | "in" | "array-contains-any";
value: string;
limit?: number;
}
list_collections
List all top-level collections.
{
}
create_document
Create a new document.
{
collection: string;
docId?: string; // Optional, auto-generated if not provided
data: object;
}
update_document
Update an existing document.
{
collection: string;
docId: string;
data: object;
merge?: boolean; // Default: true
}
delete_document
Delete a document.
{
collection: string;
docId: string;
}
Local Development
- Clone the repository
- Install dependencies:
npm install - Run locally:
npm start
Testing with npm link
cd mcp-firestore-server
npm link
# In your project
npm link @nerd305/mcp-firestore-server
License
MIT