ScavioScavio
FeaturesPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Add Search to Gemini CLI
Tutorial

How to Add Search to Gemini CLI

Give Google's Gemini CLI real-time web, shopping, and video search by wiring in the Scavio MCP server. Step-by-step guide with config examples.

Get Free API KeyAPI Docs

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.

Bash
npm install -g @google/gemini-cli

Step 2: Export your Scavio API key

Set the key as an environment variable so the MCP server can read it.

Bash
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.

JSON
{
  "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.

Bash
gemini

Step 5: Ask a live-data question

Prompt Gemini with something that requires fresh web data, and watch it call Scavio.

Bash
> what is the top Reddit post in r/ClaudeCode this week?

Python Example

Python
# 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

JavaScript
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

JSON
> 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.

Related Tutorials

  • How to Add Search to Codex CLI
  • How to Build a Cursor Agent with Web Search

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

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. A Scavio API key gives you 250 free credits per month.

Yes. The free tier includes 250 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Search API for Gemini CLI in 2026

Read more
Best Of

Best MCP Search Tools for IDE Integration in 2026

Read more
Use Case

MCP Custom Search Server

Read more
Use Case

IDE MCP Search

Read more
Solution

Give AI Agents Multi-Source Search via MCP

Read more
Glossary

MCP Search Protocol

Read more

Start Building

Give Google's Gemini CLI real-time web, shopping, and video search by wiring in the Scavio MCP server. Step-by-step guide with config examples.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy