MCP Server Firebase

by sheep52031

161 downloads
Not rated
GitHub

Description

# MCP Server Firebase 這是一個基於 Firebase 的 Model Context Protocol (MCP) 服務器實現,提供兩種運行模式: 1. 本地 Node.js 模式 (使用 Firebase Admin SDK) 2. Cloudflare Workers 模式 (使用 Firebase REST API) ## 功能 - Firestore 資料庫操作 (讀取、寫入、更新、刪除文檔) - 集合和子集合的列表查詢 - 支援過濾條件的查詢 ## 必要條件 - Node.js 18 或更高版本 - Firebase…

About

# MCP Server Firebase 這是一個基於 Firebase 的 Model Context Protocol (MCP) 服務器實現,提供兩種運行模式: 1. 本地 Node.js 模式 (使用 Firebase Admin SDK) 2. Cloudflare Workers 模式 (使用 Firebase REST API) ## 功能 - Firestore 資料庫操作 (讀取、寫入、更新、刪除文檔) - 集合和子集合的列表查詢 - 支援過濾條件的查詢 ## 必要條件 - Node.js 18 或更高版本 - Firebase 專案 - Firebase 服務帳號 (用於本地模式) - Firebase…

Details

Author
sheep52031
Downloads
161
Categories
Cloud Service

- Firestore document CRUD operations (create, read, update, delete)
- Query collections and subcollections with filters
- Dual deployment: local Node.js or Cloudflare Workers
- Uses MCP protocol for standardized AI tool integration
- Supports serverless environments via Firebase REST API

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Server Firebase
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

After installing dependencies with npm install, configure the server according to your chosen mode. For local mode, set the SERVICE_ACCOUNT_KEY_PATH environment variable to your Firebase service account key. For Workers mode, configure FIREBASE_PROJECT_ID, FIREBASE_API_KEY, and FIREBASE_AUTH_DOMAIN in wrangler.toml or as Cloudflare Secrets. Run npm run dev for local mode, npm run dev:worker for Workers development, or npm run dev:all for both. Connect your MCP client to the server endpoint (e.g., http://localhost:8765 for local) and use tools such as mcp_firebase_mcp_firestore_add_document to interact with Firestore.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp server firebase": {
            "mcp-server-firebase-sheep52031": {
                "command": "npx",
                "args": [
                    "wrangler",
                    "secret",
                    "put",
                    "FIREBASE_PROJECT_ID"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-firebase-sheep52031": {
        "command": "npx",
        "args": [
            "wrangler",
            "secret",
            "put",
            "FIREBASE_PROJECT_ID"
        ]
    }
}

MCP Server Firebase

這是一個基於 Firebase 的 Model Context Protocol (MCP) 服務器實現,提供兩種運行模式:

1. 本地 Node.js 模式 (使用 Firebase Admin SDK)
2. Cloudflare Workers 模式 (使用 Firebase REST API)

功能

- Firestore 資料庫操作 (讀取、寫入、更新、刪除文檔)
- 集合和子集合的列表查詢
- 支援過濾條件的查詢

必要條件

- Node.js 18 或更高版本
- Firebase 專案
- Firebase 服務帳號 (用於本地模式)
- Firebase Web API 密鑰 (用於 Cloudflare Workers 模式)

安裝

1. 克隆此專案:

git clone https://github.com/[您的用戶名]/mcp-server-firebase.git
cd mcp-server-firebase

2. 安裝依賴:

npm install

配置

本地模式配置 (Firebase Admin SDK)

1. 從 Firebase 控制台下載服務帳號金鑰檔案:
- 前往 Firebase 控制台 > 專案設置 > 服務帳號 > 生成新的私鑰

2. 將下載的 JSON 文件保存到專案目錄中 (檔名不重要,但請記住路徑)

3. 設置環境變量:

export SERVICE_ACCOUNT_KEY_PATH="/path/to/your-service-account.json"

Cloudflare Workers 模式配置

1. 更新 wrangler.toml 文件中的環境變量:
- FIREBASE_PROJECT_ID: 您的 Firebase 專案 ID
- FIREBASE_API_KEY: 您的 Firebase Web API 密鑰
- FIREBASE_AUTH_DOMAIN: 通常是 [PROJECT_ID].firebaseapp.com

2. 或者使用 Cloudflare Secrets 設置環境變量:

npx wrangler secret put FIREBASE_PROJECT_ID
npx wrangler secret put FIREBASE_API_KEY
npx wrangler secret put FIREBASE_AUTH_DOMAIN

運行

本地模式 (Firebase Admin SDK)

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.