FetchFence MCP server

The FetchFence Model Context Protocol server exposes our web-browsing tools to any MCP client (Claude Desktop, Cursor, Windsurf, etc.). It is hosted at https://api.fetchfence.ai/mcp.

Overview

Streamable HTTP transport at https://api.fetchfence.ai/mcp.

Tools are derived automatically from the FetchFence OpenAPI spec, so the MCP tool list stays in sync with API changes.

Two authentication options: FetchFence API key or OAuth 2.0 with PKCE.

OAuth authorization happens on https://fetchfence.ai; users sign in with their existing FetchFence credentials and approve the connection.

Authentication

Both API keys and OAuth access tokens are accepted as Bearer credentials. The access token issued by OAuth is a scoped FetchFence API key.

API key

Create a key in your dashboard and send it as a Bearer token.

Authorization: Bearer <FETCHFENCE_API_KEY>

OAuth 2.0 + PKCE

For clients that support MCP OAuth, point them at our protected-resource metadata:

curl https://api.fetchfence.ai/.well-known/oauth-protected-resource

Connect an MCP client

Claude Desktop with an API key

Claude Desktop currently connects to remote HTTP servers through the mcp-remote stdio bridge. Replace the API key in the env block with your own.

{
  "mcpServers": {
    "fetchfence": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.fetchfence.ai/mcp",
        "--header",
        "Authorization:${FETCHFENCE_API_KEY}"
      ],
      "env": {
        "FETCHFENCE_API_KEY": "Bearer ffk_xxx.yyy"
      }
    }
  }
}

Claude Desktop / Custom Connectors

If your client supports remote HTTP MCP servers with OAuth, use this shape and complete the OAuth registration in your client.

{
  "name": "FetchFence",
  "url": "https://api.fetchfence.ai/mcp",
  "auth": {
    "type": "oauth",
    "authorizationUrl": "https://fetchfence.ai/api/mcp/oauth/authorize",
    "tokenUrl": "https://fetchfence.ai/api/mcp/oauth/token",
    "clientId": "<your-client-id>",
    "redirectUri": "<client-redirect-uri>",
    "pkce": true
  }
}

Other clients

Any client that speaks MCP Streamable HTTP can connect to https://api.fetchfence.ai/mcp. Supply a FetchFence API key as the Bearer token, or complete the OAuth flow below.

OAuth flow

FetchFence is the authorization server. The user is redirected to https://fetchfence.ai, signs in, and is sent back to the client with an authorization code.

1. Build the authorization URL

Generate a PKCE code_verifier and code_challenge (S256), then redirect the user:

https://fetchfence.ai/api/mcp/oauth/authorize?response_type=code&client_id=<CLIENT_ID>&redirect_uri=<REDIRECT_URI>&state=<STATE>&code_challenge=<CODE_CHALLENGE>&code_challenge_method=S256&scope=mcp

2. Exchange the code

POST the code, PKCE verifier, client_id, and redirect_uri to the token endpoint:

curl -X POST https://fetchfence.ai/api/mcp/oauth/token \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "grant_type=authorization_code" \
  -d "code=<AUTHORIZATION_CODE>" \
  -d "redirect_uri=<REDIRECT_URI>" \
  -d "client_id=<CLIENT_ID>" \
  -d "code_verifier=<CODE_VERIFIER>"

On success the response contains an access_token that is a FetchFence API key. Use it as a Bearer token with the MCP server.

Available tools

The exact tool list and input schemas are generated from the live OpenAPI document, so they update automatically as the API evolves.

ff_fetch

Fetch and normalize a single webpage.

ff_action

Drive a headless browser through clicks, fills, selects, and captures.

ff_crawl

Bounded website crawl with depth and domain controls.

ff_search

Ranked web search with optional synthesized, cited answer.

ff_verify

Verify a claim against fetched web sources.

ff_map

Discover URLs from a root page.

ff_extract

Extract structured data from a URL.

ff_screenshot

Capture a rendered webpage screenshot.

Example tool call

A typical tools/call request sent by an MCP client:

{
  "name": "ff_search",
  "arguments": {
    "query": "Kansas Supreme Court recent civil procedure opinions",
    "topK": 5,
    "includeAnswer": true,
    "grounding": "fast"
  }
}

Errors

401 invalid_token — missing, revoked, or expired API key/OAuth token.

403 insufficient_scope — the key lacks the required scope for a tool.

400 invalid_request — malformed OAuth or MCP request.

402 subscription_required / quota_exceeded — billing or entitlement issue from the underlying API.

REST API documentation

The same tools are also available as REST endpoints. See the API documentation for direct HTTP usage, pricing units, and best practices.