Cline
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.
Prerequisites
Before getting started, make sure you have the following:
- Visual Studio Code installed
- Node.js 18+ (for
npxcommand) - 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.
-
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.
-
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. -
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.
-
Verify the Integration
Confirm Scrapfly MCP is connected to Cline:
- Click the Cline icon in the VS Code sidebar
- Start a new task or chat
- Try a prompt: "Use Scrapfly to scrape https://news.ycombinator.com and save the top 5 posts to a file"
- 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
Code Generation from Live Data
Test Data Creation
Documentation Extraction
Troubleshooting
Problem: Scrapfly tools not appearing in Cline's available tools list
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 "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
- 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
- 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