- Home
- MCP servers
- Firebase
Firebase
- python
0
GitHub Stars
python
Language
2 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"lt012071-dam-firebase-mcp-server": {
"command": "python",
"args": [
"/path/to/mcp-server/main.py",
"--google-credentials",
"/path/to/your/service-account-credentials.json",
"--transport",
"stdio"
],
"env": {
"PYTHONPATH": "/path/to/mcp-server"
}
}
}
}You set up a Python-based MCP server that provides secure, MCP-compliant access to Firebase Firestore and Storage for a Digital Asset Management workflow. It lets you query asset data, version histories, comments, and storage files through standardized MCP tools, with options for both local (stdio) and HTTP transports.
How to use
You run the MCP server locally and connect with an MCP client to perform read-only queries against Firestore collections and the Storage bucket. Use the stdio transport for local development and testing, or HTTP transport to expose the server over a network. After starting, your client can search assets, versions, comments, and files in storage using the available MCP tools.
How to install
Prerequisites You need Python 3.11 or higher and a Firebase project with Firestore and Storage enabled. You also require a Google Cloud service account JSON file with appropriate permissions.
Install dependencies First, install the Python packages specified for this server.
pip install -r requirements.txt
Run the server with stdio transport (for MCP clients) using your service account credentials.
python main.py --google-credentials /path/to/service-account.json --transport stdio
Run the server with HTTP transport (for web access) once you’re ready to expose it over the network. Note that you should provide a reachable host/port and ensure credentials are securely managed.
python main.py --google-credentials /path/to/service-account.json --transport http --host 0.0.0.0 --port 8000
Enable debug logging during startup if you need more visibility into initialization and request handling.
python main.py --google-credentials /path/to/service-account.json --debug
Configuration and security notes
Configuration details include a dedicated MCP server configuration that binds to the stdio transport for local use. Environment variables are supported where shown in examples, and credentials must be supplied via the service account JSON file.
Security considerations Always use a service account with restricted permissions. Do not commit credentials files to version control. Access is designed to be read-only to safeguard assets.
Docker and containerized deployment
The server can be deployed in Docker. Build the image from the Docker configuration and run with Docker Compose or a direct container run command to expose the desired port.
Service account setup and usage
Create a service account in your Firebase project, download the JSON credentials file, and configure the server to use these credentials. Grant necessary permissions for Firestore and Storage as required by your access patterns.
Important security note: Never commit credentials files to version control and limit access to the credentials file on the host.
Examples of available tools you can use through MCP
The server exposes tools to query assets, their versions, comments, and storage files. You can search assets by category, tags, uploader, and date ranges; search versions by asset and update date; search comments by asset and creation date; and search storage files by prefix and upload date.
Available tools
search_assets
Query the Firestore assets collection for assets with filters such as category, tags, visibility, and date ranges.
search_versions
Query the Firestore versions collection to retrieve asset versions, including file URLs and metadata.
search_comments
Query the Firestore comments collection to fetch comments tied to assets with timestamps.
search_asset_files
Search files in the Firebase Storage bucket, returning metadata like name, size, contentType, and download URLs.