Docs Fetch MCP Server

Docs Fetch MCP Server

docs-fetch-mcp•bywolfyy970

A Bun-based MCP server that fetches a documentation URL, extracts readable Markdown, ranks links, and optionally crawls linked pages within explicit limits.

License: MIT•Runtime: Awaiting documentation review•Category: file systems-docs

WHAT IT DOES

  • •Exposes a single MCP tool, fetch_doc_content, that fetches a URL and optionally crawls linked pages.
  • •Extracts Markdown with headings, lists, code blocks, tables, blockquotes, and links.
  • •Supports optional Puppeteer rendering as a fallback for client-rendered or thin pages.
  • •Bounds crawls with same-origin and pathPrefix scoping plus page, concurrency, timeout, and content truncation limits.

BEST FOR

  • •Fetching and converting documentation pages into readable Markdown for MCP clients.
  • •Crawling documentation sites that share a domain with marketing pages or blogs by restricting scope to a path prefix.
  • •Crawling linked documentation pages up to a chosen depth within bounded limits.

ABOUT DOCS-FETCH-MCP

Docs Fetch MCP Server is cataloged as an MCP server attributed to wolfyy970. A Bun-based MCP server that fetches a documentation URL, extracts readable Markdown, ranks links, and optionally crawls linked pages within explicit limits. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Docs Fetch MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does crawl depth work?

Depth is link distance from the root: depth 1 returns only the root page, depth 2 includes direct child links, and depth 3 includes grandchildren, up to a maximum of 5.

What does the render option control?

Rendering strategy: never uses only the HTTP fetch path, always uses Puppeteer for every page, and auto tries HTTP first then falls back to Puppeteer when HTTP fails or content is very thin.

Upstream README

View this exact version on GitHub

README.md · 65890a6171cc · Fetched 2026-11-13 13:31:15 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Docs Fetch MCP Server

A Bun-based Model Context Protocol (MCP) server for fetching documentation pages and bounded documentation crawls.

The server exposes one MCP tool, fetch_doc_content. It fetches a root URL, extracts readable Markdown, ranks links, and can crawl linked pages within explicit depth, page, timeout, and scope limits. Results are returned as structured JSON with crawl metadata, page content, ranked links, truncation flags, and per-page errors.

Features

  • Fast static fetch path with axios
  • Optional Puppeteer rendering for client-rendered or thin pages
  • Markdown extraction with headings, lists, code blocks, tables, blockquotes, and links
  • Real crawl depth semantics:
    • depth: 1 returns only the root page
    • depth: 2 includes direct child links
    • depth: 3 includes grandchildren, up to the maximum of 5
  • URL normalization before dedupe: fragments, tracking params, default ports, and trailing slash duplicates are removed
  • Crawl scoping by same origin and optional pathPrefix
  • Bounded maxPages, maxConcurrency, global timeout, per-page timeout, and per-page content truncation
  • Partial results with explicit per-page failures
  • Runtime argument validation shared with the advertised tool schema

Requirements

  • Bun >=1.3.0
  • Puppeteer's browser installation if render is auto or always

This project uses Bun for dependency management, runtime execution, builds, and tests.

Installation

bun install
bun run build

Configure your MCP client:

{
  "mcpServers": {
    "docs-fetch": {
      "command": "bun",
      "args": ["/path/to/docs-fetch-mcp/build/index.js"]
    }
  }
}

For local development without a build:

{
  "mcpServers": {
    "docs-fetch": {
      "command": "bun",
      "args": ["/path/to/docs-fetch-mcp/src/index.ts"]
    }
  }
}

Tool

fetch_doc_content

Fetch one URL and optionally crawl linked pages.

Parameters:

NameTypeDefaultLimitDescription
urlstringrequiredHTTP/HTTPS onlyRoot URL to fetch.
depthnumber11 to 5Link distance from the root.
maxPagesnumber101 to 50Maximum pages returned across the crawl.
maxConcurrencynumber31 to 8Maximum pages fetched at once.
timeoutMsnumber450005000 to 120000Global crawl timeout.
perPageTimeoutMsnumber100001000 to 60000Per-page fetch timeout.
renderstringautoauto, always, neverBrowser rendering strategy.
sameOriginbooleantruen/aRestrict crawled links to the same origin.
pathPrefixstringomittedn/aOptional path prefix crawl scope, such as /docs.
contentLimitnumber120001000 to 50000Markdown characters per page before truncation.
includeLinksbooleantruen/aInclude ranked links in returned page objects.

Example request:

{
  "url": "https://example.com/docs",
  "depth": 2,
  "maxPages": 8,
  "pathPrefix": "/docs",
  "render": "auto"
}

Response shape:

{
  "rootUrl": "https://example.com/docs",
  "normalizedRootUrl": "https://example.com/docs",
  "explorationDepth": 2,
  "maxPages": 8,
  "pagesExplored": 3,
  "pagesFailed": 1,
  "timedOut": false,
  "durationMs": 1234,
  "crawl": {
    "sameOrigin": true,
    "pathPrefix": "/docs",
    "maxConcurrency": 3,
    "render": "auto",
    "perPageTimeoutMs": 10000
  },
  "content": [
    {
      "url": "https://example.com/docs",
      "finalUrl": "https://example.com/docs",
      "depth": 0,
      "status": 200,
      "title": "Documentation",
      "description": "Example documentation",
      "canonicalUrl": "https://example.com/docs",
      "headings": ["Documentation"],
      "content": "# Documentation\n\n...",
      "contentLength": 2400,
      "truncated": false,
      "fetchedWith": "http",
      "links": [
        {
          "url": "https://example.com/docs/api",
          "text": "API reference",
          "score": 18.5,
          "internal": true
        }
      ]
    }
  ],
  "errors": [
    {
      "url": "https://example.com/docs/missing",
      "depth": 1,
      "error": "Request failed with status code 404",
      "status": 404
    }
  ]
}

Crawl Behavior

  • Crawling is breadth-first.
  • URLs are normalized before dedupe and enqueue.
  • sameOrigin: true rejects links whose origin differs from the normalized root URL.
  • pathPrefix further restricts links to a path prefix on the root origin.
  • includeLinks: false hides links in returned page objects but does not disable link discovery for crawling.
  • render: "never" uses only the HTTP fetch path.
  • render: "always" uses Puppeteer for every fetched page.
  • render: "auto" tries HTTP first, then uses Puppeteer when HTTP fails or extracted content is very thin.
  • Browser fallback currently preserves the rendered response status and extracts the page body even for non-2xx pages.

Architecture

src/index.ts                         CLI entrypoint
src/server.ts                        MCP server wiring and tool registration
src/config/tool-options.ts           Shared tool schema/default/range metadata
src/tool/fetch-doc-content-args.ts   Runtime argument validation
src/crawler/docs-crawler.ts          Crawl orchestration and queue management
src/crawler/page-fetcher.ts          HTTP fetch, browser fallback, extraction coordination
src/browser/browser-manager.ts       Reusable Puppeteer browser/page handling
src/content/content-extractor.ts     Page metadata/content extraction facade
src/content/main-content-selector.ts Main content selection
src/content/link-extractor.ts        Link normalization, dedupe, and ranking
src/content/markdown-renderer.ts     HTML-to-Markdown rendering
src/content/text-cleanup.ts          Shared text normalization helpers
src/utils/url.ts                     URL normalization and scope utilities
src/types/index.ts                   Shared TypeScript types

The MCP schema and runtime option normalization share the same metadata source in src/config/tool-options.ts. Keep new options there first, then wire behavior through validation and crawler options.

Development

bun install
bun run dev
bun run test
bun run typecheck
bun run build

Scripts:

  • bun run dev: run the MCP server from TypeScript source.
  • bun run test: run Bun tests under src.
  • bun run typecheck: run TypeScript with --noEmit.
  • bun run build: emit build/index.js with a Bun shebang.
  • bun run start: run the built MCP server.

Testing

Tests are colocated with the modules they cover:

  • src/crawler/docs-crawler.test.ts: crawl depth, scoping, failures, and link visibility.
  • src/crawler/page-fetcher.test.ts: fetch/render fallback characterization.
  • src/content/content-extractor.test.ts: Markdown extraction and truncation.
  • src/tool/fetch-doc-content-args.test.ts: boundary validation and schema/default sync.
  • src/utils/url.test.ts: URL normalization and scope helpers.

When changing behavior, add or update characterization tests first. For refactors, keep bun run test, bun run typecheck, and bun run build green.

Notes

  • Use render: "never" for fast static documentation crawls and tests.
  • Use pathPrefix for documentation sites that share a domain with marketing pages, blogs, or apps.
  • Puppeteer browser installation can be skipped only if callers use render: "never".
  • The custom Markdown renderer is intentionally covered by characterization tests; preserve output compatibility unless making an explicit behavior change.

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Docs Fetch MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/docs-fetch-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related file systems-docs MCP Servers

Alternative and complementary servers in the same category

View all in file systems-docs →

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Repository stats unavailable
Files & Documentation
LoreKeeper MCP server
lorekeeper-rpg-lorekeeper-com•lore-keeper

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

Repository stats unavailable
Files & Documentation

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.

Repository stats unavailable
Files & Documentation