Gemini CLI Rag

Provides an MCP-based service to query Gemini CLI documentation via a local vector store.
  • typescript

7

GitHub Stars

typescript

Language

4 months ago

First Indexed

2 months 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": {
    "pedarias-gemini-cli-rag-mcp": {
      "command": "docker",
      "args": [
        "exec",
        "-i",
        "gemini-cli-mcp-container",
        "python",
        "gemini_cli_mcp.py"
      ],
      "env": {
        "YOUR_TOKEN": "TOKEN_VALUE"
      }
    }
  }
}

You run a local MCP server that exposes your documentation data as a queryable tool. This lets you ask natural-language questions and get precise, contextually grounded answers from your documentation through an MCP client like Gemini CLI, VS Code, or Cursor, streamlining learning and daily workflows.

How to use

You connect to the local MCP server from your MCP-enabled client. The server runs in a container and exposes a single stdio-based endpoint that the client launches and communicates with. You can ask questions about the Gemini CLI documentation and receive relevant passages in return. The flow is seamless: start the MCP server, configure your client, and start asking questions.

How to install

Prerequisites: Python 3.13, Node.js 18+, and an existing Gemini CLI installation or access to Gemini CLI tooling.

Step 1. Prepare your project directory and dependencies.

Step 2. Ensure you have the MCP server files in place: the vector store and the MCP runner script.

Step 3. Start the MCP service using Docker Compose.

Step 4. Configure Gemini CLI to connect to the local MCP server by adding the appropriate settings.

Configuration and usage notes

This setup uses a local STDIO MCP server command that runs inside a container. The MCP server exposes a tool named gemini_cli_query_tool, which retrieves relevant document chunks from the vector store and returns them to the client.

The containerized MCP server is typically started via Docker commands defined in a docker-compose configuration. You launch the MCP server container, then the Gemini CLI discovers it and routes questions through the tool.

Example starting point for the MCP service is provided in the deployment configuration, which shows how to invoke the server using Docker. Use this exact command pattern to ensure compatibility.

Troubleshooting and tips

If questions don’t return expected results, verify that the vector store file gemini_cli_vectorstore.parquet exists and is readable by the MCP runner. Ensure the container running gemini-cli-mcp-container is up and accessible. Restart the MCP container if you make changes to the vector store or docs.

Security considerations

Keep the MCP server isolated within your development environment. Do not expose the local MCP endpoint to untrusted networks. Manage access through your container runtime and ensure dependencies are kept up to date.

Examples of usage scenarios

  • Ask for a quick summary of the Gemini CLI basic usage.
  • Request a step-by-step guide to configuring Gemini CLI with the MCP server.
  • Query for troubleshooting steps if the CI build of Gemini CLI behaves unexpectedly.

What you get

A local, queryable copy of the Gemini CLI documentation, indexed and searchable, with answers derived from the original content. The system uses a RAG pipeline to retrieve the most relevant chunks and deliver concise, accurate responses.

Available tools

gemini_cli_query_tool

Retrieves the most relevant document chunks from the vector store for a given user query and returns them to the client.

docs://gemini-cli/full

Provides access to the full content of the documentation text file generated during data extraction.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
Gemini CLI Rag MCP Server - pedarias/gemini-cli-rag-mcp | VeilStrat