mcpField
G
google-search-mcp-server

google-search-mcp-server

Local
github.com/eggplantinySearch1Updated 78w ago

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

  1. 01Scrape Google Search over HTTP
  2. 02Return titles, URLs, and snippets as structured data
  3. 03Configure pagination and result limits
  4. 04Set language, country, and safe search
  5. 05Return one result with “I'm Feeling Lucky”

Use cases

  1. 01Retrieve web search results for an MCP client
  2. 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.

mcp.json · Universal config
{
"mcpServers": {
"google-search-mcp-server-eggplantiny": {
"command": "npx",
"args": [
"-y",
"esno"
]
}
}
}
Run commandnpx -y esno

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmesno

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

google-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

Markdown supported

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.