MarkGrab

io.github.ArkNillPublished by GitHub account ArkNillv0.1.2Updated Oct 25, 2026

Universal web content extraction — any URL to LLM-ready markdown. HTML, YouTube, PDF, DOCX.

VerifiedSTDIODesktop onlyWeb Search & ScrapingFiles & Storage

Overview

AI-generated overview

MarkGrab is a local Python MCP server that fetches any URL and converts HTML pages, YouTube videos, PDFs and DOCX files into clean, LLM-ready markdown.

What you can do
Fetch a URL and convert its content into clean markdown, plain text or structured JSON, with title, word count, detected language and content type returned alongside it. Handle HTML pages with content-density filtering that strips navigation, sidebars and ads. Extract YouTube transcripts with timestamps. Pull text from PDFs with page structure and from DOCX files by paragraph and heading. Retry JavaScript-heavy pages through a Playwright browser fallback, optionally with stealth scripts, custom timeouts, proxies and output length limits.
When to use it
Useful when an assistant needs to read web articles, papers, documents or video transcripts as tidy markdown rather than raw HTML, for example for research, summarization or feeding content into a pipeline.
Requirements
Runs locally as a Python package installed with pip; optional extras enable Playwright browser rendering, YouTube transcripts, PDF and DOCX parsing. Network access to the target URLs is required. No accounts, API keys or environment variables are declared.
Before you install
The server does not check or enforce robots.txt and has no built-in rate limiting, so you are responsible for respecting site terms and throttling requests. YouTube transcript extraction relies on an unofficial caption API and may not comply with YouTube's terms. Stealth mode alters browser fingerprinting to evade bot detection. Fetched URLs are sent to the target sites and, for YouTube, to a third-party library.

Installation

In SourceWeft

  1. Open MarkGrab in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

MarkGrab

[PyPI] [Python] [License] [Tests]

한국어 문서 · llms.txt

Universal web content extraction — any URL to LLM-ready markdown.

python
from markgrab import extract
result = await extract("https://example.com/article")print(result.markdown)    # clean markdownprint(result.title)       # "Article Title"print(result.word_count)  # 1234print(result.language)    # "en"

Features

  • HTML — BeautifulSoup + content density filtering (removes nav, sidebar, ads)
  • YouTube — transcript extraction with timestamps
  • PDF — text extraction with page structure
  • DOCX — paragraph and heading extraction
  • Auto-fallback — tries lightweight httpx first, falls back to Playwright for JS-heavy pages
  • Async-first — built on httpx and Playwright async APIs

Install

bash
pip install markgrab

Optional extras for specific content types:

bash
pip install "markgrab[browser]"    # Playwright for JS-rendered pagespip install "markgrab[youtube]"    # YouTube transcript extractionpip install "markgrab[pdf]"       # PDF text extractionpip install "markgrab[docx]"      # DOCX text extractionpip install "markgrab[all]"       # everything

Usage

Python API

python
import asynciofrom markgrab import extract
async def main():    # HTML (auto-detects content type)    result = await extract("https://example.com/article")
    # YouTube transcript    result = await extract("https://youtube.com/watch?v=dQw4w9WgXcQ")
    # PDF    result = await extract("https://arxiv.org/pdf/1706.03762")
    # Options    result = await extract(        "https://example.com",        max_chars=30_000,       # limit output length (default: 50K)        use_browser=True,       # force Playwright rendering        stealth=True,           # anti-bot stealth scripts (opt-in)        timeout=60.0,           # request timeout in seconds        proxy="http://proxy:8080",    )
asyncio.run(main())

CLI

bash
markgrab https://example.com                     # markdown outputmarkgrab https://example.com -f text             # plain textmarkgrab https://example.com -f json             # structured JSONmarkgrab https://example.com --browser           # force browser renderingmarkgrab https://example.com --max-chars 10000   # limit output

ExtractResult

python
result.title        # page titleresult.text         # plain textresult.markdown     # LLM-ready markdownresult.word_count   # word countresult.language     # detected language ("en", "ko", ...)result.content_type # "article", "video", "pdf", "docx"result.source_url   # final URL (after redirects)result.metadata     # extra metadata (video_id, page_count, etc.)

How it works

mermaid
flowchart TD    A["🔗 URL Input"] --> B{"Content\nType?"}    B -->|"HTML"| C["HTTP fetch\n(httpx)"]    C --> D{"JS\nrequired?"}    D -->|"no"| E["HTML Parser\n→ clean markdown"]    D -->|"yes"| F["Playwright\nfallback"]    F --> E    B -->|"YouTube"| G["Transcript API\n→ timestamped markdown"]    B -->|"PDF"| H["PDF Parser\n→ structured markdown"]    B -->|"DOCX"| I["DOCX Parser\n→ markdown"]    E --> J["✅ LLM-ready\nMarkdown"]    G --> J    H --> J    I --> J

For HTML pages, if the initial httpx fetch yields fewer than 50 words, MarkGrab automatically retries with Playwright to handle JavaScript-rendered content.

Disclaimer

This software is provided for legitimate purposes only. By using MarkGrab, you agree to the following:

  • robots.txt: MarkGrab does not check or enforce robots.txt. Users are solely responsible for checking and respecting robots.txt directives and the terms of service of any website they access.

  • Rate limiting: MarkGrab does not include built-in rate limiting or request throttling. Users must implement their own rate limiting to avoid overloading target servers. Abusive request patterns may violate applicable laws and website terms of service.

  • YouTube transcripts: YouTube transcript extraction relies on the third-party youtube-transcript-api library, which uses YouTube's internal (unofficial) caption API. This may not comply with YouTube's Terms of Service. Use at your own discretion and risk.

  • Stealth mode: The optional stealth=True feature modifies browser fingerprinting signals to reduce bot detection. This feature is intended for legitimate use cases such as testing, research, and accessing content that is publicly available to regular browser users. Users are responsible for ensuring their use complies with applicable laws and the terms of service of target websites.

  • Legal compliance: Users are responsible for ensuring that their use of MarkGrab complies with all applicable laws, including but not limited to the Computer Fraud and Abuse Act (CFAA), the Digital Millennium Copyright Act (DMCA), GDPR, and equivalent legislation in their jurisdiction.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND. See the LICENSE file for the full MIT license text.

Acknowledgments

MarkGrab builds on excellent open-source work and well-established techniques:

  • puppeteer-extra-plugin-stealth — stealth evasion patterns (webdriver removal, plugin mocking, WebGL spoofing) that inspired the opt-in anti_bot/stealth.py module
  • Mozilla Readability — content area detection priority (article > main > body) and link density filtering concepts used in the density filter
  • Boilerpipe (Kohlschutter et al., 2010) — the academic origin of link density ratio algorithms for boilerplate removal
  • Jina Reader — validated the market need for URL-to-markdown extraction; MarkGrab aims to be a lightweight, self-hosted alternative

Built with httpx, BeautifulSoup, markdownify, Playwright, youtube-transcript-api, pdfplumber, and python-docx.

Used in

  • newswatch — RSS news monitoring pipeline (feedkit → markgrab → embgrep → diffgrab)
  • watchdeck — Web page monitoring with visual diffs and safety guards

License

MIT


Part of the QuartzUnit ecosystem — composable Python libraries for data collection, extraction, search, and AI agent safety.

Source: README.md at commit 9a7a9be

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.2LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts