Get the FREE Ultimate OpenClaw Setup Guide →

Google-Search

MCP Server built for use with Claude Code, Claude Desktop, VS Code, Cline - enable google search and ability to follow links and research websites

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio mixelpixx-google-search-mcp-server npx -y google-search-mcp

How to use

This MCP server provides Google search capabilities with multiple provider options (Brave, Tavily, and legacy Google Custom Search). It can perform intelligent source ranking, deduplication across results, and agent-based synthesis by leveraging your Claude session. For most users, Brave is recommended due to its generous free tier and privacy posture. To use, configure the appropriate provider and API keys via a .env file or environment variables, then start the server through the MCP interface. Once running, clients can issue search queries and receive ranked results along with extracted content and synthesized insights.

How to install

Prerequisites:

  • Node.js 18 or higher
  • npm (bundled with Node.js installations)
  • Optional: Google Cloud Custom Search API (for legacy Google provider)

Option 1: Using npx (Recommended)

  1. Ensure you have your API keys prepared (BRAVE_API_KEY or TAVILY_API_KEY or GOOGLE_API_KEY + GOOGLE_SEARCH_ENGINE_ID).
  2. Run the server directly:
# Set environment variables and run
GOOGLE_API_KEY=your_google_api_key_here \
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id_here \
SEARCH_PROVIDER=brave \
BRAVE_API_KEY=your_brave_api_key_here \
npx -y google-search-mcp

Or simply:

npx google-search-mcp

Option 2: Clone and Build

  1. Clone the repository:
git clone <https://github.com/mixelpixx/Google-Search-MCP-Server>
cd Google-Research-MCP
  1. Install dependencies:
npm install
  1. Optional: Install Google API support (only if using Google provider)
npm install googleapis
  1. Build the project (if required by the setup):
npm run build
  1. Run with a .env file or environment variables, for example:
SEARCH_PROVIDER=brave
BRAVE_API_KEY=your_brave_api_key_here
GOOGLE_API_KEY=your_google_api_key_here
GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id_here
npx google-search-mcp

Configuration (example .env):

# Brave (Recommended)
SEARCH_PROVIDER=brave
BRAVE_API_KEY=your_brave_api_key_here

# Tavily
# SEARCH_PROVIDER=tavily
# TAVILY_API_KEY=your_tavily_api_key_here

# Google (Legacy)
# SEARCH_PROVIDER=google
# GOOGLE_API_KEY=your_google_api_key
# GOOGLE_SEARCH_ENGINE_ID=your_search_engine_id

Running the server:

npm run start:v3

or

npm run start:v3:http

Additional notes

Tips and caveats:

  • Brave is the recommended default provider due to higher free quota and privacy benefits.
  • If using Google legacy provider, note that Google Custom Search API sunsets on 2027-01-01; plan migration to Brave or Tavily.
  • You can enable usage tracking to monitor quotas and costs; configure USAGE_TRACKING_ENABLED, USAGE_TRACKING_PERSIST, and related settings.
  • The googleapis package is now optional; install it only if you explicitly plan to use the Google provider.
  • Ensure your API keys are kept secure and not committed to version control.
  • For debugging, monitor console outputs that indicate the active provider and its quota status.

Related MCP Servers

Sponsor this space

Reach thousands of developers