Cursor + Wayfern

The Agent reads the live web next to your code.

  • ~/.cursor/mcp.json
  • OAuth with PKCE
  • The Cursor CLI reads the same file

Cursor's Agent knows your code. It does not know what a library's docs say this week, or how your production site looks to a visitor.

With Wayfern in mcp.json, the Agent calls scrape_page, search_web and capture_screenshot. Each call runs in an anti-detect browser in Wayfern's cloud and returns markdown, JSON or an image URL.

Cursor with a code file and the Agent panel. The Agent calls scrape_page on a docs page, the markdown shows in a tool card, and two lines of the wrapper change in the editor.

Setup

One entry in mcp.json.

Put it in ~/.cursor/mcp.json for all projects, or in .cursor/mcp.json to share it with the team.

  1. 1

    Add the server

    ~/.cursor/mcp.json

    {
      "mcpServers": {
        "wayfern": { "url": "https://api.wayfern.com/mcp" }
      }
    }
  2. 2

    Sign in

    Cursor starts the OAuth sign-in. Sign in on wayfern.com and click Allow.

  3. 3

    Check the tools

    Open Customize, MCPs. Wayfern shows its tools.

  4. 4

    Ask the Agent

    prompt

    Read the current docs for the payments SDK's createCheckout call and fix our wrapper in lib/checkout.ts to match.

Other ways to connect

  • With a token

    Set WAYFERN_API_TOKEN to a token with the mcp scope in your shell startup file, for example ~/.zshrc.

    ~/.cursor/mcp.json

    {
      "mcpServers": {
        "wayfern": {
          "url": "https://api.wayfern.com/mcp",
          "headers": { "Authorization": "Bearer ${env:WAYFERN_API_TOKEN}" }
        }
      }
    }
  • Cursor CLI

    The agent command reads the same mcp.json.

    bash

    agent mcp login wayfern
    agent -p --trust --approve-mcps "With Wayfern, read the changelog of our UI library and list the breaking changes"
  • As an agent skill

    Cursor loads skills from ~/.cursor/skills and ~/.agents/skills, and also from ~/.claude/skills. The skill needs WAYFERN_API_TOKEN in the environment.

    bash

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

Route

MCP keeps the terminal free.

With MCP, the Agent calls Wayfern as a tool and needs no terminal approval or network access in the sandbox. One sign-in covers every tool.

Remote MCP OAuth sign-in
Best fit
OAuth with PKCE, from an entry in mcp.json.
MCP + token Authorization header
Works
A wf_ token in headers, read from an environment variable.
Agent skill SKILL.md
Works
Put SKILL.md in ~/.cursor/skills/wayfern. The Agent runs curl in the terminal.
REST API api.wayfern.com/api/v1
Works
The Agent can write code that calls api.wayfern.com/api/v1 directly.
Browser API Playwright over CDP
Works
The Agent can write Playwright code that connects to a Wayfern browser over CDP.

Example tasks

Web jobs for the Agent

  • 01

    Match the docs

    “Read the current docs for the payments SDK's createCheckout call and fix our wrapper in lib/checkout.ts to match.”

    scrape_page at 1 credit a page.

  • 02

    Check production on a phone width

    “Capture https://example.com/pricing in dark mode at 390 pixels wide and tell me if the plan cards overflow.”

    capture_screenshot costs 5 credits. width goes down to 320.

  • 03

    Copy design tokens

    “Get the styleguide of stripe.com and write its colours and radii as Tailwind theme tokens.”

    site_styleguide costs 10 credits for a site.

  • 04

    Debug from search

    “Search Google and DuckDuckGo for this hydration error and list the causes that people confirm.”

    search_web bills 2 credits for each provider page.

Tools

What Cursor 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

Approvals
The Agent asks before each MCP tool call by default. In Cursor 3.6 and later, Auto-review runs allowlisted tools at once.
localhost
Wayfern's browsers run in Wayfern's cloud, so they cannot reach localhost on your computer. Use a public staging URL.