About google-search-mcp
google-search-mcp is a Playwright-based MCP server that runs Google searches in Chromium and extracts the results for AI assistants such as Claude and Cursor. It handles anti-bot checks, switches to headed mode for CAPTCHA verification, and saves browser state to reduce repeated verification.
Key features
- 01Google search and result extraction via Playwright
- 02Browser fingerprint spoofing and user behavior simulation
- 03Switches to headed mode for CAPTCHA verification
- 04Saves browser session state for reuse
- 05Language and region settings for search results
Use cases
- 01Adding live web search results to AI assistants
- 02Looking up current information while coding in Cursor
- 03Searching in specific languages or regions for research
MCP support
This project is an MCP server that exposes a search tool to MCP clients, accepting parameters such as query, limit, timeout, language and region and returning structured results.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEGoogle 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
- Go to
Cursor Settings>MCP - Click
+ Add New MCP Server - Fill in the form:
- Name:
google-search(or any name you prefer) - Type:
command - Command:
npx -y @mcp-server/google-search-mcp@latest
- Name:
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 stringlimit(optional): Number of search results to return, default is 10timeout(optional): Search operation timeout in milliseconds, default is 60000language(optional): Language for search results, e.g., zh-CN, en-US, default is zh-CNregion(optional): Region for search results, e.g., cn, com, co.jp, default is cn
How It Works
- The tool uses Playwright to control a Chromium browser to perform Google searches
- It avoids bot detection through browser fingerprint spoofing and real user behavior simulation
- When encountering CAPTCHA verification, it automatically switches to headed mode for user completion
- It extracts search results and returns them in a structured format
- 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.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.