Windsurf

Windsurf logo

Next-generation AI-powered IDE by Codeium with built-in MCP support. Seamlessly integrate web scraping into your development workflow with Windsurf's intelligent coding assistant.

AI IDE Windows macOS Linux Official Website

Prerequisites

Before getting started, make sure you have the following:

  • Windsurf IDE installed
  • Node.js 18+ (for npx command)
  • Your Scrapfly API key (only if not using OAuth2)

Setup Instructions

Windsurf has native MCP support. Follow these steps to integrate Scrapfly in under 5 minutes.

  1. Open Windsurf Settings

    Access the MCP configuration in Windsurf IDE:

    • Click the gear icon (⚙️) in the bottom left corner
    • Select "Settings" from the menu
    • Search for "MCP" in the settings search bar
    • Click "Edit in settings.json" under "MCP Servers"
    Tip: Keyboard Shortcut

    Press Ctrl+, (Windows/Linux) or ⌘+, (macOS) to quickly open Settings, then search for "MCP".

  2. Add Scrapfly MCP Server

    Select your preferred authentication method:

    How it works: On first connection, Windsurf's AI assistant 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.
  3. Reload Windsurf

    Restart Windsurf to apply the MCP configuration:

    • Press Ctrl+Shift+P (Windows/Linux) or ⌘+Shift+P (macOS)
    • Type "Reload Window" and press Enter
    Alternative: Full Restart

    You can also completely close Windsurf and reopen it to ensure all changes are applied.

  4. Verify the Integration

    Confirm Scrapfly MCP is working in Windsurf:

    1. Open Windsurf's AI chat panel (usually on the right side)
    2. Look for the hammer icon (🔨) indicating MCP tools are available
    3. Try a test prompt: "Use Scrapfly to scrape https://news.ycombinator.com and show the top 5 posts"
    4. Windsurf should automatically call Scrapfly MCP tools and return the results
    Pro Tip: Windsurf's AI will automatically call the scraping_instruction_enhanced tool to get authentication parameters. You can focus on describing what you want to scrape!

Example Prompts

Intelligent Data Extraction
Scrape https://news.ycombinator.com and create a Python script to analyze the top posts
Code Generation from Web Data
Scrape product data from https://web-scraping.dev/products and generate a database schema to store it
Screenshot for Design Reference
Take a full-page screenshot of https://scrapfly.io and save it to the project folder
Multi-Step Workflow
Scrape the GitHub trending page, extract repository URLs, and create a markdown report

Troubleshooting

Problem: No hammer icon or Scrapfly tools in AI chat

Solution:

  • Verify npx is available: run npx --version in Windsurf's terminal
  • Check settings.json for valid JSON syntax (Windsurf will show errors)
  • Reload the window: Ctrl+Shift+P → "Reload Window"
  • Check Windsurf logs: Help → Toggle Developer Tools → Console

Access Developer Tools:

  • Press Ctrl+Shift+I (Windows/Linux) or ⌘+Option+I (macOS)
  • Go to the Console tab
  • Look for errors containing "MCP" or "scrapfly"

Problem: OAuth2 link does not open or authorization does not complete

Solution:

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

If you need to manually edit settings:

Windows: %APPDATA%\Windsurf\User\settings.json

macOS: ~/Library/Application Support/Windsurf/User/settings.json

Linux: ~/.config/Windsurf/User/settings.json

Next Steps

Summary