$git clone https://github.com/MiguelsPizza/WebMCP> [!IMPORTANT] > π¨ The WebMCP API has been accepted as a W3C deliverable and is transitioning to official web standard development. The community and all related work has moved to the WebMCP explainer repository. Please join us the
| 1 | > [!IMPORTANT] |
| 2 | > π¨ The WebMCP API has been accepted as a W3C deliverable and is transitioning to official web standard development. The community and all related work has moved to the [WebMCP explainer repository](https://github.com/webmachinelearning/webmcp). Please join us there! π¨ |
| 3 | Β |
| 4 | > [!IMPORTANT] |
| 5 | > π Repository Status: The MCP-B extension is no longer open source. This repository represents an older version of the codebase and is maintained for historical reference only. All open source content (transports, etc.) have been ported to the [WebMCP Github Org](https://github.com/WebMCP-org). |
| 6 | Β |
| 7 | Β |
| 8 | Β |
| 9 | # WebMCP: |
| 10 | Β |
| 11 | [](https://chromewebstore.google.com/detail/mcp-b/daohopfhkdelnpemnhlekblhnikhdhfa) |
| 12 | [](https://www.npmjs.com/package/@mcp-b/transports) |
| 13 | [](https://www.gnu.org/licenses/agpl-3.0) |
| 14 | [](https://github.com/MiguelsPizza/WebMCP/actions) |
| 15 | [](https://github.com/MiguelsPizza/WebMCP/stargazers) |
| 16 | Β |
| 17 | [π Quick Start](#quick-start) β’ [β¨ Live Demo](#live-demo) β’ [π Documentation](https://mcp-b.ai) β’ [π€ Contributing](#contributing) |
| 18 | Β |
| 19 | ## Join Our Community |
| 20 | Β |
| 21 | [](https://discord.gg/a9fBR6Bw) |
| 22 | Β |
| 23 | Β |
| 24 | Β |
| 25 |  |
| 26 | Β |
| 27 | ## The protocol |
| 28 | Β |
| 29 | WebMCP is the underlying protocol which MCP-B implements. It is a protocol which exposes function in your browser javascript to LLM's as MCP tools. |
| 30 | Β |
| 31 | For a more indepth understanding, refer here: https://mcp-b.ai/blogs |
| 32 | Β |
| 33 | ## Live Demo |
| 34 | Β |
| 35 | See MCP-B in action right away: |
| 36 | Β |
| 37 | ### Examples |
| 38 | Β |
| 39 | Check out our examples repository: **[MCP-B Examples](https://github.com/WebMCP-org/examples)** |
| 40 | Β |
| 41 | The examples repository contains: |
| 42 | - **Vanilla TypeScript Demo**: A simple todo app where MCP tools allow AI to manage tasks |
| 43 | - **React Demo**: Modern React application with MCP-B integration |
| 44 | - **Script Tag Demo**: The simplest integration - add MCP-B to any website using just a script tag |
| 45 | Β |
| 46 | ### Community Examples |
| 47 | Β |
| 48 | - **[Vue ](https://github.com/bestian/vue-MCP-B-demo)** example By [Besian](https://github.com/bestian) |
| 49 | - **[Nuxt 3](https://github.com/mikechao/nuxt3-mcp-b-demo)** example by [Mike Chao](https://github.com/mikechao/) |
| 50 | Β |
| 51 | These demos highlight how MCP-B integrates into websites without needing complex setups. Install the [MCP-B Chrome Extension](https://chromewebstore.google.com/detail/mcp-b/daohopfhkdelnpemnhlekblhnikhdhfa?authuser=0&hl=en) to interact with the tools via the extension's chat interface or tool inspector. |
| 52 | Β |
| 53 | ## What is MCP-B? |
| 54 | Β |
| 55 | MCP-B extends the Model Context Protocol (MCP) with browser-specific transports, allowing your website to act as an MCP server. Websites expose existing functionality (e.g., APIs, forms, or state) as structured tools that AI agents can call directly. |
| 56 | Β |
| 57 | Key components: |
| 58 | Β |
| 59 | - **Tab Transports**: Use `postMessage` for communication between your website's MCP server and clients in the same tab. |
| 60 | - **Extension Transports**: Use Chrome's runtime messaging for communication with browser extensions. |
| 61 | Β |
| 62 | This setup enables AI to interact with your site deterministically, respecting user authentication (e.g., session cookies) and scoping tools to specific pages or user states. |
| 63 | Β |
| 64 | ## Quick Start |
| 65 | Β |
| 66 | Get MCP-B running on your website in minutes. This guide focuses on adding an MCP server to expose tools, using the examples as a blueprint. |
| 67 | Β |
| 68 | ### Prerequisites |
| 69 | Β |
| 70 | - **Node.js 22.12+** (check with `node --version`) |
| 71 | - **pnpm 10+** (install via `npm install -g pnpm`) |
| 72 | - A website with JavaScript (vanilla, React, |