Cline

Cline logo

Autonomous AI coding assistant for VS Code with MCP support. Cline can read files, make edits, and scrape web data to assist your development workflow.

VS Code Extension Windows macOS Linux Official Website

Prerequisites

Before getting started, make sure you have the following:

  • Visual Studio Code installed
  • Node.js 18+ (for npx command)
  • Anthropic API key for Cline (separate from Scrapfly)
  • Your Scrapfly API key (only if not using OAuth2)

Setup Instructions

Connect Scrapfly to Cline to enable autonomous web scraping during AI-assisted coding. Setup takes less than 5 minutes.

  1. Install Cline Extension

    Install the Cline extension from the VS Code marketplace:

    From VS Code:

    • Press Ctrl+Shift+X (Windows/Linux) or ⌘+Shift+X (macOS)
    • Search for "Cline"
    • Click "Install" on the extension by saoudrizwan

    Command Line:

    Tip: Configure Anthropic API Key

    Cline requires an Anthropic API key to function. After installing, click the Cline icon in the sidebar and follow the setup wizard to add your Anthropic API key.

  2. Add Scrapfly MCP Server

    Cline uses VS Code's MCP settings. Open your VS Code settings:

    • Press Ctrl+, (Windows/Linux) or ⌘+, (macOS)
    • Search for "MCP Servers"
    • Click "Edit in settings.json"

    Select your preferred authentication method:

    How it works: Cline displays an OAuth2 URL in VS Code. Click it to authorize in your browser - happens once, then managed automatically. See project-scoped setup for team collaboration.
    Sign up for free to get your API key.
  3. Reload VS Code Window

    Apply the MCP configuration by reloading:

    • Press Ctrl+Shift+P (Windows/Linux) or ⌘+Shift+P (macOS)
    • Type "Reload Window" and press Enter
    Tip: Check MCP Connection

    After reloading, Cline will show available MCP tools in the chat interface. Look for Scrapfly tools in the list.

  4. Verify the Integration

    Confirm Scrapfly MCP is connected to Cline:

    1. Click the Cline icon in the VS Code sidebar
    2. Start a new task or chat
    3. Try a prompt: "Use Scrapfly to scrape https://news.ycombinator.com and save the top 5 posts to a file"
    4. Cline should autonomously call Scrapfly MCP tools to complete the task
    Pro Tip: Cline can autonomously chain multiple operations. For example, it can scrape data, parse it, and write code to process it - all in one request!

Example Prompts

Autonomous Data Collection
Scrape the top 10 posts from Hacker News and create a JSON file with their titles and URLs
Code Generation from Live Data
Scrape https://web-scraping.dev/api/products and generate a TypeScript interface matching the data structure
Test Data Creation
Scrape sample blog posts from https://web-scraping.dev/blog and create test fixtures for my unit tests
Documentation Extraction
Scrape the documentation from https://web-scraping.dev/docs and create markdown files in the docs/ folder

Troubleshooting

Problem: Scrapfly tools not appearing in Cline's available tools list

Solution:

  • Ensure npx is available: run npx --version in VS Code terminal
  • Check settings.json is valid JSON (VS Code will show syntax errors)
  • Reload the window: Ctrl+Shift+P → "Reload Window"
  • Check VS Code Output panel (View → Output) and select "Cline" from dropdown

Problem: OAuth2 link does not open or authorization fails

Solution:

  • Manually copy the OAuth2 URL from Cline chat and paste into your browser
  • Ensure you're logged into Scrapfly in your browser
  • Check that your default browser is set correctly
  • Try using API key authentication as a fallback

View logs in VS Code:

  • Open Output panel: View → Output (or Ctrl+Shift+U)
  • Select "Cline" from the dropdown in the top-right
  • Look for errors related to MCP server connection
Note: Cline requires TWO separate API keys:

  • Anthropic API key: For Cline to function (configured in Cline settings)
  • Scrapfly API key: For web scraping (configured in MCP settings, or use OAuth2)

Do not confuse these two! Cline will not work without the Anthropic key, and Scrapfly will not work without authentication.

Next Steps

Summary