Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables interaction with Firebase Authentication and Firestore through the MCP protocol, allowing user management and database operations via natural language.

README.md

Firebase MCP Server for Railway

A Firebase Model Context Protocol (MCP) server designed for deployment on Railway.com using Streamable HTTP transport.

Features

  • Firebase Authentication: User management (create, read, update, delete users)
  • Firestore Database: Document and collection operations with advanced querying
  • HTTP/HTTPS API: Streamable HTTP transport for remote MCP client connections
  • Railway Ready: Optimized for Railway.com deployment with proper configuration

Quick Deploy to Railway

![Deploy on Railway](https://railway.app/template/firebase-mcp-server)

Or manually:

  1. Fork this repository
  2. Connect to Railway.com
  3. Set environment variables (see below)
  4. Deploy!

Environment Variables

Required

Set these in Railway's environment variables:

# Firebase service account as JSON string (recommended for Railway)
FIREBASE_SERVICE_ACCOUNT_JSON='{"type":"service_account","project_id":"your-project",...}'

# OR use file path (less secure for cloud deployment)
# FIREBASE_SERVICE_ACCOUNT_PATH="/path/to/service-account.json"

# Optional API key for authentication
MCP_API_KEY="your-secret-api-key"

Getting Firebase Service Account

  1. Go to Firebase Console
  2. Select your project → Settings → Service Accounts
  3. Click "Generate new private key"
  4. Copy the entire JSON content and set as FIREBASE_SERVICE_ACCOUNT_JSON

Local Development

# Install dependencies
npm install

# Copy environment template
cp .env.example .env
# Edit .env with your Firebase credentials

# Run in development mode
npm run dev

# Build for production
npm run build
npm start

API Endpoints

Once deployed on Railway, your server will have:

  • Health Check: GET https://your-app.railway.app/health
  • MCP Endpoint: POST https://your-app.railway.app/mcp

Connecting MCP Clients

Claude Desktop Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "firebase-remote": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-fetch", "https://your-app.railway.app/mcp"],
      "env": {
        "AUTHORIZATION": "Bearer your-secret-api-key"
      }
    }
  }
}

Other MCP Clients

Configure any MCP client to connect to:

  • URL: https://your-app.railway.app/mcp
  • Transport: Streamable HTTP
  • Auth: Bearer your-secret-api-key (if MCP_API_KEY is set)

Available Tools

Firebase Authentication

  • firebase_get_user - Get user by UID
  • firebase_create_user - Create new user with email/password
  • firebase_list_users - List all users (with pagination)
  • firebase_delete_user - Delete user by UID

Firestore Database

  • firebase_get_document - Get single document
  • firebase_set_document - Create/overwrite document
  • firebase_update_document - Update specific fields
  • firebase_delete_document - Delete document
  • firebase_query_collection - Advanced collection queries with filters, ordering, limits

Example Usage

After connecting to Claude Desktop:

"Create a new user with email test@example.com and password secret123"

"Get all documents from the 'products' collection where price > 100, ordered by name"

"Update the user document in 'users' collection with ID 'user123' to set status to 'active'"

Security Considerations

  • Always use HTTPS in production (Railway provides this automatically)
  • Set MCP_API_KEY for authentication
  • Use Firebase security rules to restrict database access
  • Never expose service account keys in client-side code

Deployment Architecture

MCP Client (Claude Desktop)
    ↓ HTTPS + Streamable HTTP
Railway.com Server
    ↓ Admin SDK
Firebase Project (Auth + Firestore)

Local vs Official Firebase MCP

| Feature | This Server | Official Firebase CLI MCP | |---------|-------------|----------------------------| | Deployment | ✅ Railway.com | ❌ Local only (stdio) | | Transport | ✅ Streamable HTTP | ❌ Stdio only | | Remote Access | ✅ Yes | ❌ No | | Tools Count | 9 core tools | 40+ tools | | Maintenance | Custom | Google maintained |

Use this server for remote/cloud deployments. Use the official Firebase CLI MCP for local development.

Support

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.