Claude Code

Claude Code logo

Official VS Code extension and CLI tool from Anthropic. Brings Claude AI into your editor and terminal with web scraping capabilities.

VS Code Extension & CLI Windows macOS Linux Official Website

Prerequisites

Before getting started, make sure you have the following:

Setup

  1. Install Extension & CLI

    Install VS Code Extension

    Install CLI (required for MCP config)

    After install, click the Spark icon (✨) in VS Code sidebar
  2. Add Scrapfly MCP Server

    Select your preferred authentication method:

    How it works: Browser opens for authorization on first use - happens once, then managed automatically. No API keys stored. See project-scoped setup for team collaboration.
    Sign up for free to get your API key.
  3. Verify

    Expected output:

    ✓ Connected = ready to use!
  4. Test

    In VS Code, click the Spark icon (✨) and try:

Example Prompts

Code-Assisted Scraping
Scrape HN and generate Python parser code
Test Fixtures
Scrape https://web-scraping.dev/products and create test data
Screenshots
Screenshot scrapfly.io homepage
Batch Processing
Scrape [url1, url2, url3] to CSV

Advanced

Project-Scoped Configuration

For team collaboration, you can configure Scrapfly MCP at the project level instead of globally. This allows your team to share the same configuration via version control.

View Project-Scoped Setup Guide

Learn how to use environment variables, create .mcp.json files, and share configuration safely with your team.

Troubleshooting

  • Verify CLI installed: claude --version
  • Check MCP config: claude mcp list
  • Ensure npx in PATH: npx --version
  • Reload VS Code: Ctrl+Shift+P → "Developer: Reload Window"
  • Check internet connection
  • Verify URL: https://mcp.scrapfly.io/sse
  • Validate API key if using key auth
  • Try removing & re-adding: claude mcp remove scrapfly
  • Manually copy OAuth2 URL and paste in browser
  • Ensure logged into Scrapfly in browser
  • Check default browser is set
  • Fallback: use API key authentication
  • Ensure npm global bin in PATH
  • Find npm global dir: npm config get prefix
  • Add [prefix]/bin to PATH
  • Restart VS Code/terminal after updating PATH

VS Code Logs:

Ctrl+Shift+U → Select "Claude Code" from dropdown

Config Files:

  • Global: ~/.claude/mcp.json
  • Project: ./.mcp.json

Next Steps

Summary