Skip to content

Repository files navigation

web2md-mcp

npm version License: MIT MCP

Convert any webpage to clean Markdown from Claude Desktop, Cursor, or any MCP-compatible AI agent.

web2md-mcp is the official Model Context Protocol server for Web2MD. Give your AI agent a convert_url tool and it can turn any webpage — articles, docs, Reddit threads, GitHub READMEs — into clean, token-efficient Markdown without copy-pasting.

Unlike server-side readers, the optional Agent Bridge mode routes conversion through your real browser session — so it works on Reddit, X, paywalled Substack, and other pages that block datacenter scrapers.


Why use this?

web2md-mcp Server-side reader APIs
Clean Markdown built for LLM context
Token counting + metadata ⚠️ varies
Works on Reddit / X / paywalled pages ✅ (Agent Bridge) ❌ blocked by anti-bot
Uses your authenticated session ✅ (Agent Bridge)
Batch convert up to 50 URLs ⚠️ varies
One-line MCP install varies

If you've hit "I can't access that URL" in Claude or Cursor when pasting a Reddit/X/Substack link, this is the fix.


Install

npm install -g web2md-mcp

Or run directly with npx (no install):

npx web2md-mcp

Setup

1. Get an API key

Sign up at web2md.org and copy your API key (w2m_...) from the dashboard.

2. Add to Claude Desktop

~/.claude/claude_desktop_config.json:

{
  "mcpServers": {
    "web2md": {
      "command": "npx",
      "args": ["web2md-mcp"],
      "env": { "WEB2MD_API_KEY": "w2m_your_api_key" }
    }
  }
}

3. Add to Cursor

~/.cursor/mcp.json:

{
  "mcpServers": {
    "web2md": {
      "command": "npx",
      "args": ["web2md-mcp"],
      "env": { "WEB2MD_API_KEY": "w2m_your_api_key" }
    }
  }
}

Restart your client. The agent now has convert_url and batch_convert tools available.


Tools

convert_url

Convert a single webpage URL to Markdown.

// Input
{ "url": "https://example.com/article" }
// Output
{ "markdown": "# Article Title\n...", "metadata": { "title": "...", "wordCount": 1240, "readingTime": "6 min" } }

batch_convert

Convert up to 50 URLs in one call — ideal for filling a research context window or building a RAG corpus.

// Input
{ "urls": ["https://...", "https://..."] }
// Output
[ { "url": "...", "markdown": "...", "metadata": { ... } }, ... ]

agent_convert / agent_batch_convert

Convert through the Web2MD Chrome extension's real browser session (requires Agent Bridge setup). This is what bypasses anti-bot blocking on Reddit, X, and login-protected pages.


Example prompts

Once configured, just ask your agent:

  • "Convert this Reddit thread to markdown and summarize the top arguments."
  • "Fetch these 10 blog URLs as markdown and build a comparison table."
  • "Read this GitHub README as clean markdown and explain the setup steps."

Agent Bridge (browser-based conversion)

Server-side fetching fails on Reddit, X, paywalled Substack/Medium, and JS-heavy SPAs — datacenter IPs get blocked and client-side-rendered content never loads. Agent Bridge solves this by routing the conversion through the Web2MD Chrome extension running in your logged-in browser. Setup guide: web2md.org/docs/advanced/agent-bridge.


Links

License

MIT © Web2MD

About

MCP server to convert any webpage to clean Markdown for Claude Desktop, Cursor & AI agents — works on Reddit, X, and paywalled pages via Agent Bridge.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages