firebase-mcp
MCP ServerFree๐ฅ Model Context Protocol (MCP) server for Firebase.
Capabilities12 decomposed
firestore document crud operations via mcp tool registry
Medium confidenceExposes Firestore read, write, update, and delete operations as standardized MCP tools that AI clients can invoke. The FirebaseMcpServer class registers individual tool handlers (firestore_add_document, firestore_get_document, firestore_update_document, firestore_delete_document) that map directly to Firestore SDK methods, with schema-based parameter validation and error handling that converts Firebase exceptions into structured MCP responses. Each tool accepts collection path and document data as parameters, executes the operation against the initialized Firebase instance, and returns typed results (document IDs, success confirmations, or error details).
Implements Firestore operations as discrete MCP tools with schema-based parameter validation and structured error handling, allowing AI clients to perform database operations through a standardized tool-calling interface rather than direct SDK access. The tool registry pattern (src/index.ts 477-1334) enables fine-grained permission control per operation type.
Provides safer, more auditable Firestore access than direct SDK exposure because each operation is a registered tool with explicit schema validation, whereas direct Firebase SDK access in AI contexts risks uncontrolled data mutations.
firestore document listing and filtering via collection traversal
Medium confidenceImplements firestore_list_documents and firestore_list_collections tools that traverse Firestore collection hierarchies and return paginated document snapshots. The implementation queries collections using the Firestore SDK, optionally applies client-side filtering based on field predicates passed as parameters, and returns structured arrays of documents with metadata. The tool supports nested collection discovery (listing subcollections within documents) and basic field-based filtering without requiring complex WHERE clause syntax, making it accessible to AI clients that may not be familiar with Firestore query syntax.
Provides simplified collection listing and field-based filtering as MCP tools, abstracting away Firestore's query syntax complexity. The implementation uses client-side filtering (src/index.ts) rather than server-side WHERE clauses, making it more accessible to AI clients but less performant on large datasets.
Easier for AI agents to use than raw Firestore queries because it exposes simple field-matching as tool parameters, whereas direct Firestore SDK requires understanding query builder syntax that LLMs may struggle with.
storage file listing with path prefix filtering and metadata
Medium confidenceImplements storage_list_files tool that enumerates files in a Firebase Storage bucket with optional path prefix filtering. The tool queries the Storage bucket using the Admin SDK's listFiles() method, optionally filters results by a path prefix (e.g., 'uploads/2024/'), and returns an array of file metadata including name, size, creation date, and content type. The implementation supports pagination through a maxResults parameter, allowing large buckets to be enumerated incrementally. Results are returned as structured objects with file paths and metadata, enabling AI clients to discover and analyze bucket contents.
Provides bucket enumeration with prefix filtering as an MCP tool, enabling AI clients to discover Storage contents without direct SDK access. The implementation uses Firebase Admin SDK's listFiles() method with optional prefix filtering.
More discoverable than direct SDK access because it abstracts bucket enumeration into a tool with clear parameters, whereas raw SDK requires understanding pagination tokens and file object structures.
firestore document addition with auto-generated id support
Medium confidenceImplements firestore_add_document tool that creates new documents in Firestore collections with either auto-generated or specified document IDs. The tool accepts a collection path and document data, and optionally a document ID. If no ID is provided, Firestore generates a unique ID automatically using its ID generation algorithm. The implementation uses the Firestore SDK's add() method (for auto-ID) or set() method (for specified IDs), both of which are atomic operations. The tool returns the generated or specified document ID and optionally the full document snapshot, enabling AI clients to reference newly created documents.
Exposes Firestore's document creation with both auto-generated and specified IDs as an MCP tool, allowing AI clients to create documents and receive generated IDs for subsequent operations. The implementation uses Firestore's add() and set() methods appropriately.
More convenient than direct SDK usage because the tool handles ID generation and returns the ID in the response, whereas raw SDK requires separate calls to get the generated ID.
firebase storage file upload and download via mcp tools
Medium confidenceExposes Firebase Storage operations (storage_upload_file, storage_download_file, storage_list_files) as MCP tools that handle file I/O through the Storage SDK. The upload tool accepts base64-encoded file content and a destination path, writes to Storage, and returns a public download URL. The download tool retrieves files by path and returns base64-encoded content. The list tool enumerates files in a Storage bucket with optional path prefix filtering. All operations include error handling for authentication failures, missing files, and quota exceeded scenarios, with results formatted as structured MCP responses.
Implements Storage operations as MCP tools with base64 content encoding, allowing AI clients to handle binary files through text-based tool parameters. The approach trades efficiency for compatibility with text-only MCP transports, enabling file operations in environments where binary protocols aren't available.
Safer than exposing Storage SDK directly because file operations are mediated through registered tools with explicit parameter validation, whereas direct SDK access could allow uncontrolled file deletion or overwriting.
firebase authentication user retrieval and metadata access
Medium confidenceExposes Firebase Authentication operations (auth_get_user, auth_list_users) as MCP tools that query the Firebase Auth service. The get_user tool retrieves a specific user's profile by UID or email, returning user metadata (creation date, last sign-in, email verification status, custom claims). The list_users tool enumerates all users in the project with pagination support. Both tools return sanitized user data (no password hashes or sensitive credentials) and include error handling for missing users or permission issues. The implementation uses the Firebase Admin SDK's Auth module to access user records.
Provides read-only access to Firebase Auth user metadata through MCP tools, sanitizing sensitive fields and exposing only user profile information. The implementation uses the Firebase Admin SDK's Auth module (src/index.ts) to query user records without exposing credential management capabilities.
Safer than exposing Auth SDK directly because it restricts operations to read-only queries and sanitizes responses, whereas direct SDK access could allow credential modification or user deletion.
mcp transport abstraction with http and stdio support
Medium confidenceImplements a transport layer that supports both HTTP and STDIO protocols for MCP communication, allowing the Firebase MCP server to integrate with different AI client architectures. The server initializes with a configurable transport mechanism (via environment variable or constructor parameter), handles protocol-specific serialization/deserialization, and manages connection lifecycle. HTTP transport exposes the MCP server on a specified port with standard HTTP request/response handling, while STDIO transport reads from stdin and writes to stdout, enabling integration with CLI-based AI tools and local development environments. The transport abstraction is handled by the MCP SDK, with the Firebase server providing configuration and tool registration.
Provides dual-transport support (HTTP and STDIO) through MCP SDK abstraction, allowing the same Firebase tool registry to serve both network-based clients (Claude Desktop, Cursor) and local CLI tools. The transport selection is environment-driven, enabling deployment flexibility without code changes.
More flexible than single-transport implementations because it supports both network and local communication patterns, whereas Firebase SDK alone requires direct code integration without protocol abstraction.
firebase initialization and credential management via environment configuration
Medium confidenceHandles Firebase project initialization by reading service account credentials from environment variables or configuration files and initializing the Firebase Admin SDK. The FirebaseMcpServer constructor accepts a Firebase config object or reads from GOOGLE_APPLICATION_CREDENTIALS environment variable, validates the configuration, and initializes Firestore, Storage, and Auth service instances. The implementation follows Firebase Admin SDK patterns, creating singleton service instances that are reused across all tool handlers. Error handling includes validation of credential format, project ID verification, and graceful failure if Firebase services are unavailable.
Implements Firebase initialization through environment-driven configuration, allowing credential management without code changes. The approach uses Firebase Admin SDK's standard initialization patterns (src/index.ts 96-124) with support for both explicit config objects and GOOGLE_APPLICATION_CREDENTIALS environment variable.
More secure than hardcoding credentials because it externalizes credential management to environment variables, whereas embedding credentials in code or configuration files creates security risks.
mcp tool registration and schema-based parameter validation
Medium confidenceImplements a tool registration system where each Firebase operation (Firestore CRUD, Storage operations, Auth queries) is registered as a named MCP tool with a JSON schema that defines required parameters, types, and descriptions. The FirebaseMcpServer class registers tools using the MCP SDK's tool registration API (src/index.ts 477-1334), providing each tool with a schema that specifies parameter names, types (string, number, boolean, object), required fields, and descriptions. When an AI client calls a tool, the MCP framework validates parameters against the schema before invoking the handler, ensuring type safety and providing clear error messages for invalid inputs. The schema-based approach enables AI clients to discover available tools and their parameter requirements without documentation.
Uses JSON schema-based parameter validation for all Firebase operations, enabling AI clients to discover tool signatures and validate inputs before execution. The schema registry pattern (src/index.ts 477-1334) provides type safety and self-documenting tool interfaces.
More discoverable and safer than untyped tool calling because schemas enable clients to understand parameter requirements and validate inputs, whereas untyped APIs require documentation and allow invalid calls to reach the server.
firestore document update with partial data merging
Medium confidenceImplements firestore_update_document tool that performs partial document updates using Firestore's merge semantics. Unlike add/set operations that replace entire documents, the update tool accepts a partial data object and merges it with existing document fields, preserving unspecified fields. The implementation uses the Firestore SDK's update() method which applies field-level updates atomically, supporting nested field updates via dot notation (e.g., 'user.profile.name'). The tool validates that the document exists before updating and returns the updated document snapshot or an error if the document is not found.
Implements Firestore's merge-based update semantics as an MCP tool, allowing AI clients to perform field-level updates with dot notation support. The implementation uses Firestore's update() method which provides atomic field-level updates while preserving unspecified fields.
More precise than full document replacement because it updates only specified fields while preserving others, whereas set() operations would overwrite the entire document.
error handling and structured exception translation to mcp responses
Medium confidenceImplements comprehensive error handling across all Firebase operations, catching Firebase SDK exceptions (auth errors, permission denied, not found, quota exceeded) and translating them into structured MCP error responses. The error handling layer (src/index.ts 477-1334) wraps each tool handler in try-catch blocks, maps Firebase-specific error codes to human-readable messages, and returns error details in the MCP response format. Common error scenarios include missing documents (DOCUMENT_NOT_FOUND), permission failures (PERMISSION_DENIED), authentication issues (UNAUTHENTICATED), and quota limits (RESOURCE_EXHAUSTED). The implementation preserves error context (original error code, message) while providing clear guidance to AI clients about what went wrong.
Translates Firebase SDK exceptions into structured MCP error responses with human-readable messages and error codes, enabling AI clients to understand and handle failures appropriately. The error mapping layer (src/index.ts) preserves Firebase error context while providing clear guidance.
More informative than raw SDK exceptions because it maps Firebase-specific errors to MCP response format with clear messages, whereas unhandled exceptions would crash the server or return opaque error details.
firestore document deletion with existence validation
Medium confidenceImplements firestore_delete_document tool that removes documents from Firestore collections with optional existence checking. The tool accepts a collection path and document ID, validates that the document exists (optional), and executes the delete operation. The implementation uses Firestore's delete() method which is atomic and idempotent (deleting a non-existent document succeeds silently). The tool can be configured to fail if the document doesn't exist (strict mode) or succeed regardless (lenient mode), providing flexibility for different workflow requirements. Deletion is permanent and cannot be undone through the MCP interface.
Exposes Firestore's atomic delete operation as an MCP tool with optional existence validation, allowing AI clients to remove documents safely. The implementation uses Firestore's delete() method which is idempotent and atomic.
Safer than direct SDK deletion because the tool can validate document existence before deletion and provide clear error messages, whereas raw SDK calls could silently delete non-existent documents.
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with firebase-mcp, ranked by overlap. Discovered automatically through the match graph.
Firebase MCP Server
Manage Firebase Firestore, Auth, and Storage via MCP.
@iflow-mcp/db-mcp-tool
Database Explorer MCP Tool - PostgreSQL, MySQL ve Firestore veritabanlarฤฑ iรงin yรถnetim aracฤฑ
@agent-infra/mcp-server-filesystem
MCP server for filesystem access
@modelcontextprotocol/server-filesystem
MCP server for filesystem access
Paperless-MCP
** - An MCP server for interacting with a Paperless-NGX API server. This server provides tools for managing documents, tags, correspondents, and document types in your Paperless-NGX instance.
@adisuryanathanael/mcp-server-filesystem2
MCP-compatible server tool for filesystem access from https://github.com/adisuryanathan/modelcontextprotocol-servers.git
Best For
- โTeams building AI agents that need persistent data storage in Firestore
- โDevelopers integrating Firebase into MCP-compatible AI applications (Claude, Cursor, VS Code)
- โBuilders prototyping AI workflows that require structured database operations without direct credential exposure
- โAI agents performing data discovery or inventory tasks
- โNon-technical users who want AI to explore their Firestore data
- โDevelopers building AI workflows that need to find documents by simple field matching
- โStorage auditing and inventory workflows
- โAI agents that need to discover available files before processing
Known Limitations
- โ No built-in transaction support โ each operation is atomic but multi-document transactions must be orchestrated by the client
- โ No real-time listener support โ only point-in-time reads and writes, no subscription-based updates
- โ Filtering and querying limited to basic collection listing; complex WHERE clauses require client-side filtering of results
- โ No batch operation optimization โ bulk writes execute as individual tool calls, adding latency for large datasets
- โ No support for complex queries (compound WHERE clauses, range queries, ordering) โ filtering is field-equality only
- โ No pagination cursor support โ results are limited to a fixed page size, requiring multiple calls for large collections
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Last commit: Oct 27, 2025
About
๐ฅ Model Context Protocol (MCP) server for Firebase.
Categories
Alternatives to firebase-mcp
โญAI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.๐ฏ ๅๅซไฟกๆฏ่ฟ่ฝฝ๏ผไฝ ็ AI ่ๆ ็ๆงๅฉๆไธ็ญ็น็ญ้ๅทฅๅ ท๏ผ่ๅๅคๅนณๅฐ็ญ็น + RSS ่ฎข้ ๏ผๆฏๆๅ ณ้ฎ่ฏ็ฒพๅ็ญ้ใAI ๆบ่ฝ็ญ้ๆฐ้ป + AI ็ฟป่ฏ + AI ๅๆ็ฎๆฅ็ดๆจๆๆบ๏ผไนๆฏๆๆฅๅ ฅ MCP ๆถๆ๏ผ่ต่ฝ AI ่ช็ถ่ฏญ่จๅฏน่ฏๅๆใๆ ๆๆดๅฏไธ่ถๅฟ้ขๆต็ญใๆฏๆ Docker ๏ผๆฐๆฎๆฌๅฐ/ไบ็ซฏ่ชๆใ้ๆๅพฎไฟก/้ฃไนฆ/้้/Telegram/้ฎไปถ/ntfy/bark/slack ็ญๆธ ้ๆบ่ฝๆจ้ใ
Compare โThe first "code-first" agent framework for seamlessly planning and executing data analytics tasks.
Compare โRevolutionizes healthcare documentation, saving time, enhancing care, Epic-integrated...
Compare โAre you the builder of firebase-mcp?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search โ