Gemini + Wayfern

Gemini gets three search engines and a real browser.

  • Gemini CLI, agy or the app
  • httpUrl, serverUrl or a custom app
  • Works with gemini -p

Gemini grounds its answers in Google Search. For results from other engines, or for a page that blocks bots, it has nothing to read.

With Wayfern as an MCP server, Gemini calls search_web on Google, Bing and DuckDuckGo, scrapes pages to markdown and captures screenshots. Each call runs in an anti-detect browser and reports its credits.

A Gemini CLI terminal. The gemini mcp add command types in, and a browser tab shows the Wayfern sign-in. Back in the terminal, Gemini calls search_web on three engines, and three ranked lists appear side by side.

Setup

Three Gemini tools, three ways in.

Pick the one you use. Since 18 June 2026, Gemini CLI serves paid API keys and enterprise licences. Personal Google accounts use Antigravity CLI.

  1. 1

    Gemini CLI

    Run this, then start gemini. A browser opens on wayfern.com. Sign in and click Allow. /mcp auth wayfern signs in again.

    bash

    gemini mcp add --transport http --scope user wayfern https://api.wayfern.com/mcp
  2. 2

    Or edit settings.json

    Use httpUrl. The key url means SSE, and Wayfern serves Streamable HTTP.

    ~/.gemini/settings.json

    {
      "mcpServers": {
        "wayfern": { "httpUrl": "https://api.wayfern.com/mcp" }
      }
    }
  3. 3

    Antigravity CLI

    agy registers itself with Wayfern and opens the sign-in. /mcp shows the status.

    ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "wayfern": { "serverUrl": "https://api.wayfern.com/mcp" }
      }
    }
  4. 4

    Gemini app

    On gemini.google.com, open Settings, Connected Apps, Custom apps, Add a custom app. Enter the URL and sign in on wayfern.com. It then works in the mobile app too.

Other ways to connect

  • A token in Gemini CLI

    For CI and shared machines. Create a token with the mcp scope on the Tokens page.

    bash

    gemini mcp add --transport http --scope user \
      --header "Authorization: Bearer $WAYFERN_API_TOKEN" wayfern https://api.wayfern.com/mcp
  • Headless runs

    With -p, Gemini CLI refuses tool calls that need a confirmation. Mark the server as trusted.

    ~/.gemini/settings.json

    {
      "mcpServers": {
        "wayfern": { "httpUrl": "https://api.wayfern.com/mcp", "trust": true }
      }
    }
  • As an agent skill

    Gemini CLI loads skills from ~/.gemini/skills. /skills reload picks up a new one. The skill needs WAYFERN_API_TOKEN in the environment.

    bash

    mkdir -p ~/.gemini/skills/wayfern
    curl -fsSL https://wayfern.com/skills/wayfern/SKILL.md -o ~/.gemini/skills/wayfern/SKILL.md

Route

One URL for the terminal and the phone.

Gemini CLI, Antigravity CLI and the Gemini app all take a remote MCP server with OAuth. The same Wayfern account and balance serve all three.

Remote MCP OAuth sign-in
Best fit
httpUrl in Gemini CLI, serverUrl in agy, a custom app in the Gemini app.
MCP + token Authorization header
Works
--header in Gemini CLI, for CI and gemini -p.
Agent skill SKILL.md
Works
Gemini CLI loads SKILL.md from ~/.gemini/skills and runs curl with run_shell_command.
REST API api.wayfern.com/api/v1
Works
Gemini CLI can write code that calls api.wayfern.com/api/v1 directly.
Browser API Playwright over CDP
Works
Gemini CLI can write Playwright code that connects to a Wayfern browser over CDP.

Example tasks

Research across engines

  • 01

    Compare the engines

    “Search Google, Bing and DuckDuckGo for project management software for agencies. Show where each brand ranks on each engine.”

    search_web with three engines bills 2 credits for each provider page.

  • 02

    Search one market

    “Search Google for waterproof running shoes with region DE and language de. List the top 10 results and the ads.”

    search_web takes region and language hints.

  • 03

    Read the sources

    “Read the five top results and summarise what each one says about battery life, with a link to each.”

    scrape_page reads each page for 1 credit.

  • 04

    Count the product pages

    “List the URLs of every product page on example-shop.com and count them by category.”

    map_site bills 2 credits for each 10 URLs.

Tools

What Gemini can call

The same tools on every route, at the REST API rates. Every result reports credits_charged.

All tool inputs
  • scrape_page Fetch one page through an anti-detect browser and return clean markdown, HTML, links and metadata. The screenshot, pdf and json formats add +4 credits (once); summary adds +2. 1 credit / page
  • extract_data Extract structured data from one or more pages with a prompt and an optional JSON Schema. Re-running over pages already fetched is free. 1 credit / uncached source page
  • map_site List a site's URLs from its sitemaps and page links. 2 credits / 10 URLs
  • capture_screenshot Capture a clean image of a page: cookie banners and ads removed, lazy images loaded, tall pages captured end to end. Returns a short-lived download URL and an artifact key, not image bytes. Slices of a full page cost nothing extra; a fail_if_contains match is not charged. 5 credits / capture
  • brand_profile Identity, colours, logos, social links and company metadata for a domain. 10 credits / profile
  • site_styleguide Colours, typography, spacing, radii, shadows and the design tokens a site declares. 10 credits / site
  • site_fonts Font families, where each is served from, available weights, file formats and where they are used. 5 credits / site
  • crawl_site Start a bounded multi-page crawl. Returns a job id immediately and charges nothing up front; pages are billed as the crawl runs. 1 credit / successful page
  • crawl_status Poll a crawl started with crawl_site and read a page of its results. The pages were billed as they were crawled. Free
  • search_web Search Google, Bing, and DuckDuckGo. Returns ranked results, ads, provider failures, pagination, and related queries. 2 credits / provider page
  • list_search_engines List live provider ids and labels. Free

Good to know

Gemini app limits
Custom apps need age 18 or more, the US, a personal Google Account, English and Keep Activity on. Gemini asks you before each write action.
Credits
Each tool result has credits_charged. list_search_engines and get_usage are free.