home / mcp / firebase rules mcp server

Firebase Rules MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-firebase-rules-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "A JSON string containing the configuration",
        "SECURITY": "Environment variables for security parameters (e.g., API keys)",
        "CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

You run an MCP server that exposes the Firebase Rules API, enabling clients to discover, validate, and contextually interact with rules through a consistent protocol. This server is designed to connect to a predefined OpenAPI surface and provide a reliable runtime for local or remote MCP clients to communicate with the Firebase Rules API.

How to use

Start the MCP server in stdio mode to run it locally and interact with your MCP client via standard input/output streams. You can initiate the server with the provided runtime command and then connect your MCP client to the session. Use the environment-based controls to point the server at a local or configured configuration if needed.

How to install

Prerequisites you need before starting the server are Python 3.9 or later, and the package manager tools pip and uv.

# Clone the MCP server repository (replace with the actual URL if you have it locally)
# git clone <repository-url>
# cd mcp-server

# Install dependencies (preferred in a dev environment)
pip install -e ".[dev]"

# Alternatively, using uv for editable install
uv pip install --editable ".[dev]"

Running the server in stdio mode requires Python to execute the main MCP runner script.

python mcp_server/main.py stdio

Configuration and start-up notes

You can configure the server using environment variables. The following are commonly used in this runtime:

{
  "CONFIG_PATH": "mcp_server/mcp_config.json",
  "CONFIG": "{\"server\":{\"name\":\"firebase_rules\"}}",
  "SECURITY": "API_KEYS, tokens, or other security parameters as needed"
}

Available tools

ruff

Linter and formatter used to enforce code quality and consistent style

static-analysis

Static analysis script that runs type checks and security reviews

tests

Test suite executed to validate functionality and generate coverage

pre-commit

Pre-commit hooks configured to run before each commit