<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chetan Gaur on Medium]]></title>
        <description><![CDATA[Stories by Chetan Gaur on Medium]]></description>
        <link>https://medium.com/@chetangaur2004?source=rss-0911014e8da0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*zj7gyZA8Q1sLeN3hQ77R6A.jpeg</url>
            <title>Stories by Chetan Gaur on Medium</title>
            <link>https://medium.com/@chetangaur2004?source=rss-0911014e8da0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:16:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chetangaur2004/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Agentic Web Dilemma: MCP vs. WebMCP (And Where Each Actually Fits)]]></title>
            <link>https://medium.com/@chetangaur2004/the-agentic-web-dilemma-mcp-vs-webmcp-and-where-each-actually-fits-0812458ceeb8?source=rss-0911014e8da0------2</link>
            <guid isPermaLink="false">https://medium.com/p/0812458ceeb8</guid>
            <category><![CDATA[mcps]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[web-mcp]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <dc:creator><![CDATA[Chetan Gaur]]></dc:creator>
            <pubDate>Fri, 18 Sep 2026 09:42:23 GMT</pubDate>
            <atom:updated>2026-09-30T18:39:40.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xY97bevC77E4Iz3i_bHGAA.png" /></figure><p><em>Server-side tools or browser-side tools? After building both, here’s the framework I actually use.</em></p><p>If you’ve built anything with AI agents over the past year, you’ve probably hit the same wall I did.</p><p>You want an AI to do something useful on a website manage RFX documents, search through project dashboards, trigger an export. But your options have been frustrating: either spin up heavyweight headless browsers on expensive backend servers, or throw raw HTML and screenshots at an LLM and hope it figures out where the buttons are before a CSS class update breaks everything.</p><p>When Anthropic released MCP (Model Context Protocol), it solved a real problem for backend work. Finally, a clean way to let an LLM query a database or trigger a script without custom glue code for every integration. But for anything happening on the client side inside a live web application where a user is logged in and actively working a gap remained.</p><p>That’s why the recent experiments around WebMCP are so interesting to me. Not because they replace MCP, but because they fill a hole that server-side MCP was never designed to cover.</p><p>I recently worked on both sides of this divide building <a href="https://github.com/imchetangaur/mcp-agent-studio">MCP Agent Studio</a> with traditional server-side MCP servers, and integrating WebMCP into an internal RFX management application. The experience gave me a clear picture of where each approach shines and where it falls apart.</p><h3>The Core Difference: Server Room vs. Browser Tab</h3><p>It’s easy to get standard-fatigue every time a new acronym shows up, but these two aren’t competing. They live in entirely different places.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3IPt3heRKgKt4XjvtVwAJA.png" /></figure><p><strong>Server-Side MCP</strong> is a pipeline between your LLM and your private infrastructure. The agent talks to a dedicated MCP server process over stdio or HTTP and that server handles database queries, API calls, file operations. The user’s browser isn’t involved at all.</p><p><strong>WebMCP</strong> flips the model. Instead of a separate server, the webpage itself registers tools directly in the browser runtime. The AI agent calls those tools, and they execute as JavaScript functions inside the user’s active tab with full access to the authenticated session, the DOM, and the application’s own API layer.</p><h3>What WebMCP Actually Looks Like in Practice</h3><p>Let me make this concrete. In our RFX management application, we needed an AI assistant to help users search through proposals, review generated sections, approve documents, and trigger exports.</p><p>The traditional approach would mean building a standalone MCP server that somehow authenticates against our Keycloak SSO, replicates the session context, and proxies every API call through a separate backend process. That’s a lot of infrastructure just to let an AI click buttons the user could click themselves.</p><p>With WebMCP, the application itself registers the tools. Here’s the pattern:</p><pre>// Inside the React app runs in the browser<br>const mcp = new window.WebMCP({<br>  color: &#39;#ee0000&#39;,<br>  position: &#39;bottom-right&#39;,<br>});<br><br>// Register a tool that the AI can call<br>mcp.registerTool(<br>  &#39;search_rfxs&#39;,<br>  &#39;Search and filter RFX projects by name, client, or status&#39;,<br>  {<br>    type: &#39;object&#39;,<br>    properties: {<br>      name: { type: &#39;string&#39; },<br>      client_name: { type: &#39;string&#39; },<br>      status: { type: &#39;string&#39;, enum: [&#39;in_review&#39;, &#39;approved&#39;, &#39;submitted&#39;] },<br>    },<br>  },<br>  async (params) =&gt; {<br>    // This runs IN the browser, with the user&#39;s auth token<br>    const data = await apiGet(&#39;/rfxs&#39;, {<br>      name: params.name,<br>      client_name: params.client_name,<br>      status: params.status,<br>    });<br>    return {<br>      total: data.total_items,<br>      items: data.items.map(r =&gt; ({<br>        id: r.id,<br>        name: r.name,<br>        client: r.client_name,<br>        status: r.status?.code,<br>      })),<br>    };<br>  }<br>);</pre><p>No separate server process. No credential sharing. No infrastructure to maintain. The tool handler is a JavaScript function that makes the same API calls the application’s own UI components make using the same authenticated session the user already has.</p><p>We registered eight tools this way: searching RFXs, creating new ones, checking status, reviewing individual sections, approving documents, and triggering exports. Every one of them runs inside the browser, using the user’s existing Keycloak token.</p><h3>Why This Shift Changes Things</h3><h4>Goodbye, Fragile Scrapers</h4><p>Before WebMCP, if an AI agent wanted to interact with a web application, it had two options: call backend APIs directly (which requires sharing credentials) or scrape the UI (which breaks every time someone changes a CSS class).</p><p>When a webpage exposes explicit tool definitions with typed parameters and clear descriptions UI redesigns don’t break the integration. You don’t care if a button moved three pixels to the left or changed from red to blue. The underlying action remains a simple, predictable function call.</p><h4>The Authentication Problem Disappears</h4><p>This is the one that convinced me. Authentication is always the nightmare with external agents.</p><p>With server-side MCP, you need to somehow get the agent access to the user’s session. That means either sharing passwords (terrible), issuing service account tokens (complicated), or building an OAuth dance between the agent and your auth provider (a project in itself).</p><p>With WebMCP, the tool handler runs inside the browser. It inherits the user’s existing, authenticated session the same cookies, the same Keycloak token, the same role-based permissions. The AI acts <em>with</em> the user, not <em>as</em> a headless bot on a remote server.</p><p>In our RFX app, the API client automatically injects the Bearer token from the user’s Keycloak session into every request. The WebMCP tools use the exact same API client. Zero additional auth configuration.</p><h4>Resource Costs Drop Dramatically</h4><p>Running headless browsers (Playwright, Puppeteer, Selenium) on backend infrastructure is expensive. Each agent interaction requires spinning up a full browser instance, rendering pages, capturing screenshots or DOM trees, and feeding thousands of tokens to the LLM just to figure out where things are on screen.</p><p>WebMCP sidesteps all of that. The browser is already running the user opened it. The page is already rendered the user is looking at it. Tool execution happens locally in that existing context. There are no server-side browser instances to provision, no screenshots to process, no massive HTML dumps to tokenize.</p><p>Instead of feeding an LLM 50KB of raw HTML, you expose a clean function signature: searchRfxs({ name, status }). The model issues a direct function call. The token cost drops from thousands to dozens.</p><h3>Where Server-Side MCP Still Wins</h3><p>WebMCP isn’t a replacement. There are clear cases where you still need a traditional MCP server, and pretending otherwise would be dishonest.</p><p><strong>Background and scheduled tasks.</strong> If an agent needs to run a nightly data sync, process emails while the user is asleep, or trigger a CI pipeline on a schedulethere’s no browser tab open. Server-side MCP is the only option.</p><p><strong>Direct infrastructure access.</strong> Querying a private PostgreSQL database, reading files from a secure filesystem, calling internal microservices behind a VPN these require backend access that a browser simply doesn’t have.</p><p><strong>Multi-system orchestration.</strong> When an agent needs to pull data from Slack, process it in Python, cross-reference against a Jira board, and post a summary to Notion that’s a server-side workflow. No single browser tab spans all those systems.</p><p><strong>Sensitive operations.</strong> Some actions shouldn’t depend on a browser tab staying open. Database migrations, payment processing, infrastructure provisioning these need the reliability and audit trail of a server-side process.</p><p>In MCP Agent Studio, we use server-side MCP servers for exactly these cases. Our weather server fetches live data from an external API. Our product catalog server queries a backend data store. These run as standalone processes because they have to.</p><h3>The Decision Framework</h3><p>When designing an agent-enabled system, the dividing line comes down to two questions: <em>Does a user need to be present?</em> and <em>Where does the state live?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RyCQiyjCxh59aV11ToUcTw.png" /></figure><h3>What the Hybrid Looks Like</h3><p>The most practical architectures will use both. Here’s how I think about it for our RFX system:</p><p><strong>Server-Side MCP</strong> handles the heavy lifting that happens behind the scenes the AI generation pipeline that produces RFX content, the document export job that converts approved sections to DOCX, the background processing that runs regardless of whether anyone has the app open.</p><p><strong>WebMCP</strong> handles everything the user does in the browser searching through proposals, reviewing generated sections, approving content, providing feedback. These are actions that only make sense when a user is actively working in the application.</p><p>The two layers don’t conflict. They complement each other. The server-side MCP does work the browser can’t see; the browser-side WebMCP does work that would be painful to replicate on the server.</p><h3>What This Means for Developers</h3><p>If you’re building a web application and wondering whether to add AI agent support, WebMCP gives you a path that doesn’t require standing up new infrastructure.</p><p>You already have an authenticated API layer. You already have a running browser session. You already have typed function signatures in your application code. WebMCP lets you expose those directly to AI agents without duplicating your backend, sharing credentials, or maintaining headless browser farms.</p><p>That said, WebMCP is still early. The browser API proposals are experimental, and the ecosystem is figuring out standards. Server-side MCP is production-ready, backed by the Linux Foundation, and supported across Claude, VS Code, and dozens of other hosts.</p><p>My recommendation: use server-side MCP for your infrastructure backbone. Use WebMCP for your user-facing web applications. Let the backend handle deep data and headless work. Let the browser handle live, interactive, session-aware actions.</p><p>The future isn’t one or the other. It’s both each doing what it’s actually good at.</p><h3>Resources</h3><p>If you want to dig deeper into WebMCP, here’s where to start:</p><h3>WebMCP</h3><ul><li><a href="https://github.com/webmachinelearning/webmcp">W3C WebMCP Specification</a> The official spec repo with explainer, issues, and changelog. The canonical source maintained by the W3C Web Machine Learning Community Group.</li><li><a href="https://developer.chrome.com/docs/ai/webmcp">Chrome WebMCP Documentation</a> Google’s official developer guide. Covers the origin trial (Chrome 149), the navigator.modelContext API, and getting started.</li><li><a href="https://github.com/WebMCP-org/npm-packages">WebMCP npm Packages</a> The MCP-B ecosystem: polyfills (@mcp-b/webmcp-polyfill), React hooks (@mcp-b/react-webmcp), TypeScript types, and transport layers.</li><li><a href="https://github.com/WebMCP-org/examples">WebMCP Examples</a> Browser-native MCP implementation examples from the WebMCP-org community.</li><li><a href="https://webmcp.com/resources">WebMCP Resources Hub</a> Curated reading list for the agentic web: specs, docs, tools, and community talks.</li></ul><h3>Projects Referenced in This Post</h3><ul><li><a href="https://github.com/imchetangaur/mcp-agent-studio">MCP Agent Studio</a> — Full-stack orchestrator demonstrating server-side MCP servers, MCP Apps with Remote DOM, and A2A agent orchestration.</li></ul><p>#MCP #WebMCP #AI #Agents #WebDevelopment $AgenticAI #DeveloperTools</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0812458ceeb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>