Google Search MCP

Google Search MCP

A Playwright-based tool that performs Google searches and extracts results while bypassing anti-bot mechanisms, providing real-time search capabilities for AI assistants.

Category
Visit Server

README

Google Search MCP

Model Context Protocol server for google search. A Playwright-based Model Context Protocol (MCP) tool that bypasses search engine anti-bot mechanisms, performs Google searches, and extracts results, providing real-time search capabilities for AI assistants like Claude and Cursor.

Features

  • Anti-Bot Bypass: Uses browser fingerprint spoofing and real user behavior simulation to avoid detection
  • Automatic CAPTCHA Handling: Switches to headed mode when encountering CAPTCHAs, allowing users to complete verification
  • State Persistence: Saves browser session state to reduce the need for repeated verification
  • Adaptability: Uses multiple selector combinations to adapt to changes in Google search pages
  • MCP Integration: Implements the Model Context Protocol for easy integration with AI assistants
  • Multi-language Support: Supports search results in different languages and regions

Using with Cursor

Installation - Globally

Run the MCP server using npx:

npx -y @mcp-server/google-search-mcp@latest

In your Cursor IDE

  1. Go to Cursor Settings > MCP
  2. Click + Add New MCP Server
  3. Fill in the form:
    • Name: google-search (or any name you prefer)
    • Type: command
    • Command: npx -y @mcp-server/google-search-mcp@latest

Installation - Project-specific

Add an .cursor/mcp.json file to your project:

{
  "mcpServers": {
    "google-search": {
      "command": "npx",
      "args": [
        "-y",
        "@mcp-server/google-search-mcp@latest"
      ]
    }
  }
}

Development

yarn install

Build the project

yarn build

Usage

Running as an MCP Server

yarn start

Using with MCP Inspector

To debug the server, you can use the MCP Inspector:

# First build the project
yarn build

# Start the MCP Inspector and server
npx @modelcontextprotocol/inspector node dist/index.js

Parameters

The search tool accepts the following parameters:

  • query (required): Search query string
  • limit (optional): Number of search results to return, default is 10
  • timeout (optional): Search operation timeout in milliseconds, default is 60000
  • language (optional): Language for search results, e.g., zh-CN, en-US, default is zh-CN
  • region (optional): Region for search results, e.g., cn, com, co.jp, default is cn

How It Works

  1. The tool uses Playwright to control a Chromium browser to perform Google searches
  2. It avoids bot detection through browser fingerprint spoofing and real user behavior simulation
  3. When encountering CAPTCHA verification, it automatically switches to headed mode for user completion
  4. It extracts search results and returns them in a structured format
  5. It saves browser state for reuse in subsequent searches

Advanced Configuration

Browser State File

By default, the browser state is saved in the .google-search-browser-state.json file in the user's home directory. You can modify this path through parameters.

Language and Region Settings

You can specify the language and region for search results through parameters:

// English (US) search results
"language": "en-US", "region": "com"

// Japanese search results
"language": "ja-JP", "region": "co.jp"

// Chinese (Simplified) search results
"language": "zh-CN", "region": "cn"

Notes

  • On first use, if you encounter CAPTCHA verification, the system will automatically switch to headed mode for you to complete the verification
  • After verification, the system will save the state file, making subsequent searches smoother
  • Overly frequent search requests may trigger Google's rate limiting mechanisms
  • This tool is for learning and research purposes only, please comply with Google's terms of service

License

MIT

Disclaimer

This tool is for learning and research purposes only. When using this tool to access Google or other search engines, please comply with relevant terms of service and legal regulations. The author is not responsible for any issues resulting from the use of this tool.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured