Skip to main content

MCP server for Scraping — REST API wrapper for LLM agents.

Project description

scraping-mcp

MCP (Model Context Protocol) server for Scraping — lets LLM agents (Cursor, Claude Desktop, Claude Code, Zed) call our scraping tools directly.

Install

pip install scraping-mcp
# or with pipx for isolation:
pipx install scraping-mcp

Requires Python 3.11+.

Hosted alternative (no install)

If you don't want to install Python locally, point your MCP client at the hosted instance:

{
  "mcpServers": {
    "scraping": {
      "url": "https://api.scraping.io/mcp/",
      "transport": "http",
      "headers": {
        "Authorization": "Bearer fc_live_..."
      }
    }
  }
}

The hosted version exposes the same 7 tools as the stdio package.

Setup

Get an API key at dashboard/keys.

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "scraping": {
      "command": "scraping-mcp",
      "env": {
        "SCRAPING_API_KEY": "fc_live_abc123...",
        "SCRAPING_BASE_URL": "https://api.scraping.io"
      }
    }
  }
}

Restart Claude Desktop. Tools will appear as "scraping".

Cursor

Create .cursor/mcp.json in the repo root:

{
  "mcpServers": {
    "scraping": {
      "command": "scraping-mcp",
      "env": { "SCRAPING_API_KEY": "fc_live_abc123..." }
    }
  }
}

Claude Code

Add to ~/.claude.json (user scope):

{
  "mcpServers": {
    "scraping": {
      "command": "scraping-mcp",
      "env": { "SCRAPING_API_KEY": "fc_live_abc123..." }
    }
  }
}

Tools

Tool Description
scrape(url, format?, cookies?, timeout_s?) Scrape single URL. Returns markdown or {status:pending, task_id} on timeout.
crawl(urls[], cookies?, timeout_s?) Batch-scrape up to 500 URLs. Returns items or {status:pending, crawl_id} on timeout.
cancel_crawl(crawl_id) Cancel pending URLs of a crawl batch + refund credits.
get_scrape_status(task_id) Check status of a scrape task.
get_crawl_status(crawl_id, include_items?) Check status + items of a crawl batch.
map(url, max_urls?, include_subdomains?) List a site's URLs (sitemap.xml + robots.txt + fallback crawl). 1 credit.
get_balance() Current credit balance.

Examples

Agent: "Scrape the README at https://github.com/hashicorp/terraform"
-> calls scrape(url="https://github.com/hashicorp/terraform")
-> returns {status: "finished", result: {markdown: "# Terraform..."}}

Agent: "Scrape these 50 docs pages and summarize"
-> calls crawl(urls=[...50 urls...])
-> returns {status: "finished", total: 50, items: [...]}

Agent: "Check my credit balance"
-> calls get_balance()
-> returns {balance: 87}

Environment variables

Name Required Default Description
SCRAPING_API_KEY yes Your API key (starts with fc_live_)
SCRAPING_BASE_URL http://localhost:8000 Scraping API endpoint
SCRAPING_SCRAPE_TIMEOUT_S 60 Scrape tool wait-timeout
SCRAPING_CRAWL_TIMEOUT_S 600 Crawl tool wait-timeout
SCRAPING_REQUEST_TIMEOUT_S 30 Individual HTTP request timeout

Troubleshooting

Server not starting: Check SCRAPING_API_KEY is set in MCP client config env. Logs go to stderr — Claude Desktop / Cursor show them in their MCP logs.

"connection refused": Verify SCRAPING_BASE_URL points to a running Scraping API. For local dev: docker compose up in the monorepo.

Agent receives {status: "pending", task_id}: Timeout exceeded. Agent should call get_scrape_status(task_id) (or get_crawl_status) to retrieve the result once ready. Scrape typically takes 2-20 seconds; heavy sites (JS-rendered via L3) can take 30-60 seconds.

License

MIT.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scraping_mcp-0.2.0.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scraping_mcp-0.2.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file scraping_mcp-0.2.0.tar.gz.

File metadata

  • Download URL: scraping_mcp-0.2.0.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scraping_mcp-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cced1494a921e4cc681a1e817c16f388d6ab49d6fba64f30677035fd2aa89792
MD5 73933206264549fa4993f1bfeb215ebb
BLAKE2b-256 195c157b189281a14f8863bbf40b098cc38448bc8e3b90b5c12de61f9ff2a7c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for scraping_mcp-0.2.0.tar.gz:

Publisher: publish-mcp.yml on Nodirbek2001/scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file scraping_mcp-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: scraping_mcp-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for scraping_mcp-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 96a3f970ffd6dd97d24a41762f0b8a8cc584b97142ce93c6c3dbf158a6ba6297
MD5 91f25218eb6e73df2802a9e00d938033
BLAKE2b-256 b153f138936af678711919b539d4ca6657514a443256724a850b6cd024b8a84b

See more details on using hashes here.

Provenance

The following attestation bundles were made for scraping_mcp-0.2.0-py3-none-any.whl:

Publisher: publish-mcp.yml on Nodirbek2001/scraper

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page