VS Code
Setup Scrapfly MCP with any MCP-compatible VS Code extension. This guide covers the generic configuration pattern for connecting Scrapfly to VS Code-based AI assistants.
Prerequisites
Before getting started, make sure you have the following:
- Visual Studio Code installed
- An MCP-compatible VS Code extension (Claude Code, Cline, Roo Code, etc.)
- Node.js 18+ (for
npxcommand) - Your Scrapfly API key (only if not using OAuth2)
Setup Instructions
This guide covers the generic pattern for connecting Scrapfly MCP to any MCP-compatible VS Code extension. Setup takes less than 5 minutes.
-
Install an MCP-Compatible Extension
First, install a VS Code extension that supports MCP (Model Context Protocol):
Popular MCP-compatible extensions:
- Claude Code - Official Anthropic extension
- Cline - Autonomous AI coding assistant
- Roo Code - AI pair programming extension
- Or any other extension that supports MCP servers
Tip: Check Extension Documentation
Each MCP-compatible extension may have specific setup requirements. Check the extension's documentation for any additional prerequisites.
-
Locate VS Code Settings File
MCP servers are configured in VS Code's
settings.jsonfile. Choose your preferred access method:- Press Ctrl+, (Windows/Linux) or ⌘+, (macOS)
- Search for "MCP Servers"
- Click "Edit in settings.json"
- Press Ctrl+Shift+P (Windows/Linux) or ⌘+Shift+P (macOS)
- Type "Preferences: Open User Settings (JSON)"
- Press Enter
Windows:
macOS:
Linux:
Tip: User vs Workspace Settings
Use User Settings to make Scrapfly available in all VS Code projects. Use Workspace Settings to configure Scrapfly for a specific project only.
-
Add Scrapfly MCP Server
Select your preferred authentication method:
How it works: Your MCP extension displays an OAuth2 URL. 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.Advanced: Multiple MCP Servers
You can configure multiple MCP servers in the same settings file:
-
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
Alternative: Restart VS Code
You can also completely close VS Code and reopen it to ensure all changes are applied.
-
Verify the Integration
Confirm Scrapfly MCP is working with your extension:
- Open your MCP-compatible extension's interface (sidebar, panel, or chat)
- Look for the hammer icon (🔨) or MCP tools indicator
- Try a test prompt: "Use Scrapfly to scrape https://news.ycombinator.com and show the top 5 posts"
- Your extension should call Scrapfly MCP tools and return the results
Pro Tip: Most MCP-compatible extensions will automatically call thescraping_instruction_enhancedtool to get required authentication parameters before making scraping requests.
Example Prompts
Simple Page Scraping
Structured Data Extraction
Screenshot Capture
Multi-Step Workflow
Troubleshooting
Problem: Extension does not detect Scrapfly MCP tools
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 your extension from dropdown
- Verify your extension supports MCP (check extension documentation)
View logs in VS Code:
- Open Output panel: Ctrl+Shift+U (Windows/Linux) or ⌘+Shift+U (macOS)
- Select your extension name from the dropdown in the top-right
- Look for errors related to MCP server connection or npx command execution
Problem: Browser does not open for OAuth2 authentication
Solution:
- Manually copy the OAuth2 URL from extension interface and paste it 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
Problem: VS Code cannot find npx command
Solution:
- Ensure Node.js 18+ is installed: run
node --versionin terminal - Verify
npxis in your PATH: runnpx --version - Restart VS Code after installing Node.js
- On Windows, you may need to add Node.js to PATH manually
Problem: Issues when multiple MCP servers are configured
Solution:
- Ensure each MCP server has a unique key in the
mcpServersobject - Check that there are no duplicate server names
- Verify JSON syntax is correct (commas, brackets, quotes)
- Try disabling other MCP servers temporarily to isolate the issue
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