Welcome to the Gemini CLI integration guide. This guide will help you connect ByteRover with Gemini CLI, providing Google’s AI with persistent memory of your coding patterns and solutions.

What You’ll Need

  • Gemini CLI installed and configured
  • A ByteRover account

Getting Started

1. Start the Connection

Go to your ByteRover dashboard and:
  1. Find the “Connect your agent” section
  2. Click on Gemini CLI from the list
  3. Hit the “Connect with Gemini CLI” button

2. Connect ByteRover to Gemini CLI

Step 1: Open your Gemini settings file:
~/.gemini/settings.json
Step 2: Add the following MCP server block:
{
  "mcpServers": {
    "byterover-mcp": {
      "httpUrl": "https://mcp.byterover.dev/v2/mcp",
      "headers": {
        "Authorization": "Bearer [DASHBOARD_TOKEN]"
      }
    }
  }
}
Step 3: Reload Gemini CLI to apply changes. Run /mcp to confirm your connection. You should see byterover-mcp listed with available tools.

Test It

Try storing a pattern:
Store this async retry utility to ByteRover:

async function retry(fn, maxAttempts = 3, delay = 1000) {
  for (let attempt = 1; attempt <= maxAttempts; attempt++) {
    try {
      return await fn();
    } catch (error) {
      if (attempt === maxAttempts) {
        throw error;
      }
      await new Promise(resolve => setTimeout(resolve, delay * attempt));
    }
  }
}
Gemini should confirm successful storage.

Benefits

Troubleshooting

Join our Discord community for Gemini CLI tips and support.