firebase-mcp
firebase-mcp: MCP server for LLMs to access Firebase services securely. Supports Authentication, Firestore, and Storage.

firebase-mcp Solution Overview
Firebase MCP Server is a powerful tool that bridges the gap between AI models and Firebase services using the Model Context Protocol (MCP). As an MCP server, it enables LLM clients to securely access Firebase Authentication, Firestore, and Storage. This allows developers to build AI-powered applications that leverage Firebase's robust backend infrastructure.
Key features include tools for user management, database operations, and file storage, all accessible through a standardized MCP interface. By handling authentication and connection management, Firebase MCP Server simplifies the integration process, saving developers time and effort. The server interacts seamlessly with AI models, providing them with the necessary context and data to perform tasks such as retrieving user information, storing data, and managing files. This empowers developers to create intelligent applications with enhanced functionality and a more engaging user experience. Installation is streamlined through npx
or manual configuration, making it easy to integrate into existing projects.
firebase-mcp Key Capabilities
Firebase Authentication Integration
Firebase-mcp provides seamless integration with Firebase Authentication, enabling AI models to securely access user data and manage user identities. This is achieved through the auth_get_user
tool, which allows the AI model to retrieve user details using either a user ID or email address. The tool leverages the Firebase Admin SDK to interact with the Firebase Authentication service, ensuring secure and reliable user data retrieval. This feature is crucial for AI applications that require personalized experiences or access control based on user roles and permissions. For example, an AI-powered customer service chatbot could use this tool to identify the user and retrieve their account information from Firebase, providing a more personalized and efficient support experience. The implementation involves using the Firebase Admin SDK's getUser
or getUserByEmail
methods, handling potential errors such as user not found, and returning the user data in a structured JSON format.
Firestore Document Management
Firebase-mcp offers a suite of tools for interacting with Firestore, Firebase's NoSQL document database. These tools empower AI models to read, write, update, and delete data within Firestore collections. The available tools include firestore_add_document
, firestore_get_document
, firestore_update_document
, firestore_delete_document
, firestore_list_documents
, and firestore_list_collections
. This comprehensive set of tools allows AI models to leverage Firestore as a persistent storage layer for various applications. For instance, an AI-powered content management system could use these tools to store and retrieve articles, user profiles, and other content-related data. The implementation involves using the Firebase Admin SDK to interact with Firestore, handling data serialization and deserialization, and ensuring data consistency and security. Each tool maps directly to a corresponding Firestore operation, providing a straightforward and intuitive interface for AI models to interact with the database.
Firebase Storage Access
Firebase-mcp facilitates access to Firebase Storage, enabling AI models to store and retrieve files. The storage_list_files
tool allows listing files within a specified directory, while the storage_get_file_info
tool retrieves file metadata and a download URL for a given file path. This functionality is essential for AI applications that require handling multimedia content, such as image recognition, video analysis, or audio processing. For example, an AI-powered image analysis tool could use these tools to access images stored in Firebase Storage, perform analysis, and store the results back in Firestore. The implementation involves using the Firebase Admin SDK to interact with Firebase Storage, handling file uploads and downloads, and managing file metadata. The tools provide pagination support for handling large numbers of files, ensuring efficient and scalable access to storage resources.
Simplified Installation via npx
Firebase-mcp offers a streamlined installation process using npx
, allowing developers to quickly deploy and configure the server without manual installation steps. This approach simplifies the setup process by automatically downloading and running the latest version of the Firebase-mcp package directly from the npm registry. The npx
command eliminates the need for global installation, reducing the risk of dependency conflicts and ensuring that developers are always using the most up-to-date version of the server. This feature significantly lowers the barrier to entry for developers who want to integrate Firebase services with their AI models, enabling them to focus on building innovative applications rather than managing complex infrastructure. The configuration involves specifying the npx
command and necessary environment variables in the MCP settings file, allowing the AI client to automatically launch and connect to the Firebase-mcp server.