The Model Context Protocol (MCP) ecosystem just received a massive validation. This week, Google teased WebMCP, signaling that the browser is officially the next frontier for AI-integrated applications.
For developers building with AI agents like Claude or Cursor, this is an "I told you so" moment. The browser runtime has always been the missing link—the "black box" that AI agents could read about in static code but never actually see or touch in live action.
But here is the reality check: Standards take time. Native browser implementation across vendors takes even longer. Your AI agent needs to understand why your state is drifting or execute a specific UI action right now.
MCP-FE (Model Context Protocol - Frontend Edge) is the bridge. It isn't a competitor to WebMCP; it is a developer-first framework that makes Frontend MCP usable today, with a sophisticated architecture designed to survive the transition to future standards.
The Problem: Runtime Blindness
AI agents are brilliant at static analysis, but they are runtime-blind. They can see your source code, but they cannot see the current value of a complex state, the exact DOM structure after dynamic manipulations, or the sequence of events that led to a bug.
Traditional observability tools solve this by pushing massive amounts of data to a server. MCP-FE flips the script with a Pull Model: context is retrieved only when the agent asks for it.
The Power of React Hooks: Lifecycle-Aware Context
While WebMCP will eventually provide the protocol "pipes," MCP-FE provides the Developer Experience (DX). This is where we shine: integration directly into the React component tree.
In a modern SPA, the application state is highly dynamic. A tool that inspects a "Shopping Cart" should only exist when the user is actually on the checkout page. With our @mcp-fe/react-tools package, we’ve made AI tool registration as natural as using useState.
// Empowering an AI agent to query local state in one hook
useMCPTool(
'get_cart_status',
'Returns current items in the user shopping cart',
{ type: 'object', properties: {} },
async () => ({
content: [{ type: 'text', text: JSON.stringify(cartItems) }],
})
);
By using the useMCPTool hook, you gain several critical advantages:
- Auto-Registration: The tool is exposed to the AI agent automatically when the component mounts.
- Automatic Cleanup: When the component unmounts, the tool is deregistered. The AI agent's "toolbox" stays clean and relevant to the current UI state.
- Direct State Access: Because the hook lives inside your component, it has direct access to local state, props, refs, and context providers without any complex event-bus logic.
This means your AI's capabilities scale and shift perfectly in sync with your user's journey.
From Seeing to Doing: Giving AI the Controls
One of the most powerful features of MCP-FE is that it doesn't just let an AI observe—it lets the AI act.
By exposing specific application instances to your tool handlers, you can grant an AI agent safe, structured control over your application. Imagine an agent that doesn't just "suggest" a fix, but can actually:
- Execute Programmatic Navigation: Pass your router instance (React Router, Next.js, etc.) to a tool, allowing the agent to navigate the user to specific pages ("Go to the billing settings and show me the invoice history").
- Handle Complex Forms: Instead of the agent guessing where to click, you can provide a tool that accepts a JSON schema to programmatically fill, validate, and submit complex multi-step forms.
- Trigger Internal Logic: Execute any internal function—from clearing a local cache to triggering specific side effects or toast notifications.
This Actionability turns your frontend into a collaborative workspace where the AI can help the user complete tasks in real-time.
The MCP-FE Architecture: A Three-Layer Powerhouse
To solve these problems without sacrificing performance, MCP-FE splits responsibilities across three distinct layers:
- The Gateway: Node.js Proxy: Acts as a secure bridge between the remote AI agent and the user's browser. It handles authentication and translates MCP requests into WebSocket messages.
- The Brain: The Worker-Based Edge (SharedWorker / ServiceWorker): This is the "active node" running in the background. It routes tool calls to the correct tab, manages event history in IndexedDB, and keeps the connection alive without slowing down the UI thread.
- The Context & Actions: The Main Thread (Your App): This is where your React/Vue/JS code lives. Using our React-First DX, you register tools using hooks. These tools have direct access to your live DOM, state, and internal logic.
WebMCP vs. MCP-FE: Protocol vs. Orchestrator
A common question arises: "If Google is building WebMCP into the browser, why do I need MCP-FE?"
The answer lies in the difference between a low-level protocol and a high-level framework. WebMCP is a transport standard—it's the "pipes." MCP-FE is the orchestrator.
- Lifecycle Management: WebMCP doesn't know about your React component's lifecycle. MCP-FE automatically registers and de-registers tools as components mount and unmount.
- Remote Connectivity: WebMCP is ideal for agents running inside the browser (like a sidebar). For remote agents (like Cursor or Claude.ai), you still need a secure bridge to "tunnel" into the browser.
- The Adapter Strategy: When WebMCP becomes a stable standard, MCP-FE will simply act as an adapter. You keep using our high-level React hooks, and we will automatically route the data through the most efficient path—whether it's our current WebSocket bridge or the native WebMCP API.
You get the stability of a future standard with the features of a modern framework today.
Conclusion: Give Your AI Eyes and Hands Today
The era of "Agent-Native" applications is here. You can wait for browser vendors to agree on a standard, or you can give your AI agents the context and control they need today.
MCP-FE provides the proxy, the worker, and the hooks you need to turn your application into an active, queryable, and controllable node in the MCP ecosystem.
- Official Website: mcp-fe.ai
- GitHub Repository: mcp-fe/mcp-fe
- Status: Experimental PoC (Contributions welcome!)
Let's stop guessing why the UI broke and start letting the AI fix it.
Author: Michal Kopecký
Frontend Engineer & Creator of MCP-FE

Top comments (0)