Use DataFuel from AI agents and IDEs
Connect Claude Code, Cursor, VS Code or any MCP client to the DataFuel MCP server with one command, or hand an agent the skill file.
The same API is exposed as a Model Context Protocol server for agents and AI IDEs. It is streamable HTTP, stateless, and authenticates with the same X-API-Key header (or Authorization: Bearer). Every tool call is billed exactly like its REST counterpart.
Endpoint: https://scraping-api.datafuel.ai/mcp
Set it up with one command
npx -y @datafuel/mcp init
It asks for your API key, checks it, finds the MCP clients installed on your machine and adds DataFuel to the ones you pick, without touching your other servers. Restart the clients afterwards. It needs Node.js 20.3 or later.
Supported clients:
| Client | Where it is configured |
|---|---|
| Claude Code | claude mcp add at user scope |
| Cursor | ~/.cursor/mcp.json |
| VS Code | your user mcp.json. VS Code asks for the key when the server first starts, so it is not stored in the file. |
| Windsurf (Devin Desktop) | ~/.config/devin/mcp_config.json, or ~/.codeium/windsurf/mcp_config.json |
| Claude Desktop | claude_desktop_config.json, through a small local proxy |
| Codex CLI | ~/.codex/config.toml |
| Gemini CLI | ~/.gemini/settings.json |
Useful options:
--client cursor,codexsets up only those clients,-yskips the questions.--projectwrites the current project’s config instead of your user config. The key-holding file is added to.gitignore, and a file that git already tracks is refused so the key is never committed.- For Claude Code,
initcan also install the DataFuel skill (see below). npx -y @datafuel/mcp doctor --api-key df_key_your_key_herechecks the key and shows where DataFuel is configured, andnpx -y @datafuel/mcp removetakes it out again.
The command writes your key into the client’s config file (except for VS Code). For Claude Code it passes the key to claude mcp add, so it is briefly visible in your machine’s process list while that runs.
Manual setup
To configure a client yourself, or one the command does not support, add the server by hand.
Claude Code:
claude mcp add --transport http datafuel https://scraping-api.datafuel.ai/mcp \
--header "X-API-Key: df_key_your_key_here"
Cursor and other clients that connect over HTTP, in the client’s MCP configuration (mcp.json or equivalent; some clients call the field serverUrl or httpUrl instead of url, and VS Code uses servers instead of mcpServers and needs "type": "http"):
{
"mcpServers": {
"datafuel": {
"url": "https://scraping-api.datafuel.ai/mcp",
"headers": { "X-API-Key": "df_key_your_key_here" }
}
}
}
Clients that can only start a local command, such as Claude Desktop, run the proxy from the same package:
{
"mcpServers": {
"datafuel": {
"command": "npx",
"args": ["-y", "@datafuel/mcp"],
"env": { "DATAFUEL_API_KEY": "df_key_your_key_here" }
}
}
}
Tools
| Tool | What it does | REST equivalent |
|---|---|---|
scrape | Run one task and wait for the result. type (unlocker or llm_scraping) and attributes as in POST /task. | POST /task |
get_task | Fetch a task and its result by id. | GET /task/{id} |
map | Discover the URLs of a site. Flat inputs: url, search, limit, sitemap, include_subdomains, ignore_sitemap, sitemap_only, proxy_type, proxy_country. | POST /map |
create_job | Queue a batch. Plural targets in attributes (urls or prompts, at least two). | POST /job |
get_job | Job status and counters. | GET /job/{id} |
get_job_results | Per-task results of a job. | GET /job/{id}/results |
cancel_job | Cancel a job or crawl. Tasks not started yet are refunded. | POST /job/{id}/cancel |
crawl | Start a crawl. attributes is the crawl config plus unlocker options. Returns job_id. | POST /crawl |
get_crawl | Crawl status, page counters, stop reason. | GET /crawl/{id} |
get_crawl_results | Page through crawled pages. Pass next_cursor back as cursor. | GET /crawl/{id}/results |
get_balance | Remaining credits. | GET /users/@me/balance |
list_jobs | Your jobs and crawls, newest first. Filter by status, type and start_date / end_date; pass next_cursor back as cursor. | GET /job |
list_tasks | Your tasks, newest first, with the same filters plus job_id. No result payload: use get_task. | GET /task |
get_analytics | Usage totals, time series and breakdowns by task type, target and status code over a date range. | GET /task/analytics/dashboard |
scrape and map block until the result is ready, up to ten minutes. The job and crawl tools return immediately and are polled.
Differences from REST: the tools default include_images to false for markdown output, take extract_selector and extract_regex as plain objects (the REST API wants JSON-encoded strings), and do not offer SERP.
Give an agent the skill file
For agents that call the REST API directly, DataFuel publishes a skill file that explains endpoint choice, request shapes, the result envelope and error handling in a form written for models:
https://scraping-api.datafuel.ai/skill.mdhttps://scraping-api.datafuel.ai/llms.txt(same content)
Drop it into your agent’s context or skills directory. npx -y @datafuel/mcp init installs it for Claude Code in ~/.claude/skills/datafuel/. The full machine-readable schema is at https://scraping-api.datafuel.ai/docs/openapi.yaml.
Keep the key out of prompts
Configure the key in the MCP client or in the agent’s environment. Never paste it into a chat message; transcripts get logged and shared.