Gemini CLI Setup
Configure Berry as an MCP server in Gemini CLI
Prerequisites
- Berry installed (
pip install berryorpipx install berry) - Berry authenticated (
berry auth login; orberry auth setfor CI/headless)
Option 1: Run berry init
The simplest way. From your project root:
berry initThis creates .gemini/settings.json with the Berry server configuration.
Use Berry skills in Gemini CLI
Gemini CLI supports slash commands (for example /help and /chat). If you don't see Berry prompts listed, paste a prompt like the examples below.
Search & Learn (verified)
Workflow: Search & Learn
Use the search_and_learn_verified skill.
Question: How does <feature> work in this repo? Cite evidence spans and verify.RCA Fix Agent
Workflow: Refactoring & Bug Fixes
Use the rca_fix_agent skill.
Bug: <describe failure + repro steps>. Provide root cause, fix, and tests.Option 2: Manual configuration
Create .gemini/settings.json in your project root:
{
"mcpServers": {
"berry": {
"command": "berry",
"args": ["mcp", "--server", "classic"],
"env": {
"OPENAI_API_KEY": "sk-...",
"BERRY_SERVICE_URL": "http://..."
}
}
}
}Tip: if you run berry auth login first, berry init will embed env defaults from ~/.berry/mcp_env.json for you.
Verify it works
- Start Gemini CLI in your project directory
- Check that Berry tools are available
- Try: "List available Berry spans" to confirm the connection
Config file location
| File | .gemini/settings.json |
| Format | JSON |
| Scope | Per-project (in project root) |