文档抓取MCP服务器 logo

文档抓取MCP服务器

Community
wolfyy970

MCP server for fetching web page content with recursive exploration capability

Publisherwolfyy970
Repositorydocs-fetch-mcp
LanguageTypeScript
Forks
4
Stars
7
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    文档抓取MCP服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    7 stars and 4 forks from the linked repository.

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

bash
bun install
bun run build

Configure your MCP client:

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

For local development without a build:

json
{
  "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:

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

Response shape:

json
{
  "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

text
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

bash
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

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "wolfyy970-docs-fetch-mcp": {
      "command": "",
      "args": []
    }
  }
}

Use 文档抓取MCP服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once 文档抓取MCP服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add 文档抓取MCP服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the 文档抓取MCP服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "wolfyy970-docs-fetch-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "docs-fetch-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the 文档抓取MCP服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the 文档抓取MCP服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use 文档抓取MCP服务器 to help me with this task?
文档抓取MCP服务器
Sure. I read it.
Here is what I found using 文档抓取MCP服务器.

Frequently asked questions

What is the 文档抓取MCP服务器 MCP server used for?

文档抓取MCP服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use 文档抓取MCP服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use 文档抓取MCP服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use 文档抓取MCP服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With 文档抓取MCP服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect 文档抓取MCP服务器 MCP to TypingMind?

文档抓取MCP服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does 文档抓取MCP服务器 MCP provide in TypingMind?

文档抓取MCP服务器 exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use 文档抓取MCP服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If 文档抓取MCP服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇