Implements the MCP server as a Django app, allowing integration with Django's web framework capabilities including routing, authentication, and database management.
Provides 14 tools across authentication, Firestore database, and Cloud Storage services, enabling AI agents to verify tokens, manage users, create/read/update/delete documents, query collections, and handle file operations in Firebase.
Offers integration with LangChain, allowing the Firebase tools to be used directly with LangChain agents through provided client tools.
Supports integration with LangGraph's react agent pattern, enabling the creation of AI agents that can interact with Firebase services through the MCP protocol.
Django Firebase MCP
A comprehensive Django app that implements Firebase Model Context Protocol (MCP) server, enabling AI agents to interact with Firebase services through a standardized protocol.
🚀 Quick Start
Get up and running in under 5 minutes with the standalone Firebase agent for testing.
Prerequisites
- Python 3.11+
- Firebase project with Admin SDK
- Git (optional)
1. Clone & Setup
2. Install Dependencies
3. Firebase Setup
Get Firebase Credentials
- Go to Firebase Console
- Select your project (or create a new one)
- Navigate to Project Settings → Service Accounts
- Click "Generate new private key"
- Download the JSON file and save it as
credentials.json
in the project root
Enable Firebase Services
Make sure these services are enabled in your Firebase project:
- Authentication (for user management)
- Firestore Database (for document storage)
- Cloud Storage (for file uploads)
4. Environment Configuration
Create a .env
file in the project root:
⚠️ Important: Replace your-project-id
with your actual Firebase project ID.
5. Quick Test with Standalone Agent
Test your setup immediately with the standalone Firebase agent:
You should see:
Try these commands:
6. Full Django Setup (Optional)
For full Django integration:
The MCP server will be available at: http://127.0.0.1:8001/mcp/
🛠️ Management Commands
Core Commands
Testing Commands
🔧 Available Tools
The MCP server provides 14 Firebase tools across three categories:
🔐 Authentication (4 tools)
firebase_verify_token
- Verify Firebase ID tokensfirebase_create_custom_token
- Create custom auth tokensfirebase_get_user
- Get user info by UIDfirebase_delete_user
- Delete user accounts
📚 Firestore Database (6 tools)
firestore_list_collections
- List all collectionsfirestore_create_document
- Create new documentsfirestore_get_document
- Retrieve documentsfirestore_update_document
- Update documentsfirestore_delete_document
- Delete documentsfirestore_query_collection
- Query with filters
🗄️ Cloud Storage (4 tools)
storage_list_files
- List files with filteringstorage_upload_file
- Upload filesstorage_download_file
- Download filesstorage_delete_file
- Delete files
🧪 Quick Testing
Test Server Health
Test a Firebase Tool
🤖 AI Agent Integration
LangChain Example
📚 Documentation
This project includes comprehensive documentation:
- FIREBASE_ADMIN_MCP.md - Complete technical documentation
- Detailed API reference
- All tool specifications
- Advanced configuration
- Security considerations
- Production deployment guide
- STANDALONE_AGENT.md - Standalone agent documentation
- Self-contained Firebase agent
- Complete feature overview
- Usage examples
- Integration patterns
🔧 Troubleshooting
Common Issues
Problem: Default app does not exist
error
Solution: Verify credentials.json
path in .env
file
Problem: Server won't start
Solution: Check if port 8001 is available: netstat -an | findstr :8001
Problem: Firebase connection fails Solution: Verify Firebase services are enabled in console
Problem: Import errors
Solution: Ensure all dependencies installed: pip install -r requirements.txt
🎯 What's Next?
- Explore the Standalone Agent - Perfect for quick testing and demos
- Read the Full Documentation - See FIREBASE_ADMIN_MCP.md for complete details
- Integrate with Your AI Agents - Use the MCP tools in your applications
- Customize for Your Needs - Extend with additional Firebase operations
📝 Project Structure
🤝 Contributing
- Fork the repository
- Create a feature branch
- Test your changes
- Submit a pull request
📄 License
MIT License - see LICENSE file for details.
🔥 Ready to supercharge your AI agents with Firebase?
Start with the standalone agent, then explore the full documentation for advanced usage!
This server cannot be installed
A Django app that implements Firebase Model Context Protocol server, enabling AI agents to interact with Firebase services (Authentication, Firestore Database, Cloud Storage) through a standardized protocol.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol server that allows creation and management of multiple Fireproof JSON databases with CRUD operations, querying capabilities, and cloud synchronization for sharing databases with others.Last updated -92JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.Last updated -9TypeScriptMIT License
Appwrite MCP Serverofficial
AsecurityAlicenseAqualityA Model Context Protocol server that allows AI assistants to interact with Appwrite's API, providing tools to manage databases, users, functions, teams, and other resources within Appwrite projects.Last updated -8440PythonMIT License- -security-license-qualityA Model Context Protocol server that enables AI models to interact with both MySQL and MongoDB databases through a standardized interface, supporting comprehensive database operations including queries, schema management, and CRUD operations.Last updated -6JavaScriptMIT License