MCP Gemini Web Search
Provides web search and research capabilities using Google's Gemini models with Google Search grounding, enabling AI agents to perform grounded searches, multi-step research, and batch queries.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Gemini Web Search search for Node.js 22 LTS release notes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Gemini Web Search
A Model Context Protocol (MCP) server that provides grounded web search and research powered by Google's Gemini models + Google Search grounding, with retries, rate limiting, and health checks.
Features
web_searchtool with dual modes:normal: Fast, single-step grounded searchresearch: Multi-step research with query planning → execution → synthesis
web_search_batchtool to run up to 20 independent searches in parallelhealth_checktool for metrics (and optional live probe)Google Search grounding for accurate, cited results
Opinionated system instructions that prioritize official documentation for API/library queries
Resilience features: rate limiting, retries (exponential backoff + jitter), and per-request timeouts
Configurable models and endpoints (supports custom base URLs via
httpOptions.baseUrl)
Related MCP server: Gemini Search MCP
Installation
Via npx (Recommended)
npx -y mcp-gemini-webVia npm install
npm install -g mcp-gemini-web
mcp-gemini-webEnvironment Variables
GEMINI_API_KEYorGOOGLE_API_KEY(required): Google AI API keyGENAI_BASE_URLorGEMINI_BASE_URL(optional): Custom API endpoint base URLMODEL(optional): Default model (default:gemini-3-flash-preview)REQUEST_TIMEOUT(optional): Default request timeout in ms (default:60000)
Rate limiting:
RATE_LIMIT_RPM(optional): Requests per minute (default:60)RATE_LIMIT_MAX_BURST(optional): Max burst capacity (default:10)
Retries:
MAX_RETRIES(optional): Max retry attempts (default:5)BASE_RETRY_DELAY(optional): Base delay in ms (default:1000)MAX_RETRY_DELAY(optional): Max delay in ms (default:60000)JITTER_FACTOR(optional): Jitter factor 0-1 (default:0.1)
MCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"gemini-web": {
"command": "npx",
"args": ["-y", "mcp-gemini-web"],
"env": {
"GEMINI_API_KEY": "your-api-key-here"
}
}
}
}Other MCP Clients
The server communicates via stdio using the MCP protocol. Configure your client to run:
npx -y mcp-gemini-webUsage Examples
Normal Search (Fast)
{
"tool": "web_search",
"arguments": {
"q": "what is Node.js 22 LTS",
"mode": "normal",
"verbosity": "normal",
"include_sources": true
}
}Research Mode (Deep)
{
"tool": "web_search",
"arguments": {
"q": "compare axios vs fetch for production Node.js usage",
"mode": "research",
"max_steps": 4,
"research_concurrency": "parallel"
}
}Batch Search (Parallel)
{
"tool": "web_search_batch",
"arguments": {
"queries": [
"Node.js 22 release notes",
"TypeScript 5.6 new features",
"Vitest 2 migration guide"
],
"include_sources": false
}
}Health Check
{
"tool": "health_check",
"arguments": {
"include_metrics": true,
"probe": false
}
}Health Check (Live Probe)
{
"tool": "health_check",
"arguments": {
"include_metrics": true,
"probe": true,
"probe_timeout": 10000
}
}Tool Parameters
web_search
q(string, required): Search querymode("normal"|"research", optional): Default"normal"model(string, optional): Model to use (default:MODELenv orgemini-3-flash-preview)verbosity("concise"|"normal"|"detailed", optional): Default"normal"max_tokens(number, optional): Overrides verbosity (64–131072)max_steps(number, optional): Research steps (1–6, default: 3; only inresearchmode)research_concurrency("parallel"|"sequential", optional): Default"parallel"(only inresearchmode)include_sources(boolean, optional): Include sources + metadata footer (default:false)timeout(number, optional): Per-request timeout in ms (5000–300000)
web_search_batch
queries(string[], required): 1–20 queriesmodel,verbosity,max_tokens,include_sources,timeout: Same meaning asweb_search(applies per query)
health_check
include_metrics(boolean, optional): Defaulttrueprobe(boolean, optional): If true, performs a lightweight API call (defaultfalse)probe_timeout(number, optional): Probe timeout in ms (1000–30000, default10000)
Development
# Clone and install
git clone <repository-url>
cd mcp-gemini-web
npm install
# Development mode
npm run dev
# Build
npm run build
# Test
npm test
# Start built version
npm startLicense
MIT
Contributing
Pull requests welcome! Please ensure tests pass and follow the existing code style.
Available Tools
3 toolshealth_checkCheck MCP server healthA
Returns health status and metrics including request counts, rate limit status, and error information.
Inputs: probe, probe_timeout, include_metrics.
web_searchGrounded web search (Gemini + Google Search)A
Grounded search with citations. mode='normal' for a single pass; mode='research' for a multi-step, deeper approach. Use verbosity to control output length.
Inputs: q (required), mode, model, timeout, +5 more.
web_search_batchBatch grounded web search (parallel queries)A
Run multiple web search queries in parallel. All queries are executed concurrently for faster results. Returns results for each query with individual success/failure status.
Inputs: queries (required), model, timeout, verbosity, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
health_check is clearly distinct from the two search tools, monitoring server status rather than performing searches. web_search and web_search_batch are differentiated by single vs. parallel execution, and the descriptions make their use cases unambiguous.
The search tools follow a consistent web_search / web_search_batch pattern, which makes their relationship obvious. health_check is a minor deviation in structure (noun_verb vs. web_search prefix) but still follows a readable naming style.
Three tools cover health monitoring and two search modes, which is well-scoped for a web search server. Every tool serves a distinct, justified purpose without redundancy or unnecessary bloat.
The core domain of web search is fully covered with both single and batch search capabilities, plus operational health metrics. No obvious missing operations like result refinement or search customization are implied by the descriptions.
Maintenance
Related MCP Connectors
Google search, news, maps, webpages, cited answers, research and ChatGPT/Gemini answers for agents.
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
Web search and page reading for AI agents, including JSON APIs, RSS feeds and YouTube.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides Google Search functionality for AI models using Gemini's built-in Grounding with Google Search feature, returning real-time web search results with source citations.1241 npm83Apache 2.0
- AlicenseBqualityDmaintenanceEnables AI-powered web searches using Google's Gemini 2.5 models with Google Search Grounding. Supports multiple Gemini models (Flash, Flash-Lite, Pro) with configurable thinking budget and web search capabilities.117 npm2MIT
- FlicenseNot gradedqualityDmaintenanceProvides real-time web research and URL summarization capabilities using Gemini 2.5 Flash with native Google Search grounding. It enables users to perform factual searches and summarize web content directly within MCP-compatible clients like Claude Desktop.17-
- AlicenseNot gradedqualityDmaintenanceEnables web search using Google Gemini with search grounding and question-answering on local documents, with support for chunked document reading.110 npm1MIT