Firebase Docs MCP Server Setup

Firebase Docs MCP Server Setup

By nohe427 GitHub

This is a sample for showing how to do FIrebase Docs as an MCP server (including indexing documents)

firebase mcp
Overview

What is Firebase Docs MCP?

Firebase Docs MCP is a server setup project that demonstrates how to index Firebase documentation using the Model Context Protocol (MCP). It includes components for indexing documents and serving them over a protocol server.

How to use Firebase Docs MCP?

To use Firebase Docs MCP, you need to set up an API key, index the Firebase documents, and then test the server using the provided commands in the documentation.

Key features of Firebase Docs MCP?

  • Indexing Firebase documentation into markdown format.
  • SQL lite database integration for indexed documents.
  • Model Context Protocol server for serving indexed content.

Use cases of Firebase Docs MCP?

  1. Indexing and serving Firebase documentation for easy access.
  2. Testing the MCP server with various tools and requests.
  3. Integrating Firebase documentation into applications using the MCP server.

FAQ from Firebase Docs MCP?

  • What is the purpose of the API key?

The API key is required to access the Gemini embedding model used for indexing documents.

  • How do I handle indexing failures?

The project includes a retry strategy to reindex documents if the initial indexing fails.

  • Can I test the server locally?

Yes! You can test the server locally by following the provided commands in the documentation.

Content

Firebase Docs MCP Server Setup

Directory Layout

docs-mcp

This corresponds to the indexer for Firebaes docs. This is a Go project that goes and indexes the Firebase documents contained within the listed filepaths.

docs-mcp-server

This is the model context protocol server that serves content over a stdio transport.

genkit-mcp-tester

This is a genkit implementation of an MCP client to test using the docs-mcp-server.

How to use

Start with indexing

  1. Set the API Key. We are using the Gemini embedding model for the documents so getting an API key from AI Studio is required. To set the API key, call export genaikey="APIKEY" in your terminal

  2. Ensure that the output directory is empty. We are writing files to your home directory in a folder called .indexResp. As go fetches documents from the Firebase documentation site, it writes the files to disk in markdown format and also indexes them in a SQL lite database in this directory. If indexing fails, it performes a retry strategy to reindex the documents into a markdown format.

  3. From the docs-mcp folder, call go run . This will start the indexing process on the files listed near line 291 in the main.go file.

Test the indexer

  1. Set the API Key. We are using the Gemini embedding model for the documents so getting an API key from AI Studio is required. To set the API key, call export genaikey="APIKEY" in your terminal

  2. Switch into the docs-mcp-server folder.

  3. Copy the indexed database to the local docs-mcp-server folder. This can be done by calling cp $HOME/.indexResp/db.sqlite .

  4. Install the dependencies and build the project. npm ci and then npm run build. Once the project is built, you can then test the project by calling npm run build && npx @modelcontextprotocol/inspector node build/index.js. This starts the inspector and should print a URL for you to view the STDIO server with.

  5. Click on Connect in the inspector view, and then click on tools -> List Tools -> find-firebase-doc and then type in for your request that you would want to use. NOTE: The author has had trouble using the terminal built into VSCode for running this step, so if you run into a similar issue, try the system terminal.

Use Genkit for testing

  1. Set the API key in the code by changing this line in embedding.ts from : const genAiKey = process.env.genaikey || ""; to const genAiKey = process.env.genaikey || "MYAPIKEY";

  2. Switch into the genkit-mcp-tester directory.

  3. Copy the indexed database to the local genkit-mcp-tester folder. This can be done by calling cp $HOME/.indexResp/db.sqlite .

  4. Install the dependencies and build the project. npm ci and then npm run build. Once the project is built, you can then test the project by calling npx genkit start -- npx tsx --watch src/index.ts. This starts the Genkit DevUI where you can interact with the flow and tool directly. Open the DevUI, generally http://localhost:4000 and visit the Tools -> find-firebase-doc/find-firebase-doc tool and make a request here. You can see that the request is then returning the results we see in the modelcontextprotocol/inspector.

No tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details