OAUTH 2.1
WEB SCRAPING
Any public webpage, JavaScript-rendered content, and browser session your research agent needs to act on lives in Scrapfly. Scarpfly MCP gives your agent per-user OAuth access to web scraping scoped to the authorizing Scrapfly account.
Scrape any URL with optional JS rendering and anti-bot bypass.
Take a screenshot of any URL in a real browser context.
Extract structured data from raw HTML using Scrapfly's parser.
Create a persistent cloud browser session for multi-step scraping.
Check remaining credits and account quota for the current user.
Fetch a site's sitemap and enumerate all discoverable URLs.
// Scalekit AgentKit — framework-agnostic
import { ScalekitClient } from "@scalekit/sdk";
const client = new ScalekitClient();
const token = await client.connections.getToken("scarpflymcp", userId);
const mcp = new MCPClient({ token });// OpenAI SDK
import OpenAI from "openai";
import { ScalekitClient } from "@scalekit/sdk";
const sk = new ScalekitClient();
const token = await sk.connections.getToken("scarpflymcp", userId);
const client = new OpenAI();
const resp = await client.responses.create({ tools: [{ type: "mcp", server_url: mcpUrl, headers: { Authorization: `Bearer ${token}` } }] });// Anthropic SDK
import Anthropic from "@anthropic-ai/sdk";
import { ScalekitClient } from "@scalekit/sdk";
const sk = new ScalekitClient();
const token = await sk.connections.getToken("scarpflymcp", userId);
const client = new Anthropic();
const resp = await client.beta.messages.create({ mcp_servers: [{ url: mcpUrl, authorization_token: token }] });// Google GenAI SDK
import { GoogleGenAI } from "@google/genai";
import { ScalekitClient } from "@scalekit/sdk";
const sk = new ScalekitClient();
const token = await sk.connections.getToken("scarpflymcp", userId);
const ai = new GoogleGenAI();
const resp = await ai.models.generateContent({ tools: [{ mcpServers: [{ serverUrl: mcpUrl, httpOptions: { headers: { Authorization: `Bearer ${token}` } } }] }] });