Google AI Mode MCP Server
Allows AI agents to perform research using Google AI Mode, which synthesizes information from dozens of web sources into cited answers.
Click on "Install 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., "@Google AI Mode MCP ServerSummarize latest EU AI regulations 2026 with sources"
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.
Google AI Mode MCP Server
Supercharge Any LLM's Web Research with Google AI Mode
For: All MCP-compatible LLMs (Claude, Cursor, Cline, Windsurf, Zed, etc.)
Transform your LLM's online research capabilities by connecting it directly to Google's AI Mode—getting AI-synthesized answers from 100+ sources instead of scattered search results.
Why This Matters
Most built-in web research is mediocre. This MCP server gives any LLM professional-grade research by tapping into Google's AI Mode—the same technology that synthesizes information from dozens of websites into one cited answer.
Example Use Cases:
"Next.js 15 App Router best practices 2026 with server components examples"
→ AI-synthesized coding guide with inline citations [1][2][3]
"Compare PostgreSQL vs MySQL JSON performance 2026, include benchmarks"
→ Technical comparison table with real-world data
"Find the latest EU AI regulations 2026 and their impact on startups"
→ Legal overview with official government sources
"Best noise-cancelling headphones under €300, compare Sony vs Bose"
→ Product comparison with reviews and specs
"Intermittent fasting protocols 2026, include recent scientific studies"
→ Health guide with medical research citationsResult: Research on ANY topic—coding, tech comparisons, regulations, product reviews, health, finance, travel. Curated answers with sources. Saves tokens. Superior to generic web search.
Installation • Quick Start • How It Works • Examples • Claude Code Skill • FAQ
📋 Last Updates (2026-01-08)
v2.0 - Multi-Language & Detection Overhaul
✅ 4-Stage Completion Detection - SVG thumbs-up → aria-label → text → 40s timeout ✅ Multi-Language Support - Works in DE/EN/NL/ES/FR/IT browser locales ✅ 87% Faster - Average 4s detection (was 2s fixed wait) ✅ AI Mode Availability Check - Detects region restrictions with proxy suggestion ✅ 17 Citation Selectors - Language-agnostic fallback chain ✅ 15 Cutoff Markers - Cleaner content extraction across languages
v1.5 - Persistent browser context, CAPTCHA handling improvements v1.0 - Initial MCP server release
Related MCP server: Gemini Research MCP
What This Is
An MCP server that connects your code agent (Claude, Cursor, Cline, etc.) to Google AI Mode—Google's AI-powered search that synthesizes information from dozens of web sources into a single, cited answer.
Instead of your agent reading page after page, Google does the heavy lifting. Your agent gets one clean, structured response with inline citations.
The advantage: Free, token-efficient research with grounded sources.
How It Works
Your agent asks a question
↓
Server launches stealth browser
↓
Google AI Mode searches & synthesizes dozens of sources
↓
Server extracts AI answer + citations
↓
Converts to clean Markdown with [1][2][3] references
↓
Your agent receives final answer (optionally saved to .md file)The key difference:
Traditional web research:
Agent searches Google → gets 10 links
Agent reads 5-10 full pages → thousands of tokens consumed
Agent synthesizes manually → risks missing details or hallucinating
You pay for all those tokens
With this server:
Google AI Mode searches + synthesizes → one request
Your agent receives one clean, cited answer → minimal tokens
Google's sources are preserved → verifiable, grounded
It's free (uses public Google Search)
Why This Matters
Google AI Mode (the udm=50 parameter) makes Google search work like a research assistant. It:
Reads and analyzes dozens of websites automatically
Synthesizes findings into structured answers
Cites every claim with source links
Handles follow-up context across queries
Your agent gets the benefits without doing the work—or burning the tokens
Installation
Works with any MCP-compatible code agent. Choose your setup:
Claude Code:
claude mcp add google-ai-search npx google-ai-mode-mcp@latestCodex:
codex mcp add google-ai-search -- npx google-ai-mode-mcp@latestLinux/WSL users on Codex: If you get a "Missing X-Server" error when trying to show the browser for CAPTCHA solving, use xvfb-run:
{
"mcpServers": {
"google-ai-search": {
"command": "xvfb-run",
"args": ["-a", "npx", "google-ai-mode-mcp@latest"]
}
}
}Install xvfb if needed: sudo apt-get install xvfb
Cline:
cline mcp add google-ai-search -- npx google-ai-mode-mcp@latestGemini:
gemini mcp add google-ai-mode npx -y google-ai-mode-mcp@latest --scope userVS Code:
code --add-mcp '{"name":"google-ai-search","command":"npx","args":["google-ai-mode-mcp@latest"]}'Cursor, Windsurf, Zed, or other MCP clients:
Add to your MCP config file:
{
"mcpServers": {
"google-ai-search": {
"command": "npx",
"args": ["google-ai-mode-mcp@latest"]
}
}
}Cursor uses ~/.cursor/mcp.json, Windsurf and Zed have their own settings files. Check your agent's documentation for the config location
Quick Start
Ask your agent naturally:
"Search Google AI Mode for: Next.js 15 App Router best practices""What are the new features in Astro 4.0?""Research React Server Components and save the results"The agent will automatically use the MCP server to query Google AI Mode and return a clean, cited answer.
To save results to a file:
"Search for TypeScript 5.4 features and save it"Files are saved to platform-specific locations:
Linux:
~/.local/share/google-ai-mode-mcp/results/macOS:
~/Library/Application Support/google-ai-mode-mcp/results/Windows:
%LOCALAPPDATA%\google-ai-mode-mcp\results\
Filenames: 2026-01-04_15-30-45_typescript_5_4.md
First Run: CAPTCHA Handling
On your first query, Google may show a CAPTCHA to verify you're human. This is normal when the browser profile is created.
If you see a CAPTCHA error:
Ask your agent: "Switch to visible mode" or "Turn off headless mode"
The browser will open visibly
Solve the CAPTCHA manually
The server detects the solution automatically and continues
Next queries will be headless again
After the first CAPTCHA, searches typically run smoothly. The server uses stealth techniques and a persistent browser profile to minimize future CAPTCHAs
Troubleshooting
Repeated CAPTCHAs:
If Google keeps showing CAPTCHAs:
Tell your agent: "Use visible browser for this search"
Add 10-30 second delays between searches
The server automatically restarts after 3 consecutive CAPTCHAs
Browser won't launch:
Clear the browser profile:
# Linux/macOS
rm -rf ~/.local/share/google-ai-mode-mcp/chrome_profile
# Windows
rmdir /s "%LOCALAPPDATA%\google-ai-mode-mcp\chrome_profile"Wrong language results:
The server forces English results. If you still get wrong languages, clear the profile (see above).
Missing citations:
Update to the latest version:
npm update -g google-ai-mode-mcpConfiguration (Optional)
The server works out of the box. Advanced users can customize via environment variables:
# Browser settings
export GOOGLE_AI_HEADLESS=true # Run browser invisibly
export GOOGLE_AI_STEALTH_ENABLED=true # Use anti-detection techniques
# Timeouts
export GOOGLE_AI_RESPONSE_TIMEOUT=30000 # 30 seconds to get AI response
export GOOGLE_AI_CAPTCHA_TIMEOUT=300000 # 5 minutes to solve CAPTCHA
# CAPTCHA handling
export GOOGLE_AI_CAPTCHA_POLL_INTERVAL=3000 # Check every 3 seconds
export GOOGLE_AI_CAPTCHA_MAX_CONSECUTIVE=3 # Restart after 3 CAPTCHAs
export GOOGLE_AI_CAPTCHA_COOLDOWN_MS=30000 # 30 second cooldownSee .env.example for all options.
Tool Reference
The server exposes one tool: search_ai
Parameters:
query(required) - Your search questionheadless(optional) - Run browser invisibly (default:true)timeout_ms(optional) - Request timeout in milliseconds (default:120000)save_to_file(optional) - Save result to .md file (default:false)filename(optional) - Custom filename without.mdextension
Returns:
{
"success": true,
"markdown": "# AI response with citations [1][2]\n\nSources:\n[1] [Title](url)",
"sources": [
{ "title": "Source Title", "url": "https://example.com", "domain": "example.com" }
],
"query": "Your query",
"savedTo": "/path/to/results/file.md"
}Usage examples:
Basic search:
{ "query": "Rust async patterns 2026" }Save to file:
{ "query": "Next.js 15 features", "save_to_file": true, "filename": "nextjs-15-guide" }Visible browser (for CAPTCHA or debugging):
{ "query": "PostgreSQL optimization", "headless": false }Example Use Case
You need to implement OAuth2 in a framework you've never used before.
Traditional approach:
Your agent searches Google, gets 10 links
Reads multiple documentation pages and blog posts
Consumes thousands of tokens
May miss important details or synthesize incorrectly
With this server:
"Search Google AI Mode for: Hono OAuth2 implementation guide"Google reads and synthesizes sources automatically
Your agent gets one structured answer with code examples and citations
Minimal token usage
Sources are linked for verification
The agent can then use this grounded information to write the actual implementation.
FAQ
Does this work with my code agent? Yes. Any MCP-compatible client: Claude Code, Cursor, Codex, Cline, Windsurf, Zed, VS Code MCP, etc.
Is it free? Yes. The server is open source, and it uses public Google Search. No API keys or subscriptions needed.
How accurate are the results? Results come from Google's AI Mode, which cites sources for every claim. Always verify critical details via the linked sources.
What about privacy? Everything runs locally on your machine. The browser profile stays on your computer. No credentials or external services required beyond Google Search.
Can I see the browser while it works?
Yes. Set headless: false in the tool call, or ask your agent to use visible mode.
Why not just use regular web search? Regular search returns links. Your agent then reads 5-10 pages, consuming thousands of tokens. This server has Google do the synthesis, so your agent gets one clean answer for minimal token cost.
Tips for Better Results
Be specific with your queries:
Instead of: "React hooks" Try: "React hooks best practices 2026 (useState, useEffect, custom hooks)"
Include version numbers:
Instead of: "Next.js features" Try: "Next.js 15 new features and breaking changes"
Request structured output:
"Compare PostgreSQL vs MySQL 2026 with a performance comparison table"
Ask for examples:
"Show me TypeScript discriminated union examples with type narrowing"
Development
Want to contribute or run from source?
git clone https://github.com/PleasePrompto/google-ai-mode-mcp.git
cd google-ai-mode-mcp
npm install
npm run build
# Development with auto-reload
npm run dev
# Watch mode for continuous building
npm run watchImportant Notes
CAPTCHA handling: Google may show a CAPTCHA on first use or if you search very frequently. When this happens, ask your agent to show the browser ("switch to visible mode"). Once you solve the CAPTCHA manually, you're usually good to go for future searches.
Responsible use: This tool automates browser interactions with Google Search. Use it responsibly and be mindful of Google's Terms of Service. Add delays between heavy search sessions if needed.
Verification: While results come from Google's AI Mode with source citations, always verify critical information via the linked sources. This is a research tool, not a source of truth.
Contributing
Found an issue or want to contribute?
Report bugs: GitHub Issues
Pull requests: Welcome
Contact: github@geromedexheimer.de
License
MIT License - see LICENSE file for details
Claude Code Users
Using Claude Code? There's a lightweight skill-only version of this server that integrates directly into your Claude Code workflow without requiring a separate MCP server installation.
Check it out: google-ai-mode-skill
The skill version is perfect if you want the same Google AI Mode functionality with even simpler setup for Claude Code.
Built by Gérôme Dexheimer
Available Tools
1 toolsearch_aiA
Search Google AI Mode (udm=50) and return AI-generated summary with citations.
Returns markdown-formatted AI response with inline citations [1][2] and source list.
Features:
Automatic CAPTCHA detection and handling
Source extraction with citations
Clean markdown formatting
Stealth mode for anti-detection
Optional file saving with timestamp and sanitized filename
Note: If CAPTCHA is detected, you will be prompted to solve it in a visible browser window.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query to send to Google AI Mode | |
| filename | No | Optional: Custom filename for saved result (only used if save_to_file is true). If not provided, auto-generates from query and timestamp. | |
| headless | No | Optional: Run browser in headless mode (default: true). Set to false to see the browser. | |
| timeout_ms | No | Optional: Timeout in milliseconds for the search (default: 120000 = 2 minutes) | |
| save_to_file | No | Optional: Save markdown result to file (default: false). Saves to results/ folder with timestamp. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It discloses CAPTCHA detection and handling, the visible browser prompt for CAPTCHA solving, stealth mode, and optional file saving. It doesn't cover rate limits or persistence, but the key behavioral traits are well communicated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded with the core purpose. Bullet points efficiently list features, and the note about CAPTCHA is well-placed. Every sentence adds value without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description explains the return format (markdown with citations and source list). It covers the main behavioral aspects needed for an agent to invoke the tool safely. Some details like error handling or exact source list structure are omitted, but the description is sufficient for a tool of this complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already covers 100% of parameters, so baseline is 3. The description adds value by explaining file saving behavior (timestamp and sanitized filename) and the CAPTCHA prompt interaction with headless mode, enhancing understanding beyond the raw schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches Google AI Mode (udm=50) and returns an AI-generated summary with citations. It specifies the exact resource and action, making it distinct and unambiguous. Even without sibling tools, the verb and resource are specific and complete.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on what the tool does and when it would be appropriate (searching Google AI Mode). It doesn't explicitly mention when not to use it or alternatives, but the lack of siblings and the specific use case make the context sufficient for an agent to infer usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.3- First observed
search_ai
TDQS
Only one tool exists, so there is no possibility of confusing it with others. The tool's purpose is clearly stated.
The single tool name `search_ai` follows a clear verb_noun pattern. With only one tool, consistency is trivial.
The server provides only one tool, which feels thin for a general-purpose server but is appropriate for a narrowly-scoped service dedicated to Google AI Mode search. It's borderline.
The tool covers the core operation of searching Google AI Mode and returning AI summaries with citations. There are no obvious missing operations for this narrow purpose, though a broader search service might expect additional tool variations.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Google AI Overview answers and cited sources via the Apify Google AI Overview API, hosted MCP.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Search Google straight from your AI agent. Web results, images, videos, news, products, scholarly ar
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides Google search grounding capabilities for Gemini AI models through MCP, enabling AI assistants to perform web searches with Gemini's grounding API for more accurate and up-to-date responses.MIT
- 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 LLMs to perform real-time Google searches and retrieve web results via the MCP protocol.-
- AlicenseNot gradedqualityDmaintenanceEnables Google web search via MCP, compatible with gemini-cli's google_web_search tool.21Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/PleasePrompto/google-ai-mode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server