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
| Component | Role |
|---|---|
| AI Agent | Claude Code, Cursor, Cowork — calls MCP tools |
| MCP Server | Translates MCP tool calls to TCP messages |
| Native Host | Relays between TCP and Chrome Native Messaging |
| Chrome Extension | Opens tabs, extracts HTML, converts to Markdown |
localhost:12315 only.
Setup
Step 1: Build the MCP Server
Step 2: Install the Native Messaging Host
- 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
NativeMessagingHostsdirectory
Step 3: Configure MCP
- Claude Code
- Cursor
- Claude Desktop
Add to
~/.claude/settings.json:Step 4: Verify
In Chrome, openchrome://extensions → click Web2MD’s “Service Worker” link → check the Console:
Available Tools
agent_convert
Convert a single URL using the Chrome extension.| Parameter | Type | Description |
|---|---|---|
url | string | The URL to convert |
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.| Parameter | Type | Description |
|---|---|---|
urls | string[] | Array of URLs to convert (max 50) |
All successful conversions are automatically saved to your Dashboard History, with AI-generated summaries and tags.
Usage Examples
Convert a Reddit thread
Convert a Reddit thread
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…Batch convert for research
Batch convert for research
You: Batch convert these 5 Reddit URLs and summarize the key takeaways:
- https://reddit.com/r/MachineLearning/comments/…
- https://reddit.com/r/LocalLLaMA/comments/…
- https://reddit.com/r/LangChain/comments/…
- https://reddit.com/r/artificial/comments/…
- https://reddit.com/r/ChatGPT/comments/…
agent_batch_convert) Converted 5/5 URLs successfully. Here are the key takeaways…Convert login-protected pages
Convert login-protected pages
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 16 site-specific extractors as the extension:| Site | Method | Tab Required? |
|---|---|---|
| JSON API | No | |
| Hacker News | Algolia API | No |
| YouTube | Transcript API | No |
| arXiv | HTML scraping | No |
| Twitter/X | DOM extraction | Yes |
| GitHub Issues/PRs | REST API | No |
| Medium | DOM extraction | Yes |
| Substack | DOM extraction | Yes |
| Wikipedia | DOM extraction | Yes |
| Stack Overflow | SE API | No |
| Any other site | Full page HTML | Yes |
Troubleshooting
'Native host not installed' or 'not found'
'Native host not installed' or 'not found'
Chrome hasn’t loaded the NM manifest. Fully quit Chrome (Cmd+Q) and reopen. Simply reloading the extension is not enough.
'Native host has exited' immediately
'Native host has exited' immediately
Chrome can’t execute the host script. Common causes:
nodenot found — re-run./install.shwhich uses the absolute node path- Host is in a TCC-protected directory (
~/Desktop,~/Documents) — re-run install to move to~/.web2md/
'Agent connection error' from MCP
'Agent connection error' from MCP
The Native Host TCP server isn’t running. Make sure:
- Chrome is open
- The Web2MD extension is loaded
- Service Worker console shows “TCP relay ready on port 12315”
'Failed to extract content from the page'
'Failed to extract content from the page'
The extension is not logged in. Open the Web2MD popup in Chrome and sign in to your PRO account.
'Tab load timeout'
'Tab load timeout'
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).
Conversions not appearing in Dashboard History
Conversions not appearing in Dashboard History
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
| Feature | MCP Server (convert_url) | Agent Bridge (agent_convert) |
|---|---|---|
| Where it runs | Server-side API call | Your local Chrome browser |
| Reddit support | ❌ Blocked by Reddit | ✅ Uses real browser session |
| Login-protected pages | ❌ No access | ✅ Uses your cookies |
| JS-rendered pages | ❌ No JavaScript | ✅ Full Chrome rendering |
| Speed | Faster (no tab overhead) | Slower (opens real tabs) |
| Requires Chrome open | No | Yes |
convert_url for public pages. Use agent_convert / agent_batch_convert for Reddit, authenticated pages, and JS-heavy sites.