Google Custom Search MCP
v1.1.1MCP server for Google Custom Search: web and image search via a Programmable Search Engine.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search Web 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 — result…
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query, Google syntax included (quotes, site:, filetype:, OR, -exclusions). |
country | string | Geolocation bias — rank results as if searching from this country, e.g. "de". Soft signal. |
country_restrict | string | Hard filter — only documents Google attributes to this country, e.g. "DE". |
date_restrict | string | Only results from the last N days/weeks/months/years: "d7", "w2", "m6", "y1", ... |
engine_id | string | Programmable Search Engine id (cx) to search with, overriding the configured GOOGLE_CUSTOM_SEARCH_ENGINE_ID. Omit to use the configured engine. |
exact_terms | string | A phrase every result must contain. |
exclude_terms | string | A word or phrase no result may contain. |
file_type | string | Only files of this type, e.g. "pdf", "xlsx", "svg". |
filter_duplicates | boolean | Google's duplicate-content filter (default on). false returns near-duplicate results too. |
include_pagemap | boolean | Attach each result's raw pagemap (OpenGraph/metatags/thumbnails and other structured page data). Verbose — leave off unless you need page metadata. |
interface_language | string | Interface language used to interpret the query, e.g. "de". Improves non-English relevance. |
language | string | Only results in this language, e.g. "en", "de", "zh-CN". |
num | integer | Results per page, 1..10 (API maximum 10; default 10). |
or_terms | string | Space-separated words — each result must contain at least one of them. |
rights | string | License filter: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived (combine with |). |
safe | string | Safe search: active filters adult content, off (the API default) does not. |
site_search | string | A site or domain to include or exclude, e.g. "example.com" — pair with site_search_filter. |
site_search_filter | string | include = only results from site_search, exclude = everything but it. Default include. |
sort | string | Sort expression, e.g. "date" for newest-first. Omit for relevance (usually better). |
start | integer | 1-based index of the first result — use next_start/previous_start from the previous page. The API serves at most 100 results per query, so start + num - 1 must stay <= 100 (enforced: a wider window… |
search_images Image search
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 ne…
| Parameter | Type | Description |
|---|---|---|
query * | string | The search query, Google syntax included (quotes, site:, filetype:, OR, -exclusions). |
color_type | string | mono = black & white, trans = transparent background. |
country | string | Geolocation bias — rank results as if searching from this country, e.g. "de". Soft signal. |
country_restrict | string | Hard filter — only documents Google attributes to this country, e.g. "DE". |
date_restrict | string | Only results from the last N days/weeks/months/years: "d7", "w2", "m6", "y1", ... |
dominant_color | string | Prefer images dominated by this color. |
engine_id | string | Programmable Search Engine id (cx) to search with, overriding the configured GOOGLE_CUSTOM_SEARCH_ENGINE_ID. Omit to use the configured engine. |
exact_terms | string | A phrase every result must contain. |
exclude_terms | string | A word or phrase no result may contain. |
file_type | string | Only files of this type, e.g. "pdf", "xlsx", "svg". |
filter_duplicates | boolean | Google's duplicate-content filter (default on). false returns near-duplicate results too. |
include_pagemap | boolean | Attach each result's raw pagemap (OpenGraph/metatags/thumbnails and other structured page data). Verbose — leave off unless you need page metadata. |
interface_language | string | Interface language used to interpret the query, e.g. "de". Improves non-English relevance. |
language | string | Only results in this language, e.g. "en", "de", "zh-CN". |
num | integer | Results per page, 1..10 (API maximum 10; default 10). |
or_terms | string | Space-separated words — each result must contain at least one of them. |
rights | string | License filter: cc_publicdomain, cc_attribute, cc_sharealike, cc_noncommercial, cc_nonderived (combine with |). |
safe | string | Safe search: active filters adult content, off (the API default) does not. |
site_search | string | A site or domain to include or exclude, e.g. "example.com" — pair with site_search_filter. |
site_search_filter | string | include = only results from site_search, exclude = everything but it. Default include. |
size | string | Image size class, from icon to huge. |
sort | string | Sort expression, e.g. "date" for newest-first. Omit for relevance (usually better). |
start | integer | 1-based index of the first result — use next_start/previous_start from the previous page. The API serves at most 100 results per query, so start + num - 1 must stay <= 100 (enforced: a wider window… |
type | string | Kind of image. |
raw_request Raw Custom Search API call
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 no…
| Parameter | Type | Description |
|---|---|---|
path * | string | API path with query string, relative to https://customsearch.googleapis.com — e.g. "customsearch/v1?q=hello&num=3". |