Roo Code

Roo Code logo

AI coding assistant for VS Code with MCP support. Roo Code helps you write, debug, and test code with integrated web scraping capabilities.

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)
  • Your Scrapfly API key (only if not using OAuth2)

Setup Instructions

Connect Scrapfly MCP to Roo Code to enable AI-powered web scraping in your VS Code workflow. Setup takes less than 5 minutes.

  1. Install Roo Code Extension

    Install the Roo Code extension from the VS Code marketplace:

    From VS Code:

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

    Command Line:

    Tip: Configure Roo Code

    After installing, you may need to configure Roo Code with your preferred AI model. Follow the extension's setup wizard to complete initial configuration.

  2. Add Scrapfly MCP Server

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

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

    Select your preferred authentication method:

    How it works: Roo Code 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: Verify MCP Connection

    After reloading, Roo Code should detect the Scrapfly MCP server and make tools available in the assistant interface.

  4. Verify the Integration

    Confirm Scrapfly MCP is connected to Roo Code:

    1. Open Roo Code's AI assistant panel (usually in the sidebar)
    2. Look for the hammer icon (🔨) indicating MCP tools are loaded
    3. Try a test prompt: "Use Scrapfly to scrape https://news.ycombinator.com and show the top 5 posts"
    4. Roo Code should call Scrapfly MCP tools and return the results
    Pro Tip: Roo Code will automatically call the scraping_instruction_enhanced tool to get required authentication parameters before making scraping requests.

Example Prompts

Code-Assisted Data Extraction
Scrape https://news.ycombinator.com and write TypeScript code to process the data
Test Data Generation
Scrape sample products from https://web-scraping.dev/products and create JSON test fixtures
Debug Scraping Configs
Scrape https://web-scraping.dev with JavaScript rendering enabled and show me the page content
Multi-Page Workflow
Scrape the first page of Hacker News, extract the top post URL, then scrape that post's page

Troubleshooting

Problem: Scrapfly tools not appearing in Roo Code assistant

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 "Roo Code" from dropdown

Problem: OAuth2 link does not open or authorization fails

Solution:

  • Manually copy the OAuth2 URL from Roo Code assistant 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 "Roo Code" from the dropdown in the top-right
  • Look for errors related to MCP server connection

Problem: Connection to Scrapfly MCP server times out

Solution:

  • Check your internet connection
  • Verify https://mcp.scrapfly.io/mcp is accessible from your network
  • If behind a proxy, configure proxy settings in VS Code
  • Try reloading the window after ensuring network connectivity

Next Steps

Summary