search-web

Google Search

by fabien-desablens

Integrate Google Web Search API with auto key rotation, quota control, advanced filters, and site-specific queries for p

Integrates with Google's Custom Search API using automatic key rotation and quota management to provide high-volume web search capabilities with advanced filtering options including language targeting, geolocation, date restrictions, and site-specific queries.

github stars

1

Structured search results with titles and snippetsClean content extraction without ads/scripts

best for

  • / Research and fact-checking workflows
  • / Content analysis and web scraping
  • / AI assistants needing web search capabilities

capabilities

  • / Search the web using Google Custom Search API
  • / Extract clean text content from webpages
  • / Control search result count (1-10 results)
  • / Parse webpage titles and main content
  • / Remove scripts and styling from extracted content

what it does

Searches the web using Google Custom Search API and extracts clean content from any webpage. Requires Google API key and search engine ID setup.

about

Google Search is a community-built MCP server published by fabien-desablens that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate Google Web Search API with auto key rotation, quota control, advanced filters, and site-specific queries for p It is categorized under search web.

how to install

You can install Google Search in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Google Search is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Google Search MCP Server

A Model Context Protocol (MCP) server that provides Google Search functionality with automatic API key rotation and intelligent quota management.

<a href="https://glama.ai/mcp/servers/@Fabien-desablens/google-search-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Fabien-desablens/google-search-mcp/badge" alt="Google Search Server MCP server" /> </a>

Features

  • Official Google Custom Search API integration
  • Automatic API key rotation for increased daily limits
  • Persistent quota tracking across sessions and directories
  • Multi-language and geolocation support
  • Advanced search filters (date, file type, site-specific)
  • SafeSearch content filtering
  • Global configuration - works from anywhere
  • Compatible with Claude Desktop and other MCP clients

Installation

Quick Setup (Recommended)

# Install the package globally
npm install -g @kyaniiii/google-search-mcp

# Run interactive setup
google-search-setup

This will:

  • ✅ Configure your Google API keys interactively
  • ✅ Set up global configuration file
  • ✅ Automatically integrate with Claude Code
  • ✅ Enable 100+ free searches per day per API key

Advanced Installation

git clone https://github.com/Fabien-desablens/google-search-mcp.git
cd google-search-mcp
npm install
npm run build
npm run setup

Uninstallation

Complete Removal

# Remove the package
npm uninstall -g @kyaniiii/google-search-mcp

# Remove from Claude Code
claude mcp remove google-search

# Remove configuration file (if desired)
npm run clean

Note: Configuration file (~/.google-search-mcp.json) is always preserved during updates and uninstallation to protect your API keys. Use npm run clean only if you want to completely remove your configuration.

Configuration

The setup tool creates a global configuration file at:

  • Windows: %USERPROFILE%\.google-search-mcp.json
  • Linux/macOS: ~/.google-search-mcp.json

This file contains:

  • ✅ Your API keys and search engine IDs
  • Persistent quota tracking (survives restarts)
  • ✅ Automatic daily reset at midnight UTC
  • ✅ Cross-directory usage (works from anywhere)

Example Configuration

{
  "keys": [
    {
      "id": "key_1",
      "apiKey": "AIzaSy...",
      "searchEngineId": "abc123...",
      "dailyUsage": 45,
      "dailyLimit": 100,
      "lastReset": "2024-07-30",
      "isActive": true
    }
  ],
  "lastUpdated": "2024-07-30T15:30:00Z",
  "version": "1.0.0"
}

⚠️ Important: If you manually edit the configuration file (~/.google-search-mcp.json), you must restart Claude Desktop for the changes to take effect.

Getting Google API Credentials

1. Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project or select existing
  3. Enable the "Custom Search API"

2. Generate API Key

  1. Navigate to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" > "API Key"
  3. Copy the generated key

3. Create Custom Search Engine

  1. Visit Google Programmable Search Engine
  2. Click "Get started" or "Add"
  3. For "Sites to search", enter * to search the entire web
  4. Copy the Search Engine ID

4. Scale with Multiple Keys

  • Each Google Cloud project provides 100 free searches/day
  • Create multiple projects for more quota (e.g., 3 projects = 300 searches/day)
  • The server automatically rotates between available keys

Usage with Claude Code

After running the setup, the server is automatically configured in Claude Code. You can immediately use it:

User: "Search for latest AI news from this week"
Claude: I'll search for the latest AI news using Google Search...

The server exposes a google_search tool with these parameters:

Required Parameters

  • query (string): Search query

Optional Parameters

  • num (number): Number of results (1-10, default: 5)
  • start (number): Starting index for results
  • safe (string): SafeSearch level ('off', 'active')
  • lr (string): Language restriction (e.g., 'lang_en', 'lang_fr')
  • gl (string): Geolocation (country code: 'us', 'fr', 'uk')
  • dateRestrict (string): Time period ('d1', 'w1', 'm1', 'y1')
  • fileType (string): File type filter ('pdf', 'doc', 'ppt')
  • siteSearch (string): Search specific site
  • siteSearchFilter (string): Include ('i') or exclude ('e') site
  • cr (string): Country restriction ('countryUS', 'countryFR')
  • exactTerms (string): Exact phrase to include
  • excludeTerms (string): Terms to exclude
  • orTerms (string): Alternative terms (OR search)
  • sort (string): Sort by date ('date')
  • searchType (string): Search type ('image' for image search)

Examples

Basic Search

{
  "query": "artificial intelligence news"
}

Advanced Search

{
  "query": "machine learning",
  "num": 10,
  "lr": "lang_en",
  "gl": "us",
  "dateRestrict": "m1",
  "fileType": "pdf"
}

Site-Specific Search

{
  "query": "typescript tutorial",
  "siteSearch": "stackoverflow.com",
  "siteSearchFilter": "i"
}

Quota Management

The server provides real-time quota information in each response:

{
  "results": [...],
  "metadata": {
    "quotaStatus": {
      "totalUsed": 15,
      "totalLimit": 300,
      "keysStatus": [
        {
          "id": "key_1",
          "used": 15,
          "limit": 100,
          "remaining": 85,
          "active": true
        }
      ]
    }
  }
}

Quota Features

  • Automatic daily reset at midnight UTC
  • Intelligent key rotation when limits are reached
  • Disabled keys automatically reactivate after reset
  • Persistent tracking across server restarts
  • No charges - stops at free tier limits

Error Handling

The server gracefully handles various error scenarios:

  • Quota Exceeded: Automatically rotates to next available key
  • All Keys Exhausted: Returns clear error message with quota status
  • Invalid API Key: Disables the key and continues with others
  • Network Errors: Returns detailed error information

Development

Prerequisites

  • Node.js 18+
  • TypeScript
  • Google Cloud account

Scripts

# Development mode with auto-reload
npm run dev

# Build for production
npm run build

# Start server
npm start

# Setup configuration
npm run setup

Project Structure

google-search-mcp/
├── src/
│   ├── index.ts         # Entry point
│   ├── server.ts        # MCP server setup
│   ├── config.ts        # Configuration wrapper
│   ├── global-config.ts # Global config manager
│   └── tools/
│       └── search.ts    # Search implementation
├── build/               # Compiled JavaScript
├── setup.js             # Interactive setup tool
└── package.json

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details

Support

For issues, questions, or contributions, please visit: https://github.com/Fabien-desablens/google-search-mcp

FAQ

What is the Google Search MCP server?
Google Search is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Google Search?
This profile displays 10 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.5 out of 5—verify behavior in your own environment before production use.
MCP server reviews

Ratings

4.510 reviews
  • Shikha Mishra· Oct 10, 2024

    Google Search is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Piyush G· Sep 9, 2024

    We evaluated Google Search against two servers with overlapping tools; this profile had the clearer scope statement.

  • Chaitanya Patil· Aug 8, 2024

    Useful MCP listing: Google Search is the kind of server we cite when onboarding engineers to host + tool permissions.

  • Sakshi Patil· Jul 7, 2024

    Google Search reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Ganesh Mohane· Jun 6, 2024

    I recommend Google Search for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.

  • Oshnikdeep· May 5, 2024

    Strong directory entry: Google Search surfaces stars and publisher context so we could sanity-check maintenance before adopting.

  • Dhruvi Jain· Apr 4, 2024

    Google Search has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.

  • Rahul Santra· Mar 3, 2024

    According to our notes, Google Search benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.

  • Pratham Ware· Feb 2, 2024

    We wired Google Search into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Yash Thakker· Jan 1, 2024

    Google Search is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.