Roo Code
AI coding assistant for VS Code with MCP support. Roo Code helps you write, debug, and test code with integrated web scraping capabilities.
Prerequisites
Before getting started, make sure you have the following:
- Visual Studio Code installed
- Node.js 18+ (for
npxcommand) - 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.
-
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.
-
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. -
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.
-
Verify the Integration
Confirm Scrapfly MCP is connected to Roo Code:
- Open Roo Code's AI assistant panel (usually in the sidebar)
- Look for the hammer icon (🔨) indicating MCP tools are loaded
- Try a test prompt: "Use Scrapfly to scrape https://news.ycombinator.com and show the top 5 posts"
- Roo Code should call Scrapfly MCP tools and return the results
Pro Tip: Roo Code will automatically call thescraping_instruction_enhancedtool to get required authentication parameters before making scraping requests.
Example Prompts
Code-Assisted Data Extraction
Test Data Generation
Debug Scraping Configs
Multi-Page Workflow
Troubleshooting
Problem: Scrapfly tools not appearing in Roo Code assistant
Solution:
- Ensure
npxis available: runnpx --versionin VS Code terminal - Check
settings.jsonis 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/mcpis accessible from your network - If behind a proxy, configure proxy settings in VS Code
- Try reloading the window after ensuring network connectivity
Next Steps
- Explore available MCP tools and their capabilities
- See real-world examples of what you can build
- Learn about authentication methods in detail
- Read the FAQ for common questions