# Google Custom Search MCP [Health: Active]

**Category:** 🔎 Search & Data Extraction  
**Repository:** https://github.com/A1-x-Tech/mcp-google-custom-search  
**GitHub Stars:** 0  
**npm Downloads (last month):** 803  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/google-custom-search-mcp

## Description
MCP server for Google Custom Search: web and image search via a Programmable Search Engine.

## Tools
Capabilities this server exposes over MCP:

- **search** — Web search through your Google Programmable Search Engine (Custom Search JSON API). Returns query, total_results (Google's estimate — it can shrink while paging), search_time_seconds, corrected_query (spelling suggestion; results are still for the original query), next_start/previous_start page cursors, and items[] with title, url, display_link, snippet, mime/file_format and (with include_pagemap) pagemap metadata. Coverage is the engine's configuration: an engine listing specific sites searches only those; open-web search needs "Search the entire web" enabled in its control panel — results still differ from google.com. Max 10 results per call and 100 per query: paginate by passing next_start as start. Each call costs one unit of the daily quota (free tier 100/day), so prefer one precise query over many broad ones. Note: this is Programmable Search, NOT Google Search Console — it cannot report how your own site is indexed or ranked.
- **search_images** — Image search through your Google Programmable Search Engine (searchType=image). Works only when the engine has "Image search" enabled in its control panel — otherwise the API answers 400. Each item's url is the image file itself; image.context_url is the page hosting it, with width/height/byte_size and a thumbnail_url (plus its dimensions) for previews. Everything else matches the search tool: same filters (language/country, safe search, site include/exclude, date_restrict, file_type, rights — use rights for reusable images), same pagination (max 10 per call, 100 per query, paginate via next_start), same quota (one unit per call). Image-only filters: size (icon..huge), type (clipart/face/lineart/stock/photo/animated), color_type (mono/gray/color/trans) and dominant_color.
- **raw_request** — Escape hatch: performs a GET against any Custom Search JSON API path and returns the raw, unnormalized response envelope (queries.request/nextPage, searchInformation, promotions, context, items[] with htmlSnippet/htmlTitle/formattedUrl and the full pagemap). Use it for parameters the typed tools don't expose (lowRange/highRange, c2coff, hq, fields) — e.g. path "customsearch/v1?q=test&num=3&fields=items(title,link)". The API key is added automatically (in a header, never the URL) and the configured engine id is filled in when the path has no cx parameter. The API has GET endpoints only, so nothing here can modify data.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "google-custom-search-mcp": {
    "command": "npx",
    "args": ["-y","mcp-google-custom-search@latest"],
    "env": {
      "GOOGLE_CUSTOM_SEARCH_API_KEY": "",
      "GOOGLE_CUSTOM_SEARCH_ENGINE_ID": ""
    }
  }
}
```

**Requires environment variables:** `GOOGLE_CUSTOM_SEARCH_API_KEY`, `GOOGLE_CUSTOM_SEARCH_ENGINE_ID` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Google Custom Search MCP does

Google Custom Search MCP exposes Google Programmable Search Engine queries as MCP tools for AI applications. It supports two structured search modes—web and images—and a lower-level GET operation for parameters that the structured tools do not expose. All operations are read-only because the underlying Custom Search JSON API has no write endpoint.

The configured Programmable Search Engine determines the search coverage. An engine may target a set of sites or search the wider web when that option is enabled. Results can therefore differ from those returned by google.com. The service is intended for finding and inspecting search results, not for checking how a site is indexed or ranked in Google Search Console.

## How it works

Each request uses a Google Cloud API key and a Programmable Search Engine ID, commonly called `cx`. The server sends the key in the `X-Goog-Api-Key` header rather than placing it in the request URL. A per-call engine ID can override the configured default.

Web results are normalized to include titles, links, snippets, metadata, and pagination cursors. Image results include image files, dimensions, thumbnails, and the pages hosting them. The API returns up to 10 results in one call and allows up to 100 results for a query across pages. `next_start` and `previous_start` cursors support navigation between result pages.

## Setup and configuration

Run the npm package with Node.js 20 or newer. The server requires these environment variables:

- `GOOGLE_CUSTOM_SEARCH_API_KEY`: Google Cloud API key with the Custom Search API enabled.
- `GOOGLE_CUSTOM_SEARCH_ENGINE_ID`: Programmable Search Engine ID (`cx`).

A typical stdio launch command is:

```bash
npx -y mcp-google-custom-search@latest
```

Configure that command and the two environment variables in the MCP client. The package includes setup examples for Codex, Claude Code, Claude Desktop local configurations, Cursor, and VS Code. VS Code can prompt for the key and engine ID instead of storing their values directly in its server configuration.

## Tools and capabilities

The server provides three tools:

- Web search for pages matching a natural-language query.
- Image search for image files, thumbnails, dimensions, and source pages.
- A raw GET escape hatch for directly passing Custom Search JSON API parameters.

Search requests can narrow results by language, country, date, site, file type, exact phrases, excluded terms, usage rights, and other supported API options. Image searches can filter by properties such as size, type, color, and image category. The raw operation can access parameters such as `fields`, `lowRange`, `highRange`, and `hq`, as well as the complete response envelope with promotions and `pagemap` data.

## Limitations and notes

Image search must be enabled in the Programmable Search Engine configuration; otherwise Google returns an error. The API enforces a maximum result window: `start + num - 1` cannot exceed 100, and the server rejects requests that exceed this boundary before making the API call.

Google’s `total_results` value is an estimate and may change while paging. A `corrected_query` value is only a spelling suggestion; returned results still correspond to the original query. Engine configuration controls coverage and ranking, so this server is not a substitute for Google Search Console and cannot report a site’s indexing or ranking status.

_Full upstream README: https://allmcps.com/mcp/google-custom-search-mcp/readme_

