May 14, 2026

How to Crawl a Website with OpenCode

Register crawler-mcp with OpenCode and drive crawls, fetches, and link discovery from your terminal.

Mehmet Kose
2 mins read

OpenCode is a terminal agent that supports MCP servers. Once crawler-mcp is registered, you can ask OpenCode to crawl websites, fetch pages, and discover links - all from the command line.

This guide shows how to set it up and start crawling.

Step 1: Install crawler-mcp

Run the install script:

curl -fsSL https://install.crawler.sh/install-mcp.sh | sh

This downloads the correct binary for your platform to ~/.crawler/bin/crawler-mcp.

For more detail, see the installation guide.

Step 2: Wire it into OpenCode

Edit ~/.config/opencode/opencode.json (global) or opencode.json (per-project):

{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"crawler-sh": {
"type": "local",
"command": ["/Users/you/.crawler/bin/crawler-mcp"],
"enabled": true
}
}
}

Use the absolute path from which crawler-mcp. Restart OpenCode for the change to take effect.

For full setup details, see the OpenCode docs.

Step 3: Crawl a website

In OpenCode, ask:

Use crawler-sh to crawl https://example.com to depth 2 and list the page titles.

OpenCode calls crawl_site and returns the results.

Step 4: Fetch a single page

For one-off lookups:

Use crawler-sh to fetch https://example.com/blog/latest-post and summarise it.

OpenCode calls fetch_page and reasons over the Markdown response.

To map a site’s structure before a deep crawl:

Use crawler-sh to discover_links on https://example.com to depth 1.

OpenCode returns URLs with titles so you can decide which sections to explore.

Frequently Asked Questions

Crawler.sh - Free Local AEO & SEO Spider and a Markdown content extractor | Product Hunt