Search Search Search MCP
README.md
# Search Search Search MCP

A stdio MCP server for AI agents that searches Google in a real browser, reads the
pages it finds and returns the text with the links it resolved.
It is not a search index. Google does the indexing; this server does the work that
comes after a results page: resolving Google's redirect tokens, reading the pages,
extracting their content and reporting what was actually obtained.
## What it is
- MCP tools: `search`, `search_parallel`, `scholar_search`, `extract`, `health`.
- A browser client with a persistent profile, not an HTTP client.
- No API key, no proxy fleet, no second search engine.
- An optional local project memory, off unless `SURF_RESEARCH=true`.
## What it does
### Search
- runs the query in Chromium and reads the rendered results page.
- the SERP parser keeps several candidate selectors, verifies the result block
geometrically and records which strategies work. A Google markup change drops one
strategy instead of breaking the parse, and `health` shows the win and loss
counts per strategy.
- ad blocks are filtered out of the result set.
- `pages` (1 to 5) walks further SERP pages only when the call asks, one page at a
time, and stops early when the requested number of results is reached. Results
repeated across pages are dropped.
- `search_parallel` runs 2 to 12 independent queries in one call, keeps a separate
result group per query and marks a page that already appeared as `duplicate_of`
instead of repeating it. Google's original order is preserved.
- `scholar_search` returns paper metadata: authors, venue, year, citation count and
a full-text link when one exists.
### Link resolution
Google returns `/url` and `/goto` tokens rather than direct addresses.
- tokens are resolved inside the browser session that ran the search, with its
cookies, bounded concurrency and a time budget.
- redirect notice pages are unwrapped to their destination.
- a verification page stops resolution early instead of spending the whole budget.
- a link that does not resolve is reported as unresolved, and the totals count only
what was actually read.
### Reading pages
- `extract` reads one URL: main content through Mozilla Readability, HTML converted
to Markdown, and a fallback text extractor when Readability fails.
- search calls can set `extract_mode` to `none`, `abstract` or `full`, so snippets
or page text arrive without a second request. `extract` has matching `metadata`,
`abstract` and `full` modes.
- PDF text, native DOCX, PPTX and HWP reading, image metadata and optional OCR.
Bibliographic metadata is merged when a PDF carries it.
- GitHub repositories are read as README plus sparse code indexing.
- every capture reports `extraction_quality`, `source_length` and `truncated`, so a
stub page is not passed off as a full read.
- captures are kept for 5 minutes; `body_handle` with `query` and `exclude_spans`
reads more of the same capture without another fetch, and `deep_read` raises the
capture ceiling for large sources.
### Links inside pages
- a fully read page yields the links inside its content, each with anchor text, a
canonical URL and a type: repository, repository file, pull request, issue,
paper, documentation, benchmark, dataset, specification, video, discussion forum
or article.
- tracking parameters are stripped, junk hosts and paths are dropped, duplicates
are removed, and the result is capped at 20 links per page and 3 per host by
default.
- the agent chooses which links to open. Nothing is followed automatically.
### Reports and caching
- responses carry a research contract that marks each requirement as met, partial or
missing, lists evidence candidates and suggests the next action.
- a failed or empty retrieval is reported as degraded, never as answered.
- caches: search results for 15 minutes, degraded and empty answers for 5, extraction
captures for 5 minutes or 16 MB.
- the limiter holds traffic at ten requests per minute by default and waits for a
slot within its budget instead of failing the call.
- the debug log attributes time per phase when `SURF_DEBUG_LOG` is set.
### Diagnostics
- `health` reports the limiter, cache contents, selector statistics, browser pool
state, CAPTCHA counters and the build identity.
### Project memory (optional)
- exact, keyword, vector and graph retrieval over indexed local sources, fused with
RRF, plus durable records, snapshots and exports, on an embedded database.
- off unless `SURF_RESEARCH=true`.
## The CAPTCHA solver
The repository includes a CAPTCHA solver that answers checkbox and image-grid
challenges in the same tab. It is disabled by default: a challenged search stops
and reports the block, and the recovery window goes to a person.
The solver works. The probe behind `npm run test:captcha` clears a real 3x3
challenge on a cold profile in about 100 seconds, and the GAIA run in Results
cleared 13 checks. It is a research component for personal use, not the point of
the product, and it can change between versions.
Enable it with `SURF_CAPTCHA_AUTO=on`. It can then use:
- a bundled 14-class ONNX classifier, offline, no key. On by default when the
solver is on (`SURF_CAPTCHA_CLASSIFY=on`).
- an optional vision endpoint for grids the classifier cannot name
(`SURF_CAPTCHA_VISION_URL`, any OpenAI-compatible image model).
- a person: a headed window with a `SURF_CAPTCHA_HUMAN_MS` budget, which is also
the only option when the solver is off.
A notice page with no challenge widget at all is treated as a hard block and
reported, not waited out. On a headless host set `SURF_CAPTCHA_HEADLESS=on`; a
challenge then ends the call. The classifier clears ordinary 3x3 grids. A dynamic
4x4 chain can outlast it and needs the vision endpoint or a person.
## Install
```powershell
git clone <this repo> search-search-search-mcp
cd search-search-search-mcp
npm run install-deps # npm ci --ignore-scripts in third_party/search-engine (deps pinned by package-lock.json)
npm run install-browser # the Chromium build matching the pinned playwright
```
`--ignore-scripts` is required: the upstream package's `prepare` hook runs `tsc`,
but the published tarball ships build output only and no `src/`. Skipping scripts
also keeps optional dependencies intact, which `sharp` needs for classifier
preprocessing.
If you already have a Chromium or Chrome you trust, skip `install-browser` and set
`CHROME_PATH` to that executable. Disk use is about 900 MB for dependencies, 150 MB
for Chromium and 20 MB for the classifier.
## Configure
This is a plain stdio server. Any host that can spawn a process and pass it
environment variables can run it. The command is:
```powershell
node third_party/search-engine/build/cli.js
```
[`config/search-search-search.env.example`](config/search-search-search.env.example)
lists the settings with their defaults and the values measured for this project,
without assuming any particular host. The server reads the process environment
only and does not load that file itself, so pass it to your host, point
`node --env-file=` at it, or export the values. An empty environment runs on the
defaults. [`config/dsh-profile.example.yml`](config/dsh-profile.example.yml)
carries the same values in DeepSeek Harness profile shape.
The reference environment pins `SURF_LOCALE=en-US`, because the page markers and
the solver's challenge wording are English.
### Host configuration
A host needs the command, a working directory and the environment. The exact
configuration file depends on the host; this is the common shape:
```json
{
"mcpServers": {
"search-search-search": {
"command": "node",
"args": ["<REPO>/third_party/search-engine/build/cli.js"],
"env": {
"SURF_PROFILE_ROOT": "<HOME>/search-search-search-profile",
"SURF_LOCALE": "en-US"
}
}
}
}
```
The key is the name that host will show. The tools are `search`, `search_parallel`,
`scholar_search`, `extract` and `health`.
## Tests
```powershell
npm test # offline: link typing, research contract, MCP surface
npm run test:live # live Google, including a possible visitor check
npm run test:captcha # the solver against a cold profile
```
`npm test` passes locally with 22, 19 and 18 checks and runs in CI. The live
probes open a throwaway profile, so Google often challenges them on purpose, which
is what they test.
## Results
- live run with the solver enabled: visitor check cleared in 76 seconds, 4 results
returned, every link resolved. A deep search resolved 8 of 8 links in 33
seconds, and `extract` returned 5 typed links in 2.7 seconds.
- the classifier alone cleared ordinary 3x3 grids in about 100 seconds. It did not
clear a dynamic 4x4 chain within one budget; the vision endpoint and a person are
the fallbacks.
- GAIA Level 3, 26 questions: 24 exact matches and 25 by human judgement. Method,
model settings and caveats are in
[benchmarks/gaia/README.md](benchmarks/gaia/README.md).
## Intended use
One person, one agent, one question at a time: look something up, read a few pages,
come back with sources.
Made for:
- individual research with a personal AI agent, where a person starts the work;
- following a result, opening a PDF, checking a claim;
- occasional lookups of publicly accessible pages;
- following a link found inside a page to its original source.
Not made for:
- bulk harvesting or crawling whole sites;
- unattended loops with no human and no question;
- being the guaranteed search backend of a team or a nightly job.
The solver stays off unless you enable it. With it on, a challenge is answered in
the same tab and the query continues; if Google replies with a plain notice, the
call reports that and stops. That remains a convenience for personal research,
not a claim about Google's terms.
The server is independent and not affiliated with Google.
## Layout
```
.github/workflows/ CI: the offline test suite
ACKNOWLEDGEMENTS.md who made what, and what is still uncertain
THIRD_PARTY_NOTICES.md license record for vendored code, model, and data
UPSTREAM.md provenance and the exact delta against upstream
benchmarks/gaia/ the GAIA Level 3 reproduction: data, harness, graded score
config/ reference environment, plus one host integration example
tests/ offline checks, live probes, challenge probes
third_party/
search-engine/ vendored upstream build (patched in place)
```
## License
**AGPL-3.0-only.** The full text is in [LICENSE](LICENSE), and it applies to this
project's own files.
Copyright (c) 2026 Search Search Search MCP contributors.
Vendored components keep their own licenses and are not relicensed: the upstream
engine is MIT, the Transformers.js runtime is Apache-2.0, and the bundled
classifier is an MIT project's export of weights trained with the AGPL-3.0
Ultralytics toolkit. That is why this repository is AGPL-3.0-only.
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) records each component.
Running the server for yourself, or offering unmodified services, is unaffected by
the AGPL network clause. Section 13 applies when a modified version is offered as
a network service.
## Acknowledgements
Almost none of the hard parts are ours. What this build uses is credited below.
### Software and engines
1. **[HarimxChoi](https://github.com/HarimxChoi), [Google Surf MCP](https://github.com/HarimxChoi/google-surf-mcp)** (MIT).
The engine this project is built on: browser architecture, SERP handling,
extraction, auto ontology, the research contract. Vendored at
[`third_party/search-engine`](third_party/search-engine) and patched in place.
See [UPSTREAM.md](UPSTREAM.md) for every change.
2. **[Vincent Kaufmann](https://github.com/engram-ae), [NoAPI Google Search MCP](https://github.com/engram-ae/noapi-google-search-mcp)**.
A reference implementation of browser-first Google search and content tooling
(page fetching, media and feed handling). Not vendored, credited as design
input.
3. **[YIJUN KIM (cateyelow)](https://github.com/cateyelow), [reCAPTCHA IA Solver](https://github.com/cateyelow/recaptcha_ia_solver)** (MIT).
The 14-class tile classifier behind the optional solver. The ONNX export ships
in this repository and is driven by our own
[`captchaClassify.js`](third_party/search-engine/build/captchaClassify.js).
The repository is MIT, and the trained weights follow the terms of the toolkit
that produced them (next entry).
4. **[Ultralytics](https://github.com/ultralytics/ultralytics), YOLO** (AGPL-3.0).
The architecture and training toolkit behind that classifier. Ultralytics
licenses trained YOLO models under AGPL-3.0 by default, which is why this
repository is AGPL-3.0-only.
### Training data and model provenance
5. **[DannyLuna](https://huggingface.co/DannyLuna), [recaptcha-57k-images-dataset](https://huggingface.co/datasets/DannyLuna/recaptcha-57k-images-dataset)**.
One of the two image sets the classifier learned from.
6. **[verytuffcat](https://huggingface.co/verytuffcat), [recaptcha-dataset](https://huggingface.co/datasets/verytuffcat/recaptcha-dataset)**.
The second image set.
7. **Brian (deathlyface), [recaptcha-dataset](https://github.com/AdityaJain1030/recaptcha-dataset)**.
An earlier CAPTCHA image collection, plausibly an ancestor of the verytuffcat
set.
8. **[Google](https://storage.googleapis.com/openimages/web/index.html), Open Images V7**.
The corpus behind the `yolov8x-oiv7` detector the upstream solver uses as a
fallback for challenge words outside its 14 classes.
What is vendored, what is used and what is still uncertain (including the
licensing of the verytuffcat images and the two readings of the YOLO terms) is in
[ACKNOWLEDGEMENTS.md](ACKNOWLEDGEMENTS.md). The file-by-file license record is in
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
## Upstream provenance
The engine is a vendored, patched build of `google-surf-mcp` 1.1.8 (MIT), kept in
`third_party/search-engine`. It is not a GitHub fork: there is no upstream branch
to merge and no `src/` tree. Every modified file, with added and removed line
counts against the published package, is recorded in [UPSTREAM.md](UPSTREAM.md).
The server identifies itself as `search-search-search-mcp`.
Google and reCAPTCHA are trademarks of Google LLC. This project is not affiliated
with, sponsored by, or endorsed by Google.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues