MCP Server for Web2MD โ convert URLs to Markdown from Claude Desktop, Cursor, etc.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Turn messy HTML into clean, LLM-ready Markdown.
This is the extraction and conversion engine behind Web2MD. It is a pure library โ give it an HTML string, get Markdown back. No network calls, no API key, no account. Nothing in this package talks to a server.
Feeding raw HTML to a language model wastes most of your context window on markup, navigation, and ads. Converting first cuts that down and gives the model a document it can actually follow.
The library reports both numbers so you can see the difference:
convertToMarkdown returns null when it cannot find a main content block โ
check for that rather than assuming a result.
convertToMarkdown(html, options?)The main entry point. Note the signature takes two arguments โ the URL goes
inside options, not as a positional parameter:
| Option | Default | Meaning |
|---|---|---|
url | โ | Source URL. Used to resolve relative links and fill metadata.url. |
includeLinks | false | Keep <a> as Markdown links. Off by default because link URLs are often the bulk of the tokens on navigation-heavy pages. |
includeImages | false | Keep images. Off by default for the same reason. |
includeMeta | false | Prepend a metadata block (title, source, timestamp). |
customRule | โ | A CustomRule for site-specific extraction. |
detectCodeLanguage | false | Try to infer the language of fenced code blocks. |
includeLinks and includeImages default to off. That is deliberate โ the
primary use case is feeding an LLM, where both are usually noise. Turn them on
when you are archiving rather than summarising.
Markdown โ sanitized HTML (via DOMPurify), for previewing output:
getPageHTML() and getSelectionHTML() read document directly and therefore
only work in a browser. They throw in Node โ that boundary is intentional.
Generic extraction handles most pages. When a site needs special treatment, pass a rule:
This package covers extraction and conversion. It does not include Web2MD's browser extension, hosted API, or account system โ those stay in the product.
Contributions to extraction quality are especially welcome: if a site converts badly, an issue with the URL and what went wrong is genuinely useful.
MIT
No reviews yet โ be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/web2md)<a href="https://allmcps.com/mcp/web2md"><img src="https://allmcps.com/api/badge/web2md?style=directory" alt="Web2md on AllMCPs" /></a>