About google-search-mcp-server
google-search-mcp-server is an unofficial MCP server that scrapes Google Search results and returns structured data. Its `google_search` tool includes options for pagination, language, safe search, and result count.
Key features
- 01Scrape Google Search over HTTP
- 02Return titles, URLs, and snippets as structured data
- 03Configure pagination and result limits
- 04Set language, country, and safe search
- 05Return one result with “I'm Feeling Lucky”
Use cases
- 01Retrieve web search results for an MCP client
- 02Limit searches by language or result count
MCP support
It exposes the `google_search` tool to MCP clients. The tool accepts a query and returns search results in a JSON-compatible format.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
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-server
A ModelContextProtocol (MCP) server that provides Google Search capabilities as a tool. It performs web scraping of Google Search results and returns structured data including titles, URLs, and snippets.
Overview
google-search-mcp-server implements an MCP server exposing a single tool, google_search, which accepts a search query and returns search results in a JSON-compatible format. It supports pagination, configurable language, safe search, result limits, and uses random user agents to reduce scraping detection.
Key features:
- Google search scraping via HTTP requests
- Structured JSON output with title, URL, and snippet
- Supports pagination, result limits, and language/country options
- "I'm Feeling Lucky" single-result mode
- Built-in cookie jar and random user-agent for each search
Installation
Requirements:
- Node.js v16 or higher
- pnpm or bun for package management
Clone and install dependencies:
git clone https://github.com/yourusername/google-search-mcp-server.git
cd google-search-mcp-server
pnpm install
# or
bun install
Usage
Start the MCP Server
Start the server, which listens for JSON-RPC requests over standard input/output:
npm start
Upon startup, you will see:
Google Search MCP Server running on stdio
Interact with the Server
Use any JSON-RPC 2.0 client (e.g., jq, custom scripts) to list tools and call the google_search tool.
List available tools:
echo '{"jsonrpc":"2.0","method":"ListTools","params":{},"id":1}' | npm start
Call the google_search tool:
echo '{"jsonrpc":"2.0","method":"CallTool","params":{"name":"google_search","arguments":{"query":"OpenAI","num":5}},"id":2}' | npm start
Example response:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{\"results\":[...JSON string of search results...]}"
}
],
"isError": false
}
}
Playground
For local experimentation without MCP protocol, use the provided playground.ts script:
npx esno src/playground.ts
This will run example searches and log results to the console.
License
This project is licensed under the MIT License. See the LICENSE file for details.
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.