@perufitlife/firebase-security-mcp
v0.1.0
Published
MCP server for Firebase Firestore Rules security: audit local rules files, probe deployed projects anonymously, preview fixes.
Maintainers
Readme
Firebase Security MCP server
MCP server exposing the firebase-security auditor as tools any MCP-compatible AI agent (Claude Code, Cursor, Cline, etc) can call.
Tools
audit_rules— scan afirestore.rulesfile (and optionally probe a deployed project ID). Detectsmatch /{document=**} { if true; }, bareif true,auth != nullwithout ownership, expired test-mode timestamp rules, public storage reads, missing default-deny.list_findings— list cached findings, filterable by severity.preview_fix— show the rule snippet that closes a given finding (paste into your firestore.rules, thenfirebase deploy --only firestore:rules).
Install
npx -y @perufitlife/firebase-security-mcpClaude Code config
Add to ~/.config/claude-desktop/config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"firebase-security": {
"command": "npx",
"args": ["-y", "@perufitlife/firebase-security-mcp"],
"env": {
"FIREBASE_RULES_PATH": "/path/to/firestore.rules",
"FIREBASE_PROJECT_ID": "my-firebase-project"
}
}
}
}Both env vars are optional — you can pass rules_path / project_id per tool call.
Active probe
If you provide project_id, the auditor sends an unauthenticated GET to:
https://firestore.googleapis.com/v1/projects/{project-id}/databases/(default)/documentsIf documents come back, the deployed DB is leaking and the finding is confirmed: true with document count + bytes returned + sample paths.
Source + license
MIT. CLI/skill repo: https://github.com/Perufitlife/firebase-security-skill
For the full BaaS family (MCP servers for Supabase, PocketBase, Appwrite, Hasura/Nhost), see https://github.com/Perufitlife.
