Django Firebase

v1.0.0APIsstable

A production-ready Django app implementing Firebase Model Context Protocol (MCP) server with 14 Firebase tools for AI agents. Features standalone agent, HTTP/stdio transport, LangChain integration, and complete Firebase service coverage (Auth, Firest

djangodrffirebase-adminlangchainlanggraph
Share:
15
Stars
0
Downloads
0
Weekly
0/5

What is Django Firebase?

Django Firebase is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to production-ready django app implementing firebase model context protocol (mcp) server with 14 firebase tools for ai agents. features standalone agent, http/stdio transport, langchain integration, and ...

A production-ready Django app implementing Firebase Model Context Protocol (MCP) server with 14 Firebase tools for AI agents. Features standalone agent, HTTP/stdio transport, LangChain integration, and complete Firebase service coverage (Auth, Firest

This server falls under the APIs and Cloud Services categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A production-ready Django app implementing Firebase Model Co

Use Cases

Access 14 Firebase services including Auth and Firestore.
Integrate Firebase with Django apps for AI agents.
Manage Firebase operations through LangChain and LanGraph.
raghavdasila

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedJan 9, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx django-firebase

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Django Firebase

Django Firebase MCP is a production-ready Django application that implements a Firebase MCP server, giving AI agents access to 14 Firebase tools spanning Authentication, Firestore, and Cloud Storage. It supports both HTTP and stdio transports, integrates natively with LangChain and LangGraph agent frameworks, and ships with a standalone Firebase agent for immediate testing. Developers use it to build AI-powered backends that need to read and write Firebase data, verify user tokens, and manage file storage through natural language commands.

Prerequisites

  • Python 3.10+ and pip
  • A Firebase project with a service account JSON credentials file downloaded from the Firebase Console
  • Django and the project dependencies installed via requirements.txt
  • Redis (optional, for stateful agent sessions via USE_REDIS=true)
  • An MCP-compatible client or LangChain/LangGraph agent setup
1

Clone the repository and install dependencies

Check out the project and install all Python dependencies including Django, Firebase Admin SDK, and LangChain packages.

git clone https://github.com/raghavdasila/django-firebase-mcp.git
cd django-firebase-mcp
pip install -r requirements.txt
2

Download your Firebase service account credentials

In the Firebase Console, go to Project Settings > Service Accounts > Generate new private key. Download the JSON file and place it somewhere accessible on your server.

3

Create the .env configuration file

Create a .env file in the project root with your Firebase credentials path, storage bucket, and Django settings. Set MCP_TRANSPORT to 'stdio' for Claude Desktop or 'http' for networked agent access.

SERVICE_ACCOUNT_KEY_PATH=/path/to/your/firebase-service-account.json
FIREBASE_STORAGE_BUCKET=your-project-id.appspot.com
MCP_TRANSPORT=stdio
MCP_HOST=0.0.0.0
MCP_PORT=8000
DEBUG=True
SECRET_KEY=your-django-secret-key-here
USE_REDIS=false
# REDIS_URL=redis://localhost:6379/0
4

Run Django migrations and start the server

Apply database migrations and then start the Django development server which also serves the MCP endpoint.

python manage.py migrate
python manage.py runserver
5

Test with the standalone Firebase agent

Run the built-in standalone agent script to verify your Firebase credentials and MCP tools are working correctly before connecting an AI client.

python firebase_admin_mcp/standalone_firebase_agent.py
6

Configure Claude Desktop for stdio transport

Add the server to your Claude Desktop config to run it as a local stdio process. Claude will spawn the Django server automatically.

{
  "mcpServers": {
    "django-firebase": {
      "command": "python",
      "args": ["manage.py", "runserver"],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "/path/to/firebase-service-account.json",
        "FIREBASE_STORAGE_BUCKET": "your-project-id.appspot.com",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}

Django Firebase Examples

Client configuration

Configure Claude Desktop to connect to the Django Firebase MCP server running locally with stdio transport.

{
  "mcpServers": {
    "django-firebase": {
      "command": "python",
      "args": ["/path/to/django-firebase-mcp/manage.py", "runmcpserver"],
      "env": {
        "SERVICE_ACCOUNT_KEY_PATH": "/path/to/firebase-credentials.json",
        "FIREBASE_STORAGE_BUCKET": "your-project.appspot.com",
        "MCP_TRANSPORT": "stdio",
        "SECRET_KEY": "your-django-secret-key"
      }
    }
  }
}

Prompts to try

Example prompts to exercise the 14 Firebase tools across Authentication, Firestore, and Cloud Storage.

- "Show me all my Firestore collections."
- "Create a new Firestore document in the 'users' collection with name 'Alice' and role 'admin'."
- "Verify this Firebase ID token and tell me what user it belongs to."
- "List all files in my Firebase Storage bucket."
- "Query the 'orders' collection where status equals 'pending'."

Troubleshooting Django Firebase

firebase_admin.exceptions.UnavailableError: failed to connect to Firebase

Verify that SERVICE_ACCOUNT_KEY_PATH points to a valid Firebase service account JSON file and that the file has the correct permissions. Also ensure your machine can reach Firebase APIs (firestore.googleapis.com, storage.googleapis.com) — check firewall rules if running in a corporate network.

FIREBASE_STORAGE_BUCKET causes storage errors even though it looks correct

The bucket name must be exactly as shown in Firebase Console under Storage — typically your-project-id.appspot.com or your-project-id.firebasestorage.app. Do not include gs:// prefix in the env variable value.

LangChain agent cannot find Firebase tools

Import the tools using from firebase_admin_mcp.tools import ALL_FIREBASE_TOOLS and pass the list to your LangChain agent's tools parameter. Ensure the Django app is fully initialized before importing by calling django.setup() if running outside of manage.py.

Frequently Asked Questions about Django Firebase

What is Django Firebase?

Django Firebase is a Model Context Protocol (MCP) server that production-ready django app implementing firebase model context protocol (mcp) server with 14 firebase tools for ai agents. features standalone agent, http/stdio transport, langchain integration, and complete firebase service coverage (auth, firest It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Django Firebase?

Follow the installation instructions on the Django Firebase GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Django Firebase?

Django Firebase works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Django Firebase free to use?

Yes, Django Firebase is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "django-firebase": { "command": "npx", "args": ["-y", "django-firebase"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Django Firebase?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides