npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

firebase-hosting-mcp-server

v1.0.1

Published

MCP server for deploying and managing Firebase Hosting projects. Works with Claude Code, Codex, Gemini CLI, and any MCP-compatible client.

Readme

🔥 Firebase Hosting MCP Server

Deploy and manage Firebase Hosting projects from any MCP-compatible AI client — Claude Code, Codex, Gemini CLI, Cursor, Windsurf, and more.

Stop repeating the same deploy steps. Let your AI assistant handle Firebase Hosting for you.

Features

| Tool | Description | |------|-------------| | firebase_hosting_init | Scaffold hosting config with auto-framework detection | | firebase_hosting_deploy | Build & deploy to production in one command | | firebase_hosting_preview | Deploy preview channels for PR reviews & demos | | firebase_hosting_harden | Apply production-grade security headers in one shot | | firebase_hosting_status | View releases, channels, and config at a glance | | firebase_hosting_rollback | Roll back to a previous release instantly | | firebase_hosting_configure | Modify firebase.json (rewrites, headers, redirects...) | | firebase_hosting_delete_channel | Clean up preview channels |

Auto-detects React, Vue, Vite, Next.js, Nuxt, Angular, Svelte, and Astro — sets the correct public dir, SPA rewrites, and cache headers automatically.

Prerequisites

  1. Node.js ≥ 18
  2. Firebase CLI installed and authenticated:
    npm install -g firebase-tools
    firebase login
  3. DjioniDev API key — get yours at djioni.dev

Installation

npm install -g firebase-hosting-mcp-server

Or run directly with npx:

npx firebase-hosting-mcp-server

Configuration

Claude Code

claude mcp add firebase-hosting -- npx firebase-hosting-mcp-server

Then set your API key:

export DJIONI_API_KEY="your-api-key"

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "firebase-hosting": {
      "command": "npx",
      "args": ["firebase-hosting-mcp-server"],
      "env": {
        "DJIONI_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor / Windsurf

Add to your MCP settings (.cursor/mcp.json or equivalent):

{
  "mcpServers": {
    "firebase-hosting": {
      "command": "npx",
      "args": ["firebase-hosting-mcp-server"],
      "env": {
        "DJIONI_API_KEY": "your-api-key"
      }
    }
  }
}

Codex / Gemini CLI / Other MCP Clients

Any client supporting the MCP stdio transport can use this server:

DJIONI_API_KEY="your-api-key" npx firebase-hosting-mcp-server

Usage Examples

Initialize a project

"Initialize Firebase Hosting for my React app in /Users/me/my-app with project ID my-app-prod"

The MCP will auto-detect React, set build/ as the public dir, enable SPA rewrites, and configure optimized cache headers.

Deploy to production

"Deploy my app to Firebase Hosting"

Builds the project, deploys, and returns the live URL.

Create a preview for a PR

"Deploy a preview channel called pr-42 for my app"

Creates a shareable URL like https://my-app--pr-42.web.app that expires in 7 days.

Check status

"What's the current status of my Firebase Hosting?"

Shows releases, preview channels, config summary, and auth info.

Rollback

"Roll back my Firebase Hosting to the previous release"

Instantly reverts to the last working version.

Add a redirect

"Add a redirect from /old-page to /new-page in my Firebase config"

Modifies firebase.json without touching anything else.

Harden security headers

"Harden the security headers on my Firebase Hosting"

Applies 9 production-grade security headers (CSP, HSTS, X-Frame-Options, Permissions-Policy, etc.) to firebase.json. Works with the standard preset for 95% of apps.

If your app uses external APIs or scripts, just tell it:

"Harden security with csp_connect_src pointing to https://api.myapp.com"

Use dry_run to preview before applying:

"Harden security with dry_run so I can see what changes"

Re-deploy after hardening to push headers live.

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | DJIONI_API_KEY | ✅ | Your DjioniDev API key | | DJIONI_LICENSE_API_URL | ❌ | Custom license API URL (default: Cloud Run backend) | | FIREBASE_HOSTING_MCP_KEY | ❌ | Alternative env var for the API key |

How It Works

This MCP server wraps the Firebase CLI (firebase-tools) and exposes it through the Model Context Protocol. Under the hood:

  1. License verification — before each tool call, verifies your API key via POST /v1/license/verify (checks key validity, scope, and deploy quota)
  2. Framework detection — reads package.json to identify your stack
  3. Smart config — generates optimized firebase.json with proper cache headers, SPA rewrites, and clean URLs
  4. CLI wrapper — executes firebase deploy, hosting:channel:deploy, etc. with --json for reliable parsing
  5. Usage tracking — after successful deploys, records usage via POST /v1/license/usage (fire-and-forget, won't block your deploy)

Billable vs Free actions

| Billable (counts against quota) | Free | |---|---| | firebase_hosting_deploy | firebase_hosting_init | | firebase_hosting_preview | firebase_hosting_status | | | firebase_hosting_configure | | | firebase_hosting_harden | | | firebase_hosting_rollback | | | firebase_hosting_delete_channel |

Key scoping

Your API key must have firebase-hosting-mcp in its scopes (or empty scopes = access to all DjioniDev products). This is configured when the key is created in the DjioniDev License API.

License

MIT — Built by DjioniDev