doc-scraper
This MCP server lets you crawl documentation sites into local Markdown and serve the stored corpus to agents for offline search, reading, freshness checks, and crawl management.
List configured sites and get a consolidated server/site/recent-job overview.
Start full or incremental background crawls and return a job ID.
Check crawl job status, optionally waiting up to 60 seconds, and cancel jobs.
Check site crawl freshness and compare latest versus baseline crawls for added, removed, or changed pages.
List crawled pages and read stored Markdown by URL and optional heading anchor with no network access.
Run BM25 full-text search across crawled docs, optionally scoped to one site.
Fetch arbitrary HTML pages live over the network and convert them to Markdown with truncation/pagination controls.
Preserve previous crawl output/state while staging new crawls, so failed or cancelled crawls do not clobber the last good corpus.
Automatically detects and crawls Docusaurus-based documentation sites, extracting core content and converting it to Markdown for LLM ingestion.
Automatically detects and crawls GitBook documentation sites, extracting core content and converting it to Markdown for LLM ingestion.
Automatically detects and crawls Sphinx-based documentation sites, extracting core content and converting it to Markdown for LLM ingestion.
LLM Documentation Scraper (doc-scraper)
A configurable, concurrent, and resumable web crawler written in Go. Specifically designed to scrape technical documentation websites, extract core content, convert it cleanly to Markdown format suitable for ingestion by Large Language Models (LLMs), and save the results locally.

doc-scraper crawls documentation sites into clean Markdown and serves them to coding agents over MCP. Your agent searches and reads the docs you chose, offline, instead of guessing from training data or a live web search. Point doc-scraper add at any docs page and it detects the framework (30+ docs generators, including Docusaurus, Starlight, Sphinx, VitePress, Material for MkDocs, and mdBook), validates the content selector, and drafts the config for you.
Documentation: https://sriram-pr.github.io/doc-scraper/
Features
Offline search for agents: BM25 full-text search (
search_docs) and page reads (read_page) over the stored corpus, with no network accessFramework detection: 30+ docs generators recognized, each selector validated on the page, Readability fallback, JavaScript-only shells reported instead of crawled empty
Clean output: GitHub-Flavored Markdown per page with frontmatter, plus
pages.jsonl,llms.txt, andllms-full.txtPolite and resumable: robots.txt and sitemaps, per-host rate limits, retries with backoff, resumable crawls, and staged output that never clobbers the last good copy
Stays fresh: incremental re-crawls, watch mode, and crawl history (
get_freshness,diff_crawl)Many sites at once: parallel crawls with shared limits
Related MCP server: go-docs-mcp
Install
Download a release binary (Linux, macOS, Windows; amd64 and arm64) from the Releases page, or:
go install github.com/Sriram-PR/doc-scraper/v2/cmd/doc-scraper@latestdocker run --rm --user "$(id -u):$(id -g)" -v "$PWD":/data ghcr.io/sriram-pr/doc-scraper:latest crawl -site rust_cli_bookClaude Desktop users can install doc-scraper.mcpb from the latest release instead. Details: Install.
Quick start
doc-scraper add -site rust_cli_book https://rust-cli.github.io/book/index.html # detect, preview, confirm
doc-scraper crawl -site rust_cli_book # Markdown lands in ./crawled_docs/rust_cli_book/
doc-scraper search -site rust_cli_book "error handling"Then give it to Claude Code:
claude mcp add --transport stdio doc-scraper -- /path/to/doc-scraper mcp-server -config /path/to/config.yamlSee Claude Code setup for scopes and a first prompt.
Docs
Getting started: install, quick start, adding a site
Use with agents (MCP): Claude Code, Claude Desktop, any stdio client, and the 13 tools
Docs frameworks: how detection works, with guides for Docusaurus, Starlight, Sphinx, VitePress, Material for MkDocs, and mdBook
Configuration and CLI reference
Contributing
Contributions are welcome. Read CONTRIBUTING.md before starting: it covers setup, the testing rules CI enforces, how to claim an issue, and the policy on AI-assisted contributions. Issues labeled good first issue are a good place to begin.
Report security problems privately as described in SECURITY.md. Everyone taking part follows the Code of Conduct.
Privacy Policy
doc-scraper collects nothing: no telemetry, no analytics, no accounts. All output and state stays on your machine, and the only network requests it makes are the crawls and fetches you explicitly ask for. Full policy: PRIVACY.md.
License
This project is licensed under the Apache-2.0 License.
Acknowledgements
GoQuery for HTML parsing
html-to-markdown for conversion
BadgerDB for state persistence
mcp-go for MCP server implementation
go-readability for content extraction fallback
modernc.org/sqlite for the pure-Go crawl-history index
robotstxt for
robots.txtparsingyaml.v3 for configuration parsing
google/uuid for crawl job IDs
x/sync for the weighted semaphores that cap concurrency
Available Tools
13 toolscancel_crawlAIdempotent
Cancel a running or pending crawl job by job ID. The previously stored corpus and crawl history are left untouched. Has no effect on jobs already in a terminal state.
Inputs: job_id (required). Returns: job_id, status, message, site_key, +1 more
crawl_siteA
Start a background crawl for a configured site. Returns immediately with a job ID. The crawl builds in a staging area and replaces the stored corpus only when it completes, so a cancelled or failed crawl leaves the previous corpus intact. A crawl that lost a large share of its pages is kept back instead (the job fails with refused set), and the stored corpus is kept.
Inputs: site_key (required), incremental, allow_shrink. Returns: job_id, status, message, site_key, +1 more
describe_serverARead-onlyIdempotent
Returns server identity, configured sites, and recent crawl jobs in one call. Call this first to orient yourself: it consolidates what would otherwise require list_sites plus several get_job_status calls. The MCP tool list is already advertised by the protocol so it is not duplicated here.
Inputs: no named parameters. Returns: sites, server, total_jobs, jobs_capped, +4 more
diff_crawlARead-onlyIdempotent
Return added/removed/changed pages between the latest crawl and a baseline crawl: the crawl before it by default, or with since, the most recent crawl whose crawl_ended_at <= since. Hash-based verdicts from the SQLite history index. To see what a crawl changed, run crawl_site, wait for it to finish, then call diff_crawl without since.
Inputs: site_key (required), since, offset, max_results. Returns: note, added, since, total, +9 more
draft_siteARead-onlyIdempotent
Draft a site entry and preview one page extracted with it. Never writes the config. With url, probes a new docs site the way doc-scraper add does (robots.txt, llms.txt, sitemap, framework detection). With only site_key, starts from that configured site's entry without probing. overrides sets entry fields by their config names (content_selector, allowed_path_prefix, disallowed_path_patterns, max_depth, ...); durations are strings such as "1s". Judge the preview (code blocks kept, nav_leak, chars), draft again with overrides until it looks right, then pass entry to save_site. max_depth is an exclusive bound: 1 crawls only the start pages.
Inputs: url, site_key, overrides, preview_url. Returns: entry, exists, preview, evidence, +10 more
get_freshnessARead-onlyIdempotent
Return the most recent crawl summary for a site (last_crawl with its start and end times, total_pages and mode, plus age_seconds), output/state dir presence and any running job. Use this to decide whether to query the existing crawl or run crawl_site first.
Inputs: site_key (required). Returns: site_key, last_crawl, output_dir, age_seconds, +4 more
get_job_statusARead-onlyIdempotent
Get the status and page counts of a crawl job. Set wait_seconds to wait for the job to finish instead of polling: the call returns as soon as the job completes, fails or is cancelled, or when the wait runs out, with the status at that moment.
Inputs: job_id (required), wait_seconds. Returns: job_id, status, refused, failures, +12 more
get_pageARead-onlyIdempotent
Fetch an HTML page live over the network and return its content as markdown. This is an on-demand fetch independent of any crawl: it does not read the stored crawl output, and it ignores the site's configured content_selector and scope. The result is text: header lines (url, title, content, fetch_time_ms), an empty line, then the markdown. Large pages are truncated at max_bytes, and the content line then gives next_offset; pass it as offset to read the rest (each call fetches the page again).
Inputs: url (required), offset, max_bytes, content_selector.
list_pagesARead-onlyIdempotent
List crawled pages for a site, paginated and sorted by URL. Returns metadata only (URL, title, depth, crawled_at, content_length). Pass any URL returned here to read_page to get its stored markdown; get_page re-fetches a URL live rather than returning the crawled copy.
Inputs: site_key (required), offset, max_results. Returns: pages, total, offset, message, +3 more
list_sitesARead-onlyIdempotent
List all configured sites available for crawling
Inputs: no named parameters. Returns: sites, config_path, total_sites
read_pageARead-onlyIdempotent
Return a page's markdown from the stored crawl output, without any network access. This is the counterpart to get_page: read_page serves the crawled copy that already had the site's content_selector applied, while get_page re-fetches the URL live. Use list_pages to discover URLs, then read_page to read them. Pass a search_docs result's anchor to read only that section. The result is text: header lines (site_key, url, title, content, section_end with an anchor, depth, crawled_at, content_hash, source, headings), an empty line, then the markdown. Large pages are truncated at max_bytes, and the content line then gives next_offset; pass it as offset to read the rest.
Inputs: url (required), site_key (required), anchor, offset, +1 more.
save_siteADestructiveIdempotent
Write a site entry to the config file and load it into the running server, so crawl_site, search_docs and read_page can use it at once. entry is a full entry by config field name, normally draft_site's entry with changes; fields left out are unset. Overwriting a configured site needs replace: true. Only the entry's lines change in the file. Refused while the site is crawling, and on servers started without -allow-config-writes. max_depth is an exclusive bound: 1 crawls only the start pages.
Inputs: entry (required), site_key (required), replace. Returns: written, replaced, site_key, next_actions
search_docsARead-onlyIdempotent
Full-text search across all crawled documentation, ranked by relevance (BM25 with stemming), with zero network access. Results carry the page URL, its section heading path, and a snippet with match terms marked [like this]; follow up with read_page for the full page. Supports FTS5 syntax: quoted phrases, OR, and trailing * for prefix matching. Searches the stored index only; run crawl_site first for uncrawled sites.
Inputs: query (required), limit, site_key. Returns: count, limit, query, results, +2 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools target distinct resource+action pairs, and the descriptions explicitly contrast the risky pairs (get_page live fetch vs read_page stored copy, describe_server vs list_sites/get_job_status). A few tools still cluster around crawl/job state introspection (get_freshness, get_job_status, describe_server), which could cause mild misselection, but the guidance mitigates it.
Every tool follows a consistent snake_case verb_noun pattern: list_sites, crawl_site, cancel_crawl, diff_crawl, get_job_status, read_page, search_docs. No mixed conventions or vague single-word names.
13 tools is well within the ideal 3-15 range and each tool maps to a distinct step in the site-config and crawl-to-read lifecycle. No filler tools are present.
The surface covers site configuration (draft_site/save_site), crawl lifecycle (crawl_site, cancel_crawl, get_job_status), retrieval (list_pages, read_page, get_page, search_docs), and change tracking (diff_crawl, get_freshness). The main gap is no delete/remove operation for a configured site or its stored corpus, which would require manual config edits.
Maintenance
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Scrape, crawl, map & search the web. Open-source, self-hostable Rust crawler & search for AI agents.
Document-to-Markdown MCP server — convert PDF, Office and HTML into LLM-ready Markdown.
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Related MCP Servers
- AlicenseAqualityDmaintenanceLocal-first MCP server providing semantic search over library docs, fully offline. Single Go binary speaks MCP over stdio against a vector index pinned to the binary version. Like Context7 with the internet turned off. Apache 2.0. Linux + macOS, also available as a container image.24Apache 2.0
- AlicenseAqualityBmaintenanceGo MCP server that lets your AI read documents: PDF, DOCX, XLSX, PPTX, ODT, EPUB, HTML, RTF, Markdown, CSV, Jupyter and images, with OCR, search, tables and paging. 13 read-only tools, one binary, Homebrew and Claude Code marketplace.1312MIT
- FlicenseNot gradedqualityDmaintenanceDocumentation crawler MCP server that crawls and indexes documentation sites so that any MCP-compatible AI can search, read, and expand on the content.1-
- AlicenseNot gradedqualityDmaintenanceA documentation MCP server that crawls websites and Git repositories, stores them as Markdown, and provides tools to search and retrieve documentation for local LLMs and AI agents.Apache 2.0