MCP

Wayfern MCP server

Give your AI agents the live, anti-detect web through a standard remote MCP connection: search across Google, Bing and DuckDuckGo, then scrape, crawl, map, extract, screenshot and profile any site. Sign in with OAuth or send an API token.

View as Markdown

Connect with OAuth

Give your client the endpoint URL and nothing else. On first use it opens a Wayfern sign-in page in your browser. Sign in, check the app name and where it returns to, and select Allow. There is no token to copy.

POST /mcp OAuth sign-in or Bearer wf_ token · mcp scope

https://api.wayfern.com/mcp

Claude Code

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

MCP client configuration (OAuth)

{
  "mcpServers": {
    "wayfern": {
      "type": "http",
      "url": "https://api.wayfern.com/mcp"
    }
  }
}

Chat apps such as Claude and ChatGPT take the same URL as a custom connector or remote MCP server and show the same sign-in.

Transport

Streamable HTTP. Stateless requests, and sessions for older clients.

Access

Active plan or positive credit balance required.

Security

Origin checks, one-hour access tokens, and connections you can revoke.

An OAuth connection has the same tool access as an API token with the mcp scope, never admin tools. Its access token lasts one hour. The client gets a new one with its refresh token, which expires after 60 days without use. Revoke a connection under Connected apps on the API tokens page, and its next MCP call fails.

For client developers: a call without a token gets 401 with WWW-Authenticate: Bearer resource_metadata="https://api.wayfern.com/.well-known/oauth-protected-resource/mcp", scope="mcp". The authorization server metadata is at https://api.wayfern.com/.well-known/oauth-authorization-server. It supports Dynamic Client Registration, Client ID Metadata Documents, the authorization code grant with PKCE (S256 only), refresh token rotation, revocation, and the resource parameter.

Connect with an API token

Use this when the client cannot open a browser, or for CI and scripts. Create an API token with the mcp scope in the dashboard, and send it in the Authorization header. Put the token in your client's secret storage; never commit it.

MCP client configuration (API token)

{
  "mcpServers": {
    "wayfern": {
      "type": "http",
      "url": "https://api.wayfern.com/mcp",
      "headers": {
        "Authorization": "Bearer ${WAYFERN_API_TOKEN}"
      }
    }
  }
}

Your MCP client handles initialization, the Mcp-Session-Id header, protocol-version headers, and session deletion automatically.

Existing tokens

Tokens created before MCP support do not automatically gain the new scope.

Create a new dashboard token, or explicitly mint one with "scopes": ["mcp"].

Search tools

ToolCostDescription
search_web2 credits / provider pageSearch Google, Bing, and DuckDuckGo. Returns ranked results, ads, provider failures, pagination, and related queries.
list_search_enginesFreeList live provider ids and labels.

search_web inputs

InputTypeDefaultDescription
querystringrequiredSearch phrase (1-512 characters).
enginesstring[]["google"]Any of google, bing, duckduckgo.
languagestring-Language hint such as en or en-US.
regionstring-Market hint such as US.
datestring-Date range in YYYYMMDD..YYYYMMDD form.
filetypestring-Restrict results to a file type such as pdf.
sitestring-Restrict results to a domain.
limitinteger50Results per provider, from 1 to 200.
startinteger0Pagination offset.
filter_duplicatesbooleantrueHide near-duplicate results.
include_relatedbooleantrueReturn people-also-search features.

Web Data tools

Nine tools that turn a URL into data, so an agent can read a page, crawl a site or pull structured records without leaving the conversation. Each one calls the same service as its REST endpoint, so results and billing are identical — and each tool's description carries its credit cost, because an agent choosing between scrape_page and crawl_site is making a spend decision on your behalf.

ToolCostDescription
scrape_page1 credit / pageFetch 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.
extract_data1 credit / uncached source pageExtract structured data from one or more pages with a prompt and an optional JSON Schema. Re-running over pages already fetched is free.
map_site2 credits / 10 URLsList a site's URLs from its sitemaps and page links.
capture_screenshot5 credits / captureCapture 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.
brand_profile10 credits / profileIdentity, colours, logos, social links and company metadata for a domain.
site_styleguide10 credits / siteColours, typography, spacing, radii, shadows and the design tokens a site declares.
site_fonts5 credits / siteFont families, where each is served from, available weights, file formats and where they are used.
crawl_site1 credit / successful pageStart a bounded multi-page crawl. Returns a job id immediately and charges nothing up front; pages are billed as the crawl runs.
crawl_statusFreePoll a crawl started with crawl_site and read a page of its results. The pages were billed as they were crawled.
Smaller surface

The tools expose less than the REST endpoints.

crawl_site takes no webhook (poll it with crawl_status), always loads the site's robots.txt and honours the crawl-delay it declares, stays on the starting site, and runs 3 pages in parallel with no extra delay. For custom headers, per-page cache control, PDF paper sizes, path-pattern crawls with signed webhooks, or a custom timeout, call the REST Web Data API.

scrape_page inputs

InputTypeDefaultDescription
urlstringrequiredThe page to scrape (1-2048 characters).
formatsstring[]["markdown"]1-8 of markdown, html, rawHtml, links, screenshot, pdf, json, summary.
only_main_contentbooleantrueStrip navigation, headers and footers.
wait_for_msinteger0Milliseconds to wait after load, 0-30000.
proxystring"auto"auto, datacenter, or residential.
countrystring-ISO-3166 alpha-2 exit country, exactly two characters.
summary_promptstring-Instruction for the summary format. Max 2000 characters.
json_promptstring-What the json format should extract. Max 2000 characters.

extract_data inputs

InputTypeDefaultDescription
urlsstring[]required1-100 URLs. A trailing /* expands to that path's discovered URLs, billed as a map call.
promptstringrequiredWhat to extract, 1-4000 characters.
schemaobject-JSON Schema the result must conform to.
max_pagesinteger10Ceiling on source pages fetched, 1-100.
proxystring"auto"auto, datacenter, or residential.

map_site inputs

InputTypeDefaultDescription
urlstringrequiredThe site to map.
searchstring-Keep only URLs matching this term. Max 256 characters.
limitinteger100Maximum URLs to return, 1-5000. Billed per block of 10.
include_subdomainsbooleanfalseInclude URLs on subdomains.

capture_screenshot inputs

InputTypeDefaultDescription
urlstringrequiredThe page to capture.
full_pagebooleantrueCapture the whole scrollable page.
formatstring"png"png or jpeg.
dark_modebooleanfalseRender in dark mode.
widthinteger1440Viewport width in CSS pixels, 320-3840.
heightinteger900Viewport height in CSS pixels, 320-3840.
block_adsbooleantrueBlock ad and tracker requests and hide ad slots.
block_cookie_bannersbooleantrueDismiss and hide cookie banners.
selectorstring-Capture only the element matching this CSS selector. Max 512 characters.
hide_selectorsstring[]-CSS selectors to hide before capturing. Up to 50, each max 512 characters.
clickstring-CSS selector to click before capturing. No visible match within 5 seconds fails the call.
wait_for_selectorstring-CSS selector to wait for after load. Max 512 characters.
wait_for_msinteger0Milliseconds to wait after load, 0-30000.
full_page_slicesbooleanfalseAlso return the full page cut into images, top to bottom, in slices. Needs full_page; not with selector.
slice_heightintegerviewport heightHeight of one slice in CSS pixels, 400-10000. Needs full_page_slices.
fail_if_containsstring[]-Fail without a charge when the page text contains any of these, ignoring case. Up to 20, each 1-256 characters.
proxystring"auto"auto, datacenter, or residential.

brand_profile, site_styleguide, site_fonts inputs

InputTypeDefaultDescription
urlstringrequiredThe site to analyse.
proxystring"auto"auto, datacenter, or residential.

crawl_site inputs

InputTypeDefaultDescription
urlstringrequiredThe URL the crawl starts from.
limitinteger50Maximum pages to scrape, 1-5000. Each success is 1 credit.
max_depthinteger3Link hops to follow from the start URL, 0-10.
include_pathsstring[]-Regular expressions a path must match. Up to 50, each max 512 characters.
exclude_pathsstring[]-Regular expressions that exclude a path. Up to 50.
allow_subdomainsbooleanfalseFollow links onto subdomains.
formatsstring[]["markdown"]Per-page output formats, as for scrape_page.

crawl_status inputs

InputTypeDefaultDescription
crawl_idstringrequiredThe id crawl_site returned, 1-64 characters.
skipinteger0Documents to skip.
limitinteger25Documents to return, 1-100.

Credits

Every tool that fetches from the live web spends credits, at exactly the rates the REST API charges: search_web meters each provider page it fetches (a large limit can fetch several per provider), and the Web Data tools bill per page, per capture, per site or per block of 10 URLs as listed above. list_search_engines, crawl_status, get_usage, resources, and prompts are free. Every paid tool result reports what it actually cost in credits_charged, and credits come from one shared account balance that browser sessions, captcha solves, and residential egress draw on too.

Account tools

Free. An agent can check the balance before a large batch of paid calls.

ToolCostDescription
get_usageFreeThe credit balance, plan, usage in the current billing period, and open browser pages against the plan limit. No input.

Resources and prompt

wayfern://search-engines — live provider catalog as JSON.

wayfern://mcp/help — concise MCP and billing notes.

research_with_wayfern — multi-source research prompt.

Raw protocol example

You normally do not need to send this yourself. It is useful for connectivity checks and custom MCP clients.

Initialize

curl -X POST https://api.wayfern.com/mcp \
  -H "Authorization: Bearer wf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "protocolVersion": "2025-11-25",
      "capabilities": {},
      "clientInfo": { "name": "my-agent", "version": "1.0.0" }
    }
  }'