Skip to main content
Glama
Google Search MCP Server

Google Search MCP Server

by hinsmoment

Google Search MCP Server

A powerful Model Context Protocol (MCP) server providing Google search and image search capabilities for Claude Code

MCP ไธญๆ–‡ๆ–‡ๆกฃ License Node.js


Features

  • Search Google with customizable result count

  • Extract titles, links, and descriptions

  • Support for multiple languages

๐Ÿ“„ Web Content Extraction

  • Extract main content from any webpage

  • Smart content filtering (ads, navigation removed)

  • Batch extraction support

๐Ÿ” Combined Search & Extract

  • Search and auto-extract multiple results

  • One-click deep content retrieval

๐Ÿ–ผ๏ธ Image Search with AI Analysis โญ

  • Dual-platform search: Google Images + Pinterest

  • Multi-model AI visual analysis: Supports GLM-4.6V, GPT-4O, Claude 3.5, and more

  • Quality scoring system: S/A/B/C grading

  • Perfect for finding product reference images


Related MCP server: MCP Seekr Server

Installation

Prerequisites

  • Node.js >= 18.0.0

  • Claude Code with MCP support

Setup

  1. Clone the repository

git clone https://github.com/hinsmoment/google-search-mcp.git
cd google-search-mcp
  1. Install dependencies

npm install
  1. Configure Claude Code

Add to your Claude configuration (~/.claude.json or via Settings):

{
  "mcpServers": {
    "google-search": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/google-search-mcp/server.js"]
    }
  }
}
  1. Restart Claude Code


Usage

Search Google for "Claude Code AI assistant"

2. Extract Webpage Content

Extract content from https://example.com

3. Batch Extract URLs

Extract content from these URLs:
- https://github.com/topic1
- https://github.com/topic2
- https://github.com/topic3

4. Image Search (Product Reference)

Find similar products using this image: /path/to/product.jpg

MCP Tools

Tool

Description

Parameters

google_search

Google text search

query, maxResults (1-25)

fetch_url

Extract webpage content

url

batch_fetch_urls

Batch extract multiple URLs

urls (array)

search_and_extract

Search + extract results

query, maxResults (1-10)

search_by_image

Image-based product search

image_path, max_results, enable_ai_analysis


Image Search Details

How It Works

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Upload Image   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  AI Analysis    โ”‚
โ”‚  (Multi-Model)   โ”‚
โ”‚  - Product type โ”‚
โ”‚  - Keywords     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ†“
    โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”
    โ†“         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚Google โ”‚  โ”‚Pinterestโ”‚
โ”‚Images โ”‚  โ”‚Search  โ”‚
โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”˜
    โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Merge & Score  โ”‚
โ”‚  S/A/B/C Grades โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Quality Scoring

Grade

Score

Sources

S

85-100

Tmall HK, Tmall, JD Mall, Brand Sites

A

75-84

JD, Amazon, Taobao, Pinterest

B

60-74

Other e-commerce sites

C

< 60

General websites


Technical Architecture

Browser Automation

  • Puppeteer (primary)

  • Playwright (automatic fallback)

Key Dependencies

{
  "puppeteer": "^22.15.0"
}

Module Structure

google-search-mcp/
โ”œโ”€โ”€ server.js           # MCP server implementation
โ”œโ”€โ”€ lib/
โ”‚   โ””โ”€โ”€ image-search.js # Image search module with AI analysis
โ”œโ”€โ”€ package.json
โ””โ”€โ”€ README.md

Configuration

Optional: AI Analysis API Key

For enhanced image analysis, set your GLM API key:

# Linux/macOS
export GLM_API_KEY=your_api_key_here

# Windows (PowerShell)
$env:GLM_API_KEY="your_api_key_here"

# Windows (CMD)
set GLM_API_KEY=your_api_key_here

Note: The fallback keyword-based search works without an API key.


Examples

Example 1: E-commerce Product Research

Find similar products to: ./images/dinosaur-pencil-case.jpg
Return top 15 results with AI analysis enabled

Output includes:

  • Product image analysis

  • Keywords extracted

  • Dual-platform results (Google + Pinterest)

  • Quality scores with grades

Example 2: Content Research

Search for "MCP protocol Model Context"
Extract full content from top 5 results

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Development Setup

# Install dependencies
npm install

# Run tests
npm test

# Start MCP server (for debugging)
node server.js

Coding Standards

  • Follow existing code style

  • Add comments for complex logic

  • Test your changes thoroughly


Troubleshooting

Puppeteer Chrome Download Issues

If Puppeteer fails to download Chrome:

# Skip Chrome download and use system Chrome
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install puppeteer

MCP Server Not Starting

  1. Check Node.js version: node --version (requires >= 18.0.0)

  2. Verify file path in Claude configuration

  3. Check Claude Code logs for errors

Image Search Returns No Results

  • Verify image path is correct

  • Check internet connection

  • Try disabling AI analysis if API key issues


Limitations

  • Google search may be affected by anti-scraping measures

  • Pinterest direct scraping is limited (uses Google site:pinterest.com filter)

  • API-based AI analysis requires separate GLM API key


Roadmap

  • Add more image search platforms (Behance, Dribbble)

  • Implement local image similarity matching (CLIP/DINOv2)

  • Add result caching

  • Support for more AI vision models


License

This project is licensed under the MIT License - see the LICENSE file for details.


Acknowledgments


Author

Created by ๆˆๅ“ฅ

Special thanks: Developed with Claude Code assistance


Support


โญ Star this repo if it helps you!

Made with โค๏ธ by the open-source community

Available Tools

5 tools
batch_fetch_urlsC

ๆ‰น้‡ๆๅ–ๅคšไธช็ฝ‘้กต็š„ๅ†…ๅฎน

Inputs: urls (required).

fetch_urlB

ๆๅ–ๅ•ไธช็ฝ‘้กตๅ†…ๅฎน๏ผŒ่ฟ”ๅ›žๆ ‡้ข˜ๅ’Œๆญฃๆ–‡

Inputs: url (required).

search_and_extractC

ๆœ็ดขๅŽ่‡ชๅŠจๆๅ–ๅ‰Nไธช็ป“ๆžœ็š„ๅฎŒๆ•ดๅ†…ๅฎน

Inputs: query (required), maxResults.

search_by_imageB

ไธŠไผ ไบงๅ“ๅ›พ็‰‡๏ผŒๆœ็ดข็›ธไผผไบงๅ“ๅ‚่€ƒๅ›พ๏ผˆๆ”ฏๆŒ AI ่ง†่ง‰ๅˆ†ๆž๏ผ‰

Inputs: image_path (required), max_results, enable_ai_analysis.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables web searching and content scraping through Google Custom Search API. Provides tools to search the internet, extract webpage content, and automatically scrape search results for comprehensive information gathering.
      3
      MIT
    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables web search through Google and Wikipedia plus content extraction from any webpage via the Seekr API. Provides real-time search results with advanced filtering options and clean text extraction capabilities.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to search Google for web results, images, videos, news, products, scholarly articles, and patents, plus local business lookup with contact details and ratings, and full text extraction from any page, accepting up to 100 queries in a single call.
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables comprehensive search engine results and data extraction from Google, Bing, Yahoo, DuckDuckGo, YouTube, eBay, and more, returning structured JSON or Markdown. It also provides real-time weather, stock market data, and optional interactive result views.
      -