Firebase MCP Tool
April 6, 2025 ยท View on GitHub
This MCP (Machine Control Protocol) tool provides a set of commands to interact with Firebase directly from Cursor.
Setup Instructions
1. Install Dependencies
npm install
2. Configure Firebase Service Account
- Create a
src/keysdirectory if it doesn't exist - Create a
serviceAccount.tsfile in thesrc/keysdirectory with your Firebase credentials:
You can get these credentials from the Firebase Console:
- Go to Project Settings
- Service Accounts tab
- Generate New Private Key
3. Build the application
npm run build
4. Configure Cursor MCP
- Open Cursor settings
- Go to the MCP tab and click on "add a new "
- Add the following configuration:
{
"mcpServers": {
...Other MCP servers
"cursor-firebase-tools": {
"command": "node",
"args": ["{{yourPath}}/cursor-firebase-tools/dist/index.js"],
"cwd": "."
}
}
}
Replace {{yourPath}} with the absolute path to your project directory.
PROFIT!
You can now ask the cursor AI to read or update firestore documents in the project of the serviceAccount. You can also create a firebase user
Notes
- When reading documents, Firestore Timestamps are automatically converted to JavaScript Date objects
- When writing documents, JavaScript Date objects are automatically converted to Firestore Timestamps
- All responses are in JSON format with
successand eitherdataorerrorfields
TESTING
npm run dev
Esegue una shell dove testare l'esecuzione dei comandi