Web Model Context Protocol · Chrome Extension

Control Any WebMCP-Enabled Website with Natural Language

webmcp bridges Chrome's WebMCP standard (navigator.modelContext, document.modelContext, and declarative <form toolname>) directly to your own Gemini, Claude, or OpenAI API key.

Powered by Vercel AI SDK & BYOK: ✨ Google Gemini 🧠 Anthropic Claude ⚡ OpenAI
webmcp icon webmcp Gemini · gemini-2.5-flash
4 WebMCP tools active on this page Inspector ↗
Add a todo item to "Ship WebMCP v1.0" and create a high priority support ticket for billing.
⚡ WebMCP Tool: addTodo Completed ✓
Input: {"text": "Ship WebMCP v1.0"} → Output: {"totalTodos": 3}
⚡ WebMCP Tool: createSupportTicket Completed ✓
Input: {"subject": "Billing issue", "priority": "high"} → Submitted
Done! I added "Ship WebMCP v1.0" to your todo list and submitted a high-priority support ticket.
Worked for 1.4s · done 10:36 AM in 412 · out 68 · Copy Debug
getTodos modelContext
Get the current list of todo items on the page
addTodo modelContext
Add a new todo item · { text: string }
setPageTheme modelContext
Switch page theme or accent color · { theme: string }
createSupportTicket declarative <form>
Submit customer support ticket · { subject, priority }
🔑 Bring Your Own API Key chrome.storage.local

Connect directly to Google Gemini, Anthropic Claude, or OpenAI. Models are fetched live from the provider's official API.

Providers: Gemini (aistudio) | Claude (anthropic) | OpenAI
Languages: EN · 中文 · 日本語 · 한국어 · ES · FR · DE
🛡️ Zero Middleman Servers 100% Client-Side
Your API keys never leave your browser except to authenticate direct HTTPS calls to your chosen AI provider.
Ask webmcp to control this webpage... (↑/↓ for history)
Send

Built for the Web Model Context Protocol

Everything you need to discover, test, and orchestrate structured AI tools exposed by modern web applications.

⚡

Imperative & Declarative WebMCP

Supports imperative navigator.modelContext.registerTool, document.modelContext.getTools() / executeTool(), and declarative HTML forms with <form toolname="..." tooldescription="..." toolautosubmit>.

🔑

Bring Your Own Key (BYOK)

Powered by the open-source Vercel AI SDK (@ai-sdk/google, @ai-sdk/anthropic, @ai-sdk/openai). Dynamically fetches available models and preserves Gemini 2.5/3 thoughtSignature across multi-step tool calls.

🔒

100% Local & Privacy-First

No backend server, no account signup, and zero telemetry. API keys, model selections, and your 100-item prompt history are stored exclusively in chrome.storage.local.

🔍

Live Tool Inspector & Auto-Sync

A MAIN-world MutationObserver and tab listener automatically detect newly rendered tools or SPA route changes and update the Side Panel status bar in real time.

🛠️

Agent-Friendly Debug Telemetry

Inspect JSON input/output payloads, execution duration, and token/cache metrics for every tool step. Copy structured run logs in one click for coding agents.

🌍

8 Languages & Adaptive Themes

Localized UI in English, 中文, 日本語, 한국어, Español, Français, and Deutsch with System, Light, and Dark modes plus ↑ / ↓ prompt history recall.

Live WebMCP Playground on This Page

This official website registers real WebMCP tools! Open the webmcp Chrome Extension on this page—or click any prompt chip below to simulate tool execution immediately.

⚡ Active Page Tools Registered on window:
Imperative: getTodos, addTodo, toggleTodo, setPageTheme · Declarative Form: createSupportTicket
Open Standalone Playground ↗

📋 Task Board Imperative WebMCP

Controlled via navigator.modelContext.registerTool (getTodos, addTodo, toggleTodo)

    🎫 Support Ticket Declarative WebMCP Form

    Auto-discovered from <form toolname="createSupportTicket" toolautosubmit>
    [WebMCP Runtime] Registered 4 imperative tools (getTodos, addTodo, toggleTodo, setPageTheme) + 1 declarative form tool (createSupportTicket). Ready!

    How webmcp Works Under the Hood

    Seamless execution across Chrome's execution worlds, plus zero-friction adoption for web developers.

    1

    MAIN World Page Bridge

    page-bridge.js runs at document_start in the page's MAIN world, querying document.modelContext.getTools() and scanning DOM forms with toolname attributes without clobbering native prototypes.

    2

    Isolated Content Relay

    content.js bridges messages between the page's MAIN execution world and the extension runtime, pushing real-time WEBMCP_TOOLS_CHANGED notifications on DOM mutations.

    3

    Side Panel AI Tool Loop

    sidepanel.js converts discovered JSON schemas into Vercel AI SDK tools, runs multi-step tool calls directly against Gemini, Claude, or OpenAI, and renders live step telemetry.

    1. Imperative WebMCP API (JavaScript) navigator.modelContext
    navigator.modelContext.registerTool({
      name: 'addTodo',
      description: 'Add a new todo item to the page list',
      inputSchema: {
        type: 'object',
        properties: {
          text: {
            type: 'string',
            description: 'The task description to add'
          }
        },
        required: ['text']
      },
      execute: async ({ text }) => {
        const item = addTaskToState(text);
        return { status: 'added', item };
      }
    });
    2. Declarative WebMCP API (HTML Form) <form toolname="...">
    <form
      toolname="createSupportTicket"
      tooldescription="Submit a support ticket with subject and priority"
      toolautosubmit
    >
      <input
        type="text"
        name="subject"
        required
        toolparamdescription="Short summary of the support issue"
      />
      <select
        name="priority"
        toolparamdescription="Urgency: low, medium, or high"
      >
        <option value="low">Low</option>
        <option value="high">High</option>
      </select>
      <button type="submit">Submit</button>
    </form>

    Build & Load in Google Chrome

    Get up and running in less than a minute from source or an unpacked release bundle.

    Step 1 · Clone & Build Bundle Terminal
    git clone https://github.com/AJLoveChina/webmcp-extension.git
    cd webmcp-extension
    
    # Install dependencies & bundle with esbuild into dist/
    npm install
    npm run build

    Step 2 · Load Unpacked in Chrome

    1. Open Google Chrome and navigate to chrome://extensions/.
    2. Enable Developer mode using the top-right toggle.
    3. Click Load unpacked and select the generated dist/ folder.
    4. Pin webmcp in your toolbar, open the Side Panel, paste your Gemini / Claude / OpenAI API key, and try the playground above!

    Single Purpose & Permission Transparency

    Every Chrome permission requested by webmcp serves a single, clearly scoped purpose.

    Single Purpose Statement

    Discover, inspect, and execute WebMCP (Web Model Context Protocol) tools exposed by the active webpage using natural language prompts powered by the user's own Gemini, Claude, or OpenAI API key.

    storage

    Locally stores your chosen AI provider, model ID, theme/language settings, API keys, and recent prompt history in chrome.storage.local without any external server.

    activeTab & scripting

    Discovers and invokes WebMCP tools registered on the active webpage via navigator.modelContext / document.modelContext and declarative <form toolname> elements.

    sidePanel

    Displays the persistent conversational WebMCP controller and Tool Inspector inside Chrome's native Side Panel alongside the webpage.

    tabs & <all_urls>

    Automatically refreshes available WebMCP tools when switching tabs or navigating across any WebMCP-enabled domain, and connects directly to official Gemini, Claude, and OpenAI API endpoints.