markscrape
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
β‘ MarkScrape
Fast, self-hostable Web-to-Markdown, PDF, Crawl & llms.txt API for AI agents and RAG pipelines.
Built with TypeScript, Fastify, Mozilla Readability, turndown-plugin-gfm, SQLite WAL caching, and an SSRF security firewallβwith zero credit multipliers.
β¨ Features
Clean GFM Markdown: Preserves Markdown tables (
| col | col |) and<pre><code>language fences (```typescript,```python).Zero-Friction
GET /r/*: HitGET /r/https://example.comin any browser orcurlto get rawtext/markdowninstantly (supportsX-Target-Selector&X-Remove-Selector).AI Context Controls: Extract
toc, filter a singlesection, cap output withmaxTokens, or split into heading-aware RAGchunks(chunkSize).Change Tracking (
diff): SQLite-backedPOST /v1/diffdetects changed pages (addedLines,removedLines) so RAG pipelines never re-embed unchanged docs.Smart Anti-Bot & JS Detection: Returns explicit
CAPTCHA_DETECTED,BOT_BLOCKED, orJS_RENDER_REQUIREDcodes instead of feeding challenge garbage to your LLM.Headless JS & PDF Support: Optional
renderJs: trueviaplaywright-corefor SPAs, plus automatic PDF-to-text viaunpdf.Site Crawler, Mapper, Batch & Auto-
llms.txt:POST /v1/crawl,POST /v1/map,POST /v1/batch/scrape(up to 25 URLs), andPOST /v1/llms-txt.Built-in Stdio MCP Server: Plug directly into Cursor, Claude, or Antigravity (
node dist/mcp.js).Security Hardened: DNS-resolving SSRF firewall (blocks loopback, private LANs, cloud metadata
169.254.169.254, and unsafe redirects), 10 MB payload cap, SHA-256 hashed API keys, and DOMPurify-sanitized playground preview.
Related MCP server: markdown-for-agents-mcp
π Quick Start
pnpm install
pnpm run devOpen http://localhost:3001 for the interactive Playground UI.
Docker (1-Command Run)
# Pull prebuilt image from GitHub Container Registry
docker run -p 3001:3001 -e ADMIN_SECRET=your_secret ghcr.io/jenishpatel/markscrape:latest
# Or build locally
docker build -t markscrape .
docker run -p 3001:3001 -e ADMIN_SECRET=your_secret markscrapeStdio MCP Server (mcp.json)
{
"mcpServers": {
"markscrape": {
"command": "node",
"args": ["/absolute/path/to/markscrape/dist/mcp.js"]
}
}
}Build first: Run
pnpm run buildbefore using the MCP server.
π‘ API Reference
1. Instant URL Reader (Keyless)
curl http://localhost:3001/r/https://example.com
# Optional selector headers:
# -H "X-Target-Selector: article.docs" -H "X-Remove-Selector: nav, footer"2. Full Scrape (POST /v1/scrape)
curl -X POST http://localhost:3001/v1/scrape \
-H "Content-Type: application/json" \
-H "X-API-Key: mk_live_..." \
-d '{
"url": "https://example.com",
"formats": ["markdown", "links", "images", "metadata", "toc"],
"onlyMainContent": true,
"renderJs": false,
"section": "Introduction",
"maxTokens": 2000,
"chunkSize": 1000,
"diff": false,
"maxAge": 300
}'3. Crawler, Mapper, Batch, Diff & llms.txt
POST /v1/crawlβ{ "url": "https://docs.example.com", "limit": 20, "maxDepth": 2 }(202 Accepted->jobId)GET /v1/crawl/:idβ Poll crawl job status (running/completed) and resultsPOST /v1/diffβ{ "url": "https://docs.example.com" }(returnschanged,addedLines,removedLines)POST /v1/mapβ{ "url": "https://docs.example.com", "limit": 100 }POST /v1/batch/scrapeβ{ "urls": ["https://...", "https://..."] }(max 25)POST /v1/llms-txtβ{ "url": "https://docs.example.com", "limit": 15 }
π Production Security Checklist
Before exposing MarkScrape on the public internet:
Set environment variables directly in your shell or process manager (MarkScrape reads them from
process.envβ not from a.envfile at runtime unless you usenode --env-file=.env dist/index.js).Set a strong
ADMIN_SECRETβ this locksGET /v1/keysandDELETE /v1/keys/:idbehindx-admin-secretheader authentication.NODE_ENV=productionis set automatically in the Docker image β set it in your shell/systemd too.Lower the global IP rate limit in
src/index.ts(e.g.max: 60) and put Cloudflare in front of your domain.
π§ͺ Tests
pnpm run build
pnpm exec tsx src/test-ai-dx.ts
pnpm exec tsx src/test-crawl.ts
pnpm exec tsx src/test-ab-pro.ts
pnpm exec tsx src/test-p1.ts
pnpm exec tsx src/test-p2-freemium.ts
pnpm run test
pnpm run test:e2eπ License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Document-to-Markdown MCP server β convert PDF, Office and HTML into LLM-ready Markdown.
MCP server (stdio): fetch web pages as clean readable markdown via the AgentForge API
Pages, crawls and URL batches as clean Markdown and JSON for AI agents, with an Evidence Record.
Unified 15-tool SEO, SERP, clean Markdown & GEO (LLM citation Share-of-Voice) MCP server.
Related MCP Servers
- AlicenseAqualityBmaintenanceFetch URLs and return clean, LLM-ready markdown with metadata and layered prompt injection defense. Configurable timeouts, word limits, JS rendering, and link extraction. All-in-one MCP server + CLI.12MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for AI agents -- fetch any URL with full JavaScript rendering (Playwright/Chromium) and convert to clean, token-efficient markdown. Works on React, Vue, Angular, and any JS-heavy page. Includes web search, batch fetching, binary file download, LRU cache, SSRF protection, and structured output.36 npmMIT
- AlicenseAqualityDmaintenanceMCP server that converts URLs to clean Markdown/Text for LLM agents.563 npm5MIT
- AlicenseAqualityCmaintenanceA fast, dependency-light MCP server that converts web pages into clean Markdown, structured metadata, and classified links for language models.346 npmMIT