Skip to main content

Overview

Agent Bridge lets AI agents (Claude Code, Cursor, Cowork, etc.) remotely control the Web2MD Chrome extension to batch-convert URLs — especially Reddit, JS-rendered, and login-protected pages that block server-side API access. Instead of calling the Web2MD API (which Reddit blocks), the AI agent sends commands to your local Chrome extension via Native Messaging. The extension opens each page in a background tab using your real browser session — with your cookies and login state — extracts the content, converts to Markdown, and returns the result.
Agent Bridge requires a PRO plan and the native messaging host installed on your machine. The extension must be open in Chrome.

Architecture

All communication is local — nothing leaves your machine. The Native Host listens on localhost:12315 only.

Setup

Step 1: Build the MCP Server

Step 2: Install the Native Messaging Host

Find your Extension ID at chrome://extensions with Developer Mode enabled. Look for Web2MD and copy the ID string (e.g. ijmgpkkfgpijifldbjafjiapehppcbcn).
After installation, you must fully quit Chrome (Cmd+Q on Mac) and reopen it. Chrome only reads Native Messaging manifests at startup — reloading the extension is not enough.
The install script:
  • Copies host files to ~/.web2md/ (avoids macOS TCC restrictions on ~/Desktop)
  • Resolves the absolute path to node (Chrome launches with minimal PATH)
  • Writes the NM manifest to Chrome’s NativeMessagingHosts directory

Step 3: Configure MCP

Add to ~/.claude/settings.json:

Step 4: Verify

In Chrome, open chrome://extensions → click Web2MD’s “Service Worker” link → check the Console:
If you see these three lines, Agent Bridge is working.

Available Tools

Agent Bridge exposes three MCP tools — pick based on transport and batching needs. All three are documented in full on the MCP Server page; this is the quick comparison.

agent_convert

Convert a single URL using the Chrome extension over native messaging. Returns: Markdown content with title, source URL, word count, and reading time. Best for: Reddit threads, login-protected pages, JS-rendered sites.

agent_batch_convert

Batch convert up to 50 URLs. URLs are processed sequentially — the extension opens each page in a background tab, extracts content, closes the tab, then moves to the next. Returns: Per-URL results streamed as they complete, plus a summary. Best for: Research workflows — batch-convert Reddit threads, HN discussions, or competitor pages for AI analysis.

bridge_convert_url

Convert a single URL by fetching its HTML through the extension over a local HTTP bridge (instead of native messaging), then converting server-side. Functionally similar to agent_convert for one-off conversions, but doesn’t require the native messaging host — only the extension needs to be installed and running.
All successful conversions are automatically saved to your Dashboard History, with AI-generated summaries and tags.

Usage Examples

You: Convert this Reddit thread to Markdown: https://www.reddit.com/r/LangChain/comments/1siwh6q/Agent: (calls agent_convert) Here’s the converted thread with 7 comments discussing RAG precision for legal documents…
You: Batch convert these 5 Reddit URLs and summarize the key takeaways:Agent: (calls agent_batch_convert) Converted 5/5 URLs successfully. Here are the key takeaways…
You: Convert my company’s internal wiki page at https://wiki.internal.com/architectureAgent: (calls agent_convert) Since you’re logged in to this site in Chrome, I was able to extract the full content…

Supported Sites

Agent Bridge uses the same 27 site-specific extractors as the extension — each one knows how to pull clean content out of a site’s DOM or API instead of falling back to raw page HTML.
Reddit · Hacker News · Twitter/X · Quora · Xiaohongshu (小红书) · Zhihu (知乎) · Instagram
Claude conversations · Other AI chat platforms (ChatGPT, Gemini, etc. via a shared DOM extractor)
Wikipedia · arXiv · OpenAI Docs · Mintlify-based docs sites · Notion · Google Docs
GitHub Issues/PRs · Stack Overflow · dev.to
Medium · Substack · Product Hunt
WeChat (微信公众号) · Bilibili (哔哩哔哩) · Feishu (飞书) — plus Xiaohongshu and Zhihu above. The code marks this whole category as its highest-differentiation extractor group — few competitors handle these platforms at all.
YouTube (transcript extraction)
Gmail · LinkedIn · Amazon (product pages) · Canvas LMS · XenForo forums
Any URL without a dedicated extractor falls back to full-page HTML extraction — it still works, just without the site-specific cleanup (removing nav chrome, ads, comment widgets, etc.) that the specialized extractors apply. Sites that expose a public API (Reddit, Hacker News, GitHub, Stack Overflow) are fetched via that API when possible — faster and more reliable than opening a background tab. Everything else opens the page in a background tab and extracts from the rendered DOM.

Troubleshooting

Chrome hasn’t loaded the NM manifest. Fully quit Chrome (Cmd+Q) and reopen. Simply reloading the extension is not enough.
Chrome can’t execute the host script. Common causes:
  • node not found — re-run ./install.sh which uses the absolute node path
  • Host is in a TCC-protected directory (~/Desktop, ~/Documents) — re-run install to move to ~/.web2md/
The Native Host TCP server isn’t running. Make sure:
  1. Chrome is open
  2. The Web2MD extension is loaded
  3. Service Worker console shows “TCP relay ready on port 12315”
The extension is not logged in. Open the Web2MD popup in Chrome and sign in to your PRO account.
The target page takes too long to load. This is normal for slow sites. The extension waits up to 15 seconds per tab. Reddit uses the JSON API extractor and doesn’t need a tab, so timeouts on Reddit usually mean the post URL is invalid (404).
History saving requires the extension to be logged in with a PRO account. The save is fire-and-forget — if the API call fails silently, conversions won’t appear. Check that your auth token is valid.

How It Differs from the MCP Server

Rule of thumb: Use convert_url for public pages. Use bridge_convert_url when you want the extension’s browser session but don’t want to install the native messaging host. Use agent_convert / agent_batch_convert for Reddit, authenticated pages, JS-heavy sites, or when you need to batch — or want a Skill applied via agent_convert’s skill param.