CrawlForge
HomeUse CasesIntegrationsPricingDocumentationBlog
How to Scrape Websites with GitHub Copilot Agents in VS Code
Tutorials
Back to Blog
Tutorials

How to Scrape Websites with GitHub Copilot Agents in VS Code

C
CrawlForge Team
Engineering Team
April 14, 2026
10 min read

On this page

GitHub Copilot's agent mode in VS Code can read your repo, run terminal commands, and edit files -- but it cannot fetch live web pages reliably. Add CrawlForge MCP and Copilot gains 20 scraping tools, from fetch_url to deep_research.

Jsonc

This guide walks through enabling web scraping in GitHub Copilot agents step by step, with working TypeScript examples and troubleshooting for the common gotchas.

Table of Contents

  • The Problem: Copilot's Limited Web Access
  • Prerequisites
  • Step 1: Install CrawlForge MCP
  • Step 2: Enable Copilot Agent Mode
  • Step 3: Register the MCP Server
  • Step 4: Verify Tools Are Available
  • Step 5: Your First Scrape
  • Full Example: Generate a REST Client from Live Docs
  • Advanced: Multi-Tool Workflows
  • Troubleshooting
  • FAQ

The Problem: Copilot's Limited Web Access

Copilot Chat has a @web participant but it rewrites your query into Bing search -- no raw page access, no structured extraction, no anti-bot bypass. In agent mode, Copilot can run shell commands, so you could pipe curl | pandoc through a tool call, but that misses JavaScript-rendered pages and trips anti-bot systems within minutes.

MCP solves this. Since VS Code 1.102 shipped general-availability MCP support in mid-2025, Copilot agents can call any MCP server you register. CrawlForge exposes 20 scraping tools as MCP, so scraping becomes a first-class agent action.

Prerequisites

  • VS Code 1.102+ -- code --version
  • GitHub Copilot subscription (Individual, Business, or Enterprise) with agent mode enabled
  • Node.js 18+
  • CrawlForge account -- free at crawlforge.dev/signup

Step 1: Install CrawlForge MCP

Bash

Step 2: Enable Copilot Agent Mode

  1. Open VS Code settings (Cmd+, / Ctrl+,).
  2. Search for chat.agent.enabled and toggle it on.
  3. Open Copilot Chat (Ctrl+Alt+I / Cmd+Ctrl+I) and switch the mode dropdown from "Ask" to "Agent."

Agent mode is what enables MCP tool calls. In "Ask" or "Edit" modes, Copilot ignores registered MCP servers.

Step 3: Register the MCP Server

VS Code supports MCP at two scopes:

  • Workspace -- .vscode/mcp.json in the repo root (team-shared via git)
  • User -- editable via "MCP: Add Server" command palette (personal)

For team scraping, use the workspace config:

Jsonc

Then export the key in your shell (do not commit it):

Bash

Or use ${input:apiKey} and VS Code will prompt once per workspace.

Step 4: Verify Tools Are Available

  1. Open Copilot Chat.
  2. Click the tool icon in the chat header.
  3. Confirm crawlforge is listed with 20 tools. Uncheck any you want to hide.

If the list is empty, jump to Troubleshooting.

Step 5: Your First Scrape

In Copilot Chat (agent mode), paste:

#crawlforge Fetch https://news.ycombinator.com and list the top 5 story titles with their URLs.

The #crawlforge hint nudges Copilot toward the right tool. Copilot calls fetch_url (1 credit), receives HTML, parses titles, and returns them inline.

Full Example: Generate a REST Client from Live Docs

Here is a concrete workflow: auto-generate a typed Stripe client from the live documentation.

Prompt Copilot agent:

#crawlforge Use extract_content on https://docs.stripe.com/api/charges/create. Then in src/clients/stripe-charges.ts, write a typed function createCharge(params) that calls the Stripe API with the exact fields documented on that page. Add a Zod schema for params.

Copilot issues this MCP call:

Typescript

Copilot reads the markdown and writes:

Typescript

Cost: 2 credits (one extract_content call). Repeat for every Stripe endpoint and you have a full typed client derived from live docs.

Advanced: Multi-Tool Workflows

Copilot agents excel at chaining tools. Example prompt:

#crawlforge 1) search_web for "OpenTelemetry Node.js auto-instrumentation 2026" 2) extract_content from the top 3 results 3) Summarize the differences into docs/otel-options.md with a decision matrix.

Copilot runs the three MCP calls sequentially, feeds results forward, and writes the markdown. Total cost: ~11 credits (5 + 2 + 2 + 2).

Credit Quick Reference

TaskToolCredits
Static HTML fetchfetch_url1
Clean article textextract_content2
CSS-selector fieldsscrape_structured2
Discover URLsmap_site2
Web searchsearch_web5
Anti-bot bypassstealth_mode5
Deep researchdeep_research10

Troubleshooting

Tools list is empty -- Agent mode is off. Enable chat.agent.enabled in settings and switch chat mode to "Agent."

"Spawn ENOENT: crawlforge-mcp-server" -- VS Code cannot find the binary. Use an absolute path in .vscode/mcp.json: "command": "/usr/local/bin/crawlforge-mcp-server".

Copilot ignores the MCP server -- Prefix your prompt with #crawlforge or explicitly name a tool: "Use fetch_url to...". Copilot sometimes picks built-in tools by default.

401 Unauthorized -- The env var is not reaching the server. Check echo $CRAWLFORGE_API_KEY in the same shell that launched VS Code. On macOS, GUI-launched VS Code does not inherit shell env -- launch via code . from the terminal.

Workspace MCP config not loading -- VS Code does not auto-trust .vscode/mcp.json. Open the file, click the "Trust" notification, then reload the window.

Next Steps

  • Read the 20-tools overview to see the full toolkit
  • Study the MCP protocol explainer for how VS Code talks to servers
  • See getting started docs for the REST API
  • Compare to Firecrawl alternative if you are evaluating scraping vendors

Start free with 1,000 credits at crawlforge.dev/signup.

Tags

GitHub-CopilotVS-Codeweb-scrapingMCPtutorialagent-modeAI-agents

About the Author

C

CrawlForge Team

Engineering Team

Building the most comprehensive web scraping MCP server. We create tools that help developers extract, analyze, and transform web data for AI applications.

On this page

Frequently Asked Questions

Does GitHub Copilot support MCP servers?+

Yes, as of VS Code 1.102 (mid-2025). MCP servers work in Copilot Chat when you switch to Agent mode. Configuration lives in .vscode/mcp.json (workspace) or via the "MCP: Add Server" command palette (user scope).

Do I need a paid Copilot subscription to use CrawlForge MCP?+

You need a Copilot subscription (Individual, Business, or Enterprise) to access agent mode and MCP tool calls. CrawlForge itself has a free tier with 1,000 credits per month -- no credit card required.

Why does Copilot ignore my CrawlForge tools?+

Two common causes: chat mode is set to Ask or Edit instead of Agent, or Copilot picked a built-in tool. Switch to Agent mode in the chat dropdown and explicitly reference #crawlforge or a specific tool name like scrape_structured in your prompt.

How do I share MCP config with my team?+

Commit .vscode/mcp.json to your repo. Use ${env:CRAWLFORGE_API_KEY} or ${input:apiKey} so individual keys stay out of version control. Teammates run the same export CRAWLFORGE_API_KEY=... once, then Copilot picks up the shared config automatically.

What is the difference between @web and a CrawlForge MCP tool?+

@web asks Bing a question and returns a summarized answer -- no raw page access, no structured extraction, no control over which URLs are fetched. CrawlForge MCP tools give Copilot direct access to 20 scraping primitives: fetch raw HTML, CSS-select specific fields, bypass anti-bot, and run multi-source research with citations.

Related Articles

How to Scrape Websites with Claude Code (2026 Guide)
Tutorials

How to Scrape Websites with Claude Code (2026 Guide)

Scrape any website from your terminal with Claude Code and CrawlForge MCP. Fetch pages, extract data, bypass anti-bot -- in under 2 minutes.

C
CrawlForge Team
|
Apr 14
|
10m
How to Scrape Websites in Cursor IDE with CrawlForge MCP
Tutorials

How to Scrape Websites in Cursor IDE with CrawlForge MCP

Turn Cursor IDE into a web scraping workstation. Connect CrawlForge MCP and extract structured data from any site without leaving your editor.

C
CrawlForge Team
|
Apr 14
|
9m
How to Scrape Websites in Zed AI with CrawlForge MCP
Tutorials

How to Scrape Websites in Zed AI with CrawlForge MCP

Add web scraping to Zed AI in 3 minutes. Configure CrawlForge MCP in Zed so your editor can fetch, extract, and research live web data on demand.

C
CrawlForge Team
|
Apr 14
|
9m

Footer

CrawlForge

Enterprise web scraping for AI Agents. 20 specialized MCP tools designed for modern developers building intelligent systems.

Product

  • Features
  • Pricing
  • Use Cases
  • Integrations
  • Changelog

Resources

  • Getting Started
  • API Reference
  • Templates
  • Guides
  • Blog
  • FAQ

Developers

  • MCP Protocol
  • Claude Desktop
  • Cursor IDE
  • LangChain
  • LlamaIndex

Company

  • About
  • Contact
  • Privacy
  • Terms

Stay updated

Get the latest updates on new tools and features.

Built with Next.js and MCP protocol

© 2025-2026 CrawlForge. All rights reserved.