google-search-mcp-server

google-search-mcp-server

3.5

A ModelContextProtocol (MCP) server that provides Google Search capabilities as a tool.

Top Comments

The google-search-mcp-server is an MCP server that offers a google_search tool for performing web scraping of Google Search results. It returns structured data including titles, URLs, and snippets in a JSON-compatible format. The server supports pagination, configurable language, safe search, and result limits. It also uses random user agents to minimize detection during scraping. The server is designed to handle JSON-RPC requests over standard input/output, making it versatile for integration with various clients.

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

MCP Tools

  • google_search: Performs a Google search and returns results in a structured JSON format.

Usage with Different Platforms

Start the MCP Server

bash
npm start

List available tools

bash
echo '{"jsonrpc":"2.0","method":"ListTools","params":{},"id":1}' | npm start

Call the google_search tool

bash
echo '{"jsonrpc":"2.0","method":"CallTool","params":{"name":"google_search","arguments":{"query":"OpenAI","num":5}},"id":2}' | npm start

Playground

bash
npx esno src/playground.ts