Readit News logoReadit News
ami3466 commented on Show HN: tomcp.org – Turn any URL into an MCP server   github.com/Ami3466/tomcp... · Posted by u/ami3466
mbreese · 3 months ago
I think this is a good idea in general, but perhaps a bit too simple. It looks like this only works for static sites, right? It then performs a JS fetch to pull in the html code and then converts it (in a quick and dirty manner) to markdown.

I know this is pointing to the GH repo, but I’d love to know more about why the author chose to build it this way. I suspect it keeps costs low/free. But why CF workers? How much processing can you get done for free here?

I’m not sure how you could do much more in a CF worker, but this might be too simple to be useful on many sites.

Example: I had to pull in a docs site that was built for a project I’m working on. We wanted an LLM to be able to use the docs in their responses. However, the site was based on VitePress. I didn’t have access to the source markdown files, so I wrote an MCP fetcher that uses a dockerized headless chrome instance to load the page. I then pull the innerHTML directly from the processed DOM. It’s probably overkill, but an example of when this tool might not work.

But — if you have a static site, this tool could be a very simple way to configure MCP access. It’s a nice idea!

ami3466 · 3 months ago
The simplicity is a feature. I avoided headless Chrome because standard fetch tools (and raw DOM dumps) pollute the context with navbars and scripts, wasting tokens. This parser converts to clean Markdown for maximum density.

Also, by treating this as an MCP Resource rather than a Tool, the docs are pinned permanently instead of relying on the model to "decide" to fetch them.

Cloudflare Workers handle this perfectly for free (100k reqs/day) without the overhead of managing a dockerized browser instance.

ami3466 commented on Show HN: tomcp.org – Turn any URL into an MCP server   github.com/Ami3466/tomcp... · Posted by u/ami3466
bsima · 3 months ago
Who is tom and why is he copying?
ami3466 · 3 months ago
lol I got this domain at 2am and didn't think through.
ami3466 commented on Show HN: tomcp.org – Turn any URL into an MCP server   github.com/Ami3466/tomcp... · Posted by u/ami3466
eevmanu · 3 months ago
I’m a bit confused because I don’t clearly understand the value this tool adds. Could you help me understand it?

From what I can see, if the content I want to enrich is static, the web fetch tool seems sufficient. Is this tool capable of extracting information from dynamic websites or sites behind login walls, or is it essentially the same as a web fetch tool that only works with static pages?

ami3466 · 3 months ago
I see many of you asking about the differences between using this versus web_fetch. The main differences are the quality of the data and token usage.

1. Standard web_fetch tools usually dump raw HTML into the context (including navbars, scripts, and footer noise). This wastes a huge amount of tokens and distracts the model. toMCP runs the page through a readability parser and converts it to clean markdown before sending it to the AI.

2. Adding a website as an MCP Resource pins it as a permanent, read-only context, making it ideal for keeping documentation constantly available. This differs from the web_fetch tool, which is an on-demand action the AI only triggers when it decides to, meaning the data isn't permanently attached to your project.

u/ami3466

KarmaCake day11November 13, 2022View Original