Server data from the Official MCP Registry
Converts HTML to Markdown with auto-summary and section extraction. Supports Playwright.
Converts HTML to Markdown with auto-summary and section extraction. Supports Playwright.
Valid MCP server (2 strong, 1 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.
6 files analyzed · No issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Add this to your MCP configuration file:
{
"mcpServers": {
"mcp-server": {
"args": [
"html2md-mcp"
],
"command": "uvx"
}
}
}From the project's GitHub README.
MCP (Model Context Protocol) server for converting HTML webpages to clean Markdown format. Reduces HTML size by ~90-95% while preserving tables, images, and important content - perfect for AI context.
trafilatura and BeautifulSoup4 for robust extractionuv package manager (recommended) or pip# Clone the repository
git clone <your-repo-url>
cd html2md
# Install dependencies
uv pip install -e .
# Install Playwright browsers (required for browser mode)
playwright install chromium
# Clone the repository
git clone <your-repo-url>
cd html2md
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -e .
# Install Playwright browsers (required for browser mode)
playwright install chromium
The easiest way to use html2md is with Docker:
# Build the image
docker build -t html2md .
# Or use pre-built image (when published)
docker pull your-registry/html2md:latest
For Claude Desktop, configure with Docker:
{
"mcpServers": {
"html2md": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"html2md"
]
}
}
}
Docker Image Features:
Add the server to your Claude Desktop configuration file:
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"html2md": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/html2md",
"run",
"html2md"
]
}
}
}
Edit %APPDATA%/Claude/claude_desktop_config.json:
{
"mcpServers": {
"html2md": {
"command": "uv",
"args": [
"--directory",
"C:\\absolute\\path\\to\\html2md",
"run",
"html2md"
]
}
}
}
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"html2md": {
"command": "uv",
"args": [
"--directory",
"/absolute/path/to/html2md",
"run",
"html2md"
]
}
}
}
Once configured, the MCP server will be available in Claude Desktop. You can use the html_to_markdown tool:
Convert this webpage to markdown: https://example.com/article
Use the html_to_markdown tool with:
- url: https://example.com/docs
- include_images: false
- include_tables: true
Use the html_to_markdown tool with:
- url: https://spa-application.com
- fetch_method: playwright
- wait_for: networkidle
Use the html_to_markdown tool with:
- url: https://private-site.com/dashboard
- fetch_method: playwright
- use_user_profile: true
- browser_type: chromium
Note: For use_user_profile=true, make sure Chrome is closed before running.
Basic Parameters:
url (required): URL of the webpage to convertinclude_images (optional, default: true): Include images in Markdowninclude_tables (optional, default: true): Include tables in Markdowninclude_links (optional, default: true): Include links in Markdowntimeout (optional, default: 30): Request timeout in seconds (5-120)Performance Parameters:
max_size (optional, default: 10MB): Maximum size of content to download in bytes (1MB-50MB)use_cache (optional, default: false): Enable caching for faster repeated conversionscache_ttl (optional, default: 3600): Cache time-to-live in seconds (60-86400)Browser Mode Parameters:
fetch_method (optional, default: "fetch"): Fetch method - "fetch" (fast) or "playwright" (handles JS, auth)browser_type (optional, default: "chromium"): Browser to use - "chromium", "firefox", or "webkit"headless (optional, default: true): Run browser in headless modewait_for (optional, default: "networkidle"): Wait strategy - "load", "domcontentloaded", or "networkidle"use_user_profile (optional, default: false): Use your browser profile with cookies (requires Chrome closed)uv pip install -e ".[dev]"
pytest
# Format with black
black src/ tests/
# Lint with ruff
ruff check src/ tests/
mypy src/
The project consists of three main modules:
converter.pyCore HTML to Markdown conversion functionality:
fetch_html(): Downloads HTML from URLclean_html(): Removes unnecessary elements with BeautifulSoupconvert_to_markdown(): Converts cleaned HTML to Markdown with trafilaturahtml_to_markdown(): Main workflow combining all stepsserver.pyMCP server implementation:
html_to_markdown toolutils.pyUtility functions:
cache.pyIn-memory caching system:
SimpleCache class with TTL supportbrowser.pyPlaywright browser automation:
fetch_html_playwright() - Async browser-based HTML fetchingclaude_desktop_config.json is absolute and correct# Verify Python version
python --version # Should be 3.10+
# Try reinstalling dependencies
uv pip install --force-reinstall -e .
timeout parameterfetch_method: playwright to execute JavaScriptmax_size parameter (up to 50MB) or the page exceeds limitsuse_cache: false if you need fresh contentplaywright install chromiumuse_user_profile: truewait_for strategies:
"load" - fastest, waits for page load event"domcontentloaded" - waits for DOM to be ready"networkidle" - slowest but most reliable, waits for network to be idlebrowser_type: chromium and use_user_profile: trueTypical conversion results:
MIT
Contributions are welcome! Please feel free to submit issues or pull requests.
Built with:
Be the first to review this server!
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Microsoft · Content & Media
Convert files (PDF, Word, Excel, images, audio) to Markdown for LLM consumption
by mcp-marketplace · Developer Tools
Scaffold, build, and publish TypeScript MCP servers to npm — conversationally
by mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.
by Taylorwilsdon · Productivity
Control Gmail, Calendar, Docs, Sheets, Drive, and more from your AI