Skip to main content

A Python wrapper for the fetch-clean-markdown-mcp MCP server — fetches URLs and returns clean, LLM-optimized Markdown

Project description

fetch-clean-markdown-mcp

An MCP (Model Context Protocol) server that fetches URLs and returns clean, LLM-optimized Markdown.

Features

  • Clean extraction — Strips HTML, scripts, and boilerplate from any public URL
  • Security hardened — SSRF protection, redirect validation, prompt injection sanitization, payload size limits
  • Edge deployed — Runs on Cloudflare Workers for global low-latency access
  • Locally runnable — Can also run via stdio for local MCP client integration

Usage

Configuration for Cline / MCP clients

Add to your cline_mcp_settings.json:

{
  "mcpServers": {
    "fetch-clean-markdown-mcp": {
      "command": "node",
      "args": ["dist/local.js"],
      "env": {}
    }
  }
}

Or use the npm package globally:

{
  "mcpServers": {
    "fetch-clean-markdown-mcp": {
      "command": "npx",
      "args": ["fetch-clean-markdown-mcp"],
      "env": {}
    }
  }
}

Remote (Cloudflare Worker)

https://fetch-clean-markdown-mcp.yourbuttstinks69420.workers.dev

Tool

fetch_clean_markdown

CRITICAL: Use this tool to extract clean, readable text/markdown from any public URL.

Input:

  • url (string, required) — The public web URL to fetch

Returns:

  • Clean Markdown text with HTML stripped, injection sanitization applied, and size-limited to 512 KB

Local Development

# Install dependencies
npm install

# Build
npm run build

# Run locally
npm start

# Run with hot-reload
npm run start:dev

Deploy to Cloudflare

npx wrangler login
npm run deploy

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fetch_clean_markdown_mcp-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fetch_clean_markdown_mcp-1.0.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file fetch_clean_markdown_mcp-1.0.0.tar.gz.

File metadata

File hashes

Hashes for fetch_clean_markdown_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f77e2ebd12a04497011c88ab1883d9315dccd624341b3cd45e170b0c786e4458
MD5 4f31874e342d8ced0be4056c80071847
BLAKE2b-256 d314b66ded01a7fa9ea4658a82df335ddb9cb72c3f6d52f4084f567b0df224e6

See more details on using hashes here.

File details

Details for the file fetch_clean_markdown_mcp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fetch_clean_markdown_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92d61b98a82507bfbdb2bad4f61f6707ff8184970a06f8936ced015f244ef894
MD5 f6cde281ee74348c871c8f1ee4812d6f
BLAKE2b-256 99283716751c60e869d90e7ac695cd81400cdb736d0e9c4969034b38ffdc8b51

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page