<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohammad Farhan Alam</title>
    <description>The latest articles on DEV Community by Mohammad Farhan Alam (@farhanrhine).</description>
    <link>https://dev.to/farhanrhine</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4002099%2Fbcc83845-fb39-4100-bab1-315bac527fc5.png</url>
      <title>DEV Community: Mohammad Farhan Alam</title>
      <link>https://dev.to/farhanrhine</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/farhanrhine"/>
    <language>en</language>
    <item>
      <title>How I turned any website into an MCP server (and what I learned building it)</title>
      <dc:creator>Mohammad Farhan Alam</dc:creator>
      <pubDate>Thu, 25 Jun 2026 10:05:28 +0000</pubDate>
      <link>https://dev.to/farhanrhine/how-i-turned-any-website-into-an-mcp-server-and-what-i-learned-building-it-1jpm</link>
      <guid>https://dev.to/farhanrhine/how-i-turned-any-website-into-an-mcp-server-and-what-i-learned-building-it-1jpm</guid>
      <description>&lt;p&gt;MCP (Model Context Protocol) is becoming the standard for how AI agents &lt;br&gt;
interact with the world. But there's a problem almost nobody is talking about: &lt;br&gt;
99% of websites don't have MCP tools.&lt;/p&gt;

&lt;p&gt;Which means AI agents can't use them.&lt;/p&gt;

&lt;p&gt;I spent the last few months building AgentLayer to fix this. Here's what &lt;br&gt;
I learned.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;If you want Claude or Cursor to interact with a website, you have three options:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Web scraping&lt;/strong&gt; — works until the site changes its HTML. Brittle and &lt;br&gt;
unreliable at scale.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Build a custom API&lt;/strong&gt; — months of work, requires access to the codebase. &lt;br&gt;
Not an option for third-party sites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Write MCP tools by hand&lt;/strong&gt; — slow, requires understanding every endpoint, &lt;br&gt;
breaks when the site updates.&lt;/p&gt;

&lt;p&gt;None of these are good enough.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Approach
&lt;/h2&gt;

&lt;p&gt;AgentLayer automates the entire pipeline:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Crawl&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We crawl the target URL using Playwright. We follow internal links, capture &lt;br&gt;
page structure, identify navigation patterns.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Analyze&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We run the crawled content through an LLM to identify what actions and &lt;br&gt;
data queries make sense for this site. What can a user do here? What &lt;br&gt;
information is available?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Generate&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
We generate MCP tool definitions — proper JSON schemas with input parameters, &lt;br&gt;
descriptions, and expected outputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Validate (the hard part)&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
This is where most tools fail. Generated tool definitions can look correct &lt;br&gt;
but not actually work. We execute every tool in an E2B sandbox before &lt;br&gt;
serving it. If it fails, we regenerate. You only ever get tools that &lt;br&gt;
have been proven to work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Serve&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
A live MCP endpoint is ready. Copy it into your Claude Desktop config &lt;br&gt;
or Cursor settings. Done.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Actually Works
&lt;/h2&gt;

&lt;p&gt;After testing on hundreds of sites, here's what I've found:&lt;/p&gt;

&lt;p&gt;✅ Documentation sites (ReadTheDocs, GitBook, custom docs)&lt;br&gt;&lt;br&gt;
✅ Portfolio sites and blogs&lt;br&gt;&lt;br&gt;
✅ Content-heavy sites with clear navigation&lt;br&gt;&lt;br&gt;
✅ Open source project sites  &lt;/p&gt;

&lt;p&gt;⚠️ Heavy JavaScript SPAs (partial support)&lt;br&gt;&lt;br&gt;
❌ Sites requiring authentication&lt;br&gt;&lt;br&gt;
❌ Real-time data (prices, live feeds)  &lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;Live: &lt;a href="https://agentlayer-zwfy.onrender.com" rel="noopener noreferrer"&gt;https://agentlayer-zwfy.onrender.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;
Demo: &lt;a href="https://www.loom.com/share/fdc9f0ac50fe47479ee94fe9544f84c9" rel="noopener noreferrer"&gt;https://www.loom.com/share/fdc9f0ac50fe47479ee94fe9544f84c9&lt;/a&gt;&lt;br&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/farhanrhine/AgentLayer" rel="noopener noreferrer"&gt;https://github.com/farhanrhine/AgentLayer&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Free right now. I'm actively fixing bugs — if something breaks on &lt;br&gt;
your site, open an issue or DM me &lt;a class="mentioned-user" href="https://dev.to/farhanrhine"&gt;@farhanrhine&lt;/a&gt; on Twitter.&lt;/p&gt;




&lt;p&gt;What would make this more useful for your workflow? I'm building this &lt;br&gt;
in public and feedback directly shapes what gets built next.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>mcp</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
