- Home
- MCP servers
- Django Firebase
Django Firebase
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You have a Django-based MCP server that exposes Firebase services (Authentication, Firestore, and Cloud Storage) through a standardized MCP interface. It lets you manage Firebase resources via AI agents and MCP clients, with both quick-start standalone usage and full Django integration for production-like setups.
How to use
Start with the MCP server to expose Firebase capabilities to your AI agents. You can run a lightweight HTTP endpoint for MCP clients or operate in stdio mode for local, agent-to-agent communication. Once the server is running, you can issue MCP requests to list, query, or modify Firebase resources such as users, documents, and storage files. Use the stand-alone agent for quick testing, then switch to the Django-based MCP server for full integration.
How to install
Follow these concrete steps to install and start using the MCP server in a Django environment.
# Prerequisites
Python 3.11+
Firebase project with Admin SDK
Git (optional)
Redis (optional, for persistent state management)
# 1. Clone the project
git clone https://github.com/your-repo/django-firebase-mcp.git
cd django-firebase-mcp
# 2. Install dependencies
pip install -r requirements.txt
# 3. Firebase setup - place credentials in project root as credentials.json
# Obtain credentials.json from Firebase Console > Project Settings > Service Accounts > Generate private key
# 4. Environment configuration - create a .env file with required values
# Example values (replace with your own):
SERVICE_ACCOUNT_KEY_PATH=credentials.json
FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
MCP_TRANSPORT=http
MCP_HOST=127.0.0.1
MCP_PORT=8001
DEBUG=True
SECRET_KEY=your-secret-key-here
# 5. State management choice
# A) Redis (recommended for production)
REDIS_URL=redis://localhost:6379
USE_REDIS=true
# B) InMemorySaver (for quick testing)
USE_REDIS=false
- Run the standalone Firebase agent for quick testing (optional but convenient):
# Start the standalone Firebase agent for quick testing
python firebase_admin_mcp/standalone_firebase_agent.py
- Run the full Django MCP server (choose one mode):
# Run MCP server via Django (HTTP/REST MCP endpoint)
python manage.py runserver 8001
# Or run MCP server in stdio mode for MCP clients
python manage.py run_mcp --transport stdio
# Or run MCP server in HTTP mode (explicit host/port)
python manage.py run_mcp --transport http --host 127.0.0.1 --port 8001
Additional setup and notes
After starting, access to the MCP endpoint is typically available at http://127.0.0.1:8001/mcp/. Use this URL for HTTP-based MCP clients. The stdio mode provides a local IPC channel suitable for tightly coupled agents.
Django migrations and superuser creation are optional but recommended for a full integration.
# Django setup (optional but recommended)
p python manage.py migrate
python manage.py createsuperuser
python manage.py runserver 8001
Available tools
firebase_verify_token
Verify Firebase ID tokens to authenticate requests against Firebase authentication.
firebase_create_custom_token
Create custom Firebase authentication tokens for non-standard sign-in flows.
firebase_get_user
Retrieve user information by UID from Firebase Authentication.
firebase_delete_user
Delete a Firebase Authentication user by UID.
firestore_list_collections
List all Firestore collections in the project.
firestore_create_document
Create a new document in a Firestore collection.
firestore_get_document
Retrieve a Firestore document by path.
firestore_update_document
Update fields in an existing Firestore document.
firestore_delete_document
Delete a Firestore document from a collection.
firestore_query_collection
Query Firestore documents within a collection using filters.
storage_list_files
List files stored in Cloud Storage with optional filters.
storage_upload_file
Upload a file to Cloud Storage.
storage_download_file
Download a file from Cloud Storage.
storage_delete_file
Delete a file from Cloud Storage.