Google Search MCP Server

Google Search MCP Server

google-search-mcp-fabien-desablens•byfabien-desablens

An MCP server offering Google Search through the Google Custom Search API with automatic API key rotation and quota management.

License: MIT License•Runtime: Awaiting documentation review•Category: search web

WHAT IT DOES

  • •Exposes a google_search tool that accepts a query plus optional filters for result count, start index, SafeSearch, language, geolocation, date range, file type, site restriction, and search type.
  • •Rotates among multiple Google API keys automatically to increase daily search capacity.
  • •Tracks quota usage persistently across sessions, resets daily at midnight UTC, and reports quota status in responses.
  • •Handles errors such as exhausted quota, invalid API keys, and network failures by rotating keys or returning error details.

BEST FOR

  • •Searching the web for current information from an MCP client such as Claude Code.
  • •Running filtered searches limited by date, file type, language, region, or specific site.
  • •Scaling free Google search volume by combining multiple API keys.

ABOUT GOOGLE-SEARCH-MCP-FABIEN-DESABLENS

Google Search MCP Server is cataloged as an MCP server attributed to fabien-desablens. An MCP server offering Google Search through the Google Custom Search API with automatic API key rotation and quota management. It is categorized under search web. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Google Search MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server increase daily search limits?

Each Google Cloud project provides 100 free searches per day, and the server rotates between available keys to use more of them.

How many results can a single search return?

The num parameter controls the number of results from 1 to 10, with a default of 5.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 1f32a4425b76 · 采集于 2026-11-13 10:57:46 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Google Search MCP Server

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

Google Search Server MCP server

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

# 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

{
  "query": "artificial intelligence news"
}
{
  "query": "machine learning",
  "num": 10,
  "lr": "lang_en",
  "gl": "us",
  "dateRestrict": "m1",
  "fileType": "pdf"
}
{
  "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

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Google Search MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/google-search-mcp-fabien-desablens)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related search web MCP Servers

Alternative and complementary servers in the same category

View all in search web →

An MCP server that merges Google Search Console history with a live first-party crawl of your site to produce a prioritised, evidence-backed technical SEO audit inside Claude, complete with paste-ready fixes.

Repository stats unavailable
Search & Web Research

An MCP server that offers intelligent web search using OpenAI reasoning models, with support for fast iterations and deep research.

94
Search & Web Research