Skip to content
@WebMCP-org

MCP-B

Re-programming the web for AI agents

MCP-B

Model Context Protocol for the Browser

Building a Better Web for Browser Agents


Documentation Discord NPM License


WebsiteDocumentationDiscordExamples



Overview

What is WebMCP?

WebMCP (Web Model Context Protocol) is a proposed W3C web standard being incubated by the Web Machine Learning Community Group. It enables websites to expose AI-callable tools through the browser's navigator.modelContext API, allowing AI agents to discover and interact with web applications directly in the browser.

WebMCP is optimized for browser-based, user-present interactions with built-in web security features, leveraging the browser's origin-based security model and user authentication. Learn more in the W3C WebMCP Explainer.

What is MCP-B?

MCP-B bridges the gap between WebMCP and the Model Context Protocol (MCP), serving two critical functions:

  1. API Implementation — Provides a polyfill that implements the navigator.modelContext interface for browsers lacking native support
  2. Protocol Translation — Converts between WebMCP's web-native format and the MCP protocol, enabling cross-compatibility

MCP-B creates interoperability by enabling WebMCP-formatted tools to function with MCP clients (like Claude Desktop), and MCP-formatted tools to operate within WebMCP-enabled browsers. This allows both standards to evolve independently without breaking existing implementations.

Open Source & Licensing

All MCP-B libraries and SDKs are open source (MIT Licensed), enabling developers to build WebMCP-enabled applications freely. However, the browser extension for connecting to MCP clients is not open source.

For developers interested in contributing to browser extension development, check out the POC MCP-B Extension (AGPL-3.0) by the community.

Key Features

  • Browser-Native MCP — Implements W3C Web Model Context API for standardized AI tool registration
  • Secure by Default — Leverages browser authentication and origin-based security model
  • Zero Backend Required — Expose tools directly from your frontend application
  • Agent-Ready — Works with Claude, ChatGPT, and any MCP-compatible AI client
  • Framework Agnostic — React hooks, vanilla JS, and framework-specific integrations available

Quick Start

# Install the core package
npm install @mcp-b/global

# Or use React hooks
npm install @mcp-b/react-webmcp
// Register a tool that AI agents can discover and call
navigator.modelContext.registerTool({
  name: "get_user_profile",
  description: "Get the current user's profile information",
  inputSchema: {
    type: "object",
    properties: {},
  },
  handler: async () => {
    return { name: "John Doe", email: "john@example.com" };
  }
});

View Full Documentation →

Core Packages

Package Description Links
@mcp-b/global W3C Web Model Context API polyfill npm
@mcp-b/react-webmcp React hooks for WebMCP npm
@mcp-b/transports Browser transport implementations npm
@mcp-b/webmcp-ts-sdk TypeScript SDK for MCP-B npm
@mcp-b/extension-tools Chrome Extension API wrappers npm

Resources

Community

Use Cases

  • Interactive Dashboards — Let AI agents query metrics and visualize data
  • E-commerce Sites — Enable natural language product search and checkout
  • Documentation Sites — AI-powered search and content generation
  • SaaS Applications — Expose app functionality as composable AI tools
  • Admin Panels — Voice and chat-based admin controls

License

MCP-B is open source software licensed under the MIT License.


Built with care by the MCP-B community


WebsiteDocsDiscordNPM


Making the web AI-accessible, one tool at a time.

Popular repositories Loading

  1. npm-packages npm-packages Public

    NPM packages for MCP-B: Transport layers, React hooks, and browser tools for the Model Context Protocol

    TypeScript 10

  2. chrome-devtools-quickstart chrome-devtools-quickstart Public

    Quickstart demo for using Chrome DevTools MCP with WebMCP tools - AI-driven browser automation

    JavaScript 10 3

  3. examples examples Public

    MCP-B Examples - Browser-native Model Context Protocol implementations

    TypeScript 6 3

  4. mcp-ui-webmcp mcp-ui-webmcp Public

    MCP UI WebMCP - Chat UI and MCP Server applications

    TypeScript 6 1

  5. webmcp-sh webmcp-sh Public

    A modern web-based Model Context Protocol (MCP) playground for testing and developing MCP servers and clients

    TypeScript 5 3

  6. mcp-b mcp-b Public

    TypeScript 2

Repositories

Showing 10 of 14 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Most used topics

Loading…