Grok Build + Wayfern

Grok Build reads the page before it writes the code.

  • grok mcp add
  • ~/.grok/config.toml
  • Reads Claude Code MCP settings

Grok Build reads your repo in the terminal. The docs, changelogs and error threads it needs are on the live web, and many of those sites block automated visits.

Add Wayfern with one command, and Grok Build calls scrape_page, search_web and capture_screenshot as tools. Each result comes back as markdown, JSON or an image URL, with its cost in credits.

A Grok Build terminal. The grok mcp add command types in, and /mcps lists wayfern with its tools. Grok calls scrape_page on a changelog, and a list of three breaking changes appears next to the code.

Setup

Add the server to Grok Build.

Grok Build handles the OAuth sign-in for a remote HTTP server.

  1. 1

    Install Grok Build

    Skip this when it is installed.

    bash

    curl -fsSL https://x.ai/cli/install.sh | bash
  2. 2

    Add the server

    bash

    grok mcp add --transport http wayfern https://api.wayfern.com/mcp
  3. 3

    Or write config.toml

    Add --scope project to the command, or write .grok/config.toml in the repo, to share it with the team.

    ~/.grok/config.toml

    [mcp_servers.wayfern]
    url = "https://api.wayfern.com/mcp"
  4. 4

    Sign in and check

    The first call opens the wayfern.com sign-in. Sign in and click Allow. grok mcp doctor wayfern checks the server, and /mcps in the TUI lists its tools.

Other ways to connect

  • With a token

    For CI and shared machines. Grok Build expands ${WAYFERN_API_TOKEN} in headers when it runs.

    bash

    grok mcp add --transport http wayfern https://api.wayfern.com/mcp \
      --header 'Authorization: Bearer ${WAYFERN_API_TOKEN}'
  • As an agent skill

    Grok Build loads skills from ~/.grok/skills and also reads Claude Code skills. The skill needs WAYFERN_API_TOKEN in the environment.

    bash

    mkdir -p ~/.grok/skills/wayfern
    curl -fsSL https://wayfern.com/skills/wayfern/SKILL.md -o ~/.grok/skills/wayfern/SKILL.md
  • Set up in Claude Code already?

    Grok Build reads Claude Code's MCP servers. A wayfern entry there works with no new step.

Route

One command, OAuth on first use.

Grok Build adds remote HTTP servers and handles the OAuth sign-in. One sign-in covers every Wayfern tool.

Remote MCP OAuth sign-in
Best fit
grok mcp add --transport http, with OAuth on the first call.
MCP + token Authorization header
Works
--header with ${WAYFERN_API_TOKEN}. Good for CI.
Agent skill SKILL.md
Works
Put SKILL.md in ~/.grok/skills/wayfern. The bash tool runs curl.
REST API api.wayfern.com/api/v1
Works
Grok Build can write code that calls api.wayfern.com/api/v1 directly.
Browser API Playwright over CDP
Works
Grok Build can write Playwright code that connects to a Wayfern browser over CDP.

Example tasks

Jobs next to the code

  • 01

    Check an SDK change

    “Read the changelog of the Stripe Node SDK since our pinned version and list the breaking changes for src/billing.”

    scrape_page at 1 credit a page.

  • 02

    Review landing pages

    “Capture the five landing pages in marketing/urls.txt and list the layout problems on each.”

    capture_screenshot costs 5 credits a capture.

  • 03

    Make test fixtures

    “Extract name, price and rating of the first 20 products on this public demo shop into fixtures/products.json.”

    extract_data bills 1 credit for each uncached source page.

  • 04

    Compare two libraries

    “Search Google and Bing for comparisons of Zod and Valibot from this year and summarise the trade-offs.”

    search_web bills 2 credits for each provider page.

Tools

What Grok Build 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

Permission modes
Grok Build asks by default. In auto mode a classifier approves safe tools. Deny rules always win.
Access
Grok Build is an early beta for SuperGrok and X Premium Plus subscribers.
Headless
grok -p "..." --output-format json runs it from CI.