google search.com
google search.com logo

Google Search

Integrates with Google Custom Search API and web scraping tools to enable web searches, content extraction, and analysis...

Created byApr 22, 2025

Built For use with Cline + VS Code!

Google Search MCP Server

An MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.

Features

  • Advanced Google Search with filtering options (date, language, country, safe search)
  • Detailed webpage content extraction and analysis
  • Batch webpage analysis for comparing multiple sources
  • Environment variable support for API credentials
  • Comprehensive error handling and user feedback
  • MCP-compliant interface for seamless integration with AI assistants

Prerequisites

  • Node.js (v16 or higher)
  • Python (v3.8 or higher)
  • Google Cloud Platform account
  • Custom Search Engine ID
  • Google API Key

Installation

  1. Clone the repository:
  1. Install Node.js dependencies:
  1. Install Python dependencies:
  1. Build the TypeScript code:
  1. Create a helper script to start the Python servers (Windows example):

Configuration

API Credentials

You can provide Google API credentials in two ways:
  1. Environment Variables (Recommended):
  1. Configuration File:

MCP Settings Configuration

Add the server configuration to your MCP settings file:

For Cline (VS Code Extension)

File location: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

For Claude Desktop App

File location: %APPDATA%\Claude\claude_desktop_config.json

Running the Server

Method 1: Start Python Servers Separately (Recommended)

  1. First, start the Python servers using the helper script:
  1. Configure the MCP settings to run only the Node.js server:

Method 2: All-in-One Script

Start both the TypeScript and Python servers with a single command:

Available Tools

1. google_search

Search Google and return relevant results from the web. This tool finds web pages, articles, and information on specific topics using Google's search engine.

2. extract_webpage_content

Extract and analyze content from a webpage, converting it to readable text. This tool fetches the main content while removing ads, navigation elements, and other clutter.

3. extract_multiple_webpages

Extract and analyze content from multiple webpages in a single request. Ideal for comparing information across different sources or gathering comprehensive information on a topic.

Example Usage

Here are some examples of how to use the Google Search MCP tools:

Basic Search

Advanced Search with Filters

Content Extraction

Multiple Content Comparison

Getting Google API Credentials

  1. Go to the Google Cloud Console
  1. Create a new project or select an existing one
  1. Enable the Custom Search API
  1. Create API credentials (API Key)
  1. Go to the Custom Search Engine page
  1. Create a new search engine and get your Search Engine ID
  1. Add these credentials to your api-keys.json file

Error Handling

The server provides detailed error messages for:
  • Missing or invalid API credentials
  • Failed search requests
  • Invalid webpage URLs
  • Network connectivity issues

Architecture

The server consists of two main components:
  1. TypeScript MCP Server: Handles MCP protocol communication and provides the tool interface
  1. Python Flask Server: Manages Google API interactions and webpage content analysis

License

MIT

Built For use with Cline + VS Code!

Google Search MCP Server

An MCP (Model Context Protocol) server that provides Google search capabilities and webpage content analysis tools. This server enables AI models to perform Google searches and analyze webpage content programmatically.

Features

  • Advanced Google Search with filtering options (date, language, country, safe search)
  • Detailed webpage content extraction and analysis
  • Batch webpage analysis for comparing multiple sources
  • Environment variable support for API credentials
  • Comprehensive error handling and user feedback
  • MCP-compliant interface for seamless integration with AI assistants

Prerequisites

  • Node.js (v16 or higher)
  • Python (v3.8 or higher)
  • Google Cloud Platform account
  • Custom Search Engine ID
  • Google API Key

Installation

  1. Clone the repository:
  1. Install Node.js dependencies:
  1. Install Python dependencies:
  1. Build the TypeScript code:
  1. Create a helper script to start the Python servers (Windows example):

Configuration

API Credentials

You can provide Google API credentials in two ways:
  1. Environment Variables (Recommended):
  1. Configuration File:

MCP Settings Configuration

Add the server configuration to your MCP settings file:

For Cline (VS Code Extension)

File location: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

For Claude Desktop App

File location: %APPDATA%\Claude\claude_desktop_config.json

Running the Server

Method 1: Start Python Servers Separately (Recommended)

  1. First, start the Python servers using the helper script:
  1. Configure the MCP settings to run only the Node.js server:

Method 2: All-in-One Script

Start both the TypeScript and Python servers with a single command:

Available Tools

1. google_search

Search Google and return relevant results from the web. This tool finds web pages, articles, and information on specific topics using Google's search engine.

2. extract_webpage_content

Extract and analyze content from a webpage, converting it to readable text. This tool fetches the main content while removing ads, navigation elements, and other clutter.

3. extract_multiple_webpages

Extract and analyze content from multiple webpages in a single request. Ideal for comparing information across different sources or gathering comprehensive information on a topic.

Example Usage

Here are some examples of how to use the Google Search MCP tools:

Basic Search

Advanced Search with Filters

Content Extraction

Multiple Content Comparison

Getting Google API Credentials

  1. Go to the Google Cloud Console
  1. Create a new project or select an existing one
  1. Enable the Custom Search API
  1. Create API credentials (API Key)
  1. Go to the Custom Search Engine page
  1. Create a new search engine and get your Search Engine ID
  1. Add these credentials to your api-keys.json file

Error Handling

The server provides detailed error messages for:
  • Missing or invalid API credentials
  • Failed search requests
  • Invalid webpage URLs
  • Network connectivity issues

Architecture

The server consists of two main components:
  1. TypeScript MCP Server: Handles MCP protocol communication and provides the tool interface
  1. Python Flask Server: Manages Google API interactions and webpage content analysis

License

MIT