Google's Gemini CLI is a terminal-first agent that supports Model Context Protocol servers, which means you can extend it with third-party tools like Scavio for real-time search. Out of the box, Gemini CLI grounding lags behind a live Google SERP. Wiring in Scavio's MCP server gives you five platforms of live data in one config step.
Prerequisites
- Node.js 20+ installed
- Gemini CLI installed via npm install -g @google/gemini-cli
- A Scavio API key from scavio.dev
- Basic familiarity with JSON config files
Walkthrough
Step 1: Install Gemini CLI
Install Google's terminal agent globally.
npm install -g @google/gemini-cliStep 2: Export your Scavio API key
Set the key as an environment variable so the MCP server can read it.
export SCAVIO_API_KEY="sk_live_your_key_here"Step 3: Add Scavio to the Gemini config
Open ~/.gemini/config.json and add the Scavio MCP server entry.
{
"mcpServers": {
"scavio": {
"command": "npx",
"args": ["-y", "@scavio/mcp"],
"env": { "SCAVIO_API_KEY": "${SCAVIO_API_KEY}" }
}
}
}Step 4: Restart Gemini CLI
Exit and relaunch Gemini CLI to load the new MCP server.
geminiStep 5: Ask a live-data question
Prompt Gemini with something that requires fresh web data, and watch it call Scavio.
> what is the top Reddit post in r/ClaudeCode this week?Python Example
# Gemini CLI is configured via JSON, not Python. Scavio can also be called directly:
import os, requests
r = requests.post('https://api.scavio.dev/api/v1/search',
headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
json={'query': 'top reddit post r/ClaudeCode this week'})
print(r.json()['organic_results'][0])JavaScript Example
const res = await fetch('https://api.scavio.dev/api/v1/search', {
method: 'POST',
headers: { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({ query: 'top reddit post r/ClaudeCode this week' })
});
console.log((await res.json()).organic_results[0]);Expected Output
> Gemini calls scavio.search_google with the query and returns structured results with titles, URLs, and snippets. Gemini synthesizes the top results into a direct answer with citations.