MCPSERV.CLUB
web-agent-master

Google Search MCP Server

MCP Server

Real‑time, anti‑bot Google search for AI assistants

Stale(65)
461stars
1views
Updated 11 days ago

About

A Playwright‑based MCP server that performs local Google searches while bypassing anti‑scraping measures. It returns structured results and optional raw HTML, enabling AI assistants to query the web without external APIs.

Capabilities

Resources
Access data sources
Tools
Execute functions
Prompts
Pre-built templates
Sampling
AI model interactions

Star History Chart

The Google Search MCP server turns a traditional command‑line search tool into a lightweight, real‑time search service that can be consumed by AI assistants such as Claude. By leveraging Playwright to drive a browser instance, it sidesteps the anti‑scraping defenses that normally block automated requests to Google. This means developers can query up‑to‑date web results without paying for paid SERP APIs or managing API keys, while still maintaining the privacy and control of a local deployment.

At its core, the server executes a Google search query, captures the rendered Search Engine Results Page (SERP), and returns structured JSON containing titles, URLs, and snippets for each result. It also offers optional raw‑HTML extraction—removing CSS/JS—to aid debugging when Google changes its page layout. A full‑page screenshot is automatically taken whenever raw HTML is saved, giving developers a visual reference for the captured page. The tool runs headless by default for speed but can switch to headed mode automatically when a verification challenge appears, ensuring reliability across different network conditions.

Key capabilities include intelligent fingerprint management that mimics real user behavior, automatic browser state persistence to reduce repeated captchas, and randomization of device/locale settings. These techniques keep the search traffic indistinguishable from normal user activity, dramatically lowering detection rates. The server exposes these functions over MCP, allowing an AI assistant to issue a search request and receive results instantly as part of its context. Because the server is open source, developers can tweak the fingerprint logic or extend the API to include additional metadata such as time stamps or geolocation.

Typical use cases involve building knowledge‑base chatbots that need up‑to‑date information, generating research summaries for content creators, or powering data‑driven decision support tools. In a development workflow, the MCP server can be spun up locally during testing, while production deployments run behind a reverse proxy with rate‑limiting. Its command‑line interface remains handy for quick manual searches or automated scripts, and the same codebase supports both CLI and MCP modes thanks to shared TypeScript logic.

Overall, this Google Search MCP server offers developers a free, self‑hosted, and highly reliable search capability that integrates seamlessly into AI pipelines. By eliminating external API dependencies and providing robust anti‑bot safeguards, it empowers assistants to fetch fresh web content on demand while keeping the entire stack under full developer control.