Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

React Webmcp

MCP server by WebMCP-org Verified · npm:@mcp-b

React Webmcp provides React hooks that register components as tools for AI agents on web pages. It is for React developers who want their site's features callable through the Model Context Protocol and browser tool APIs.

  • Score 91
  • 111 stars
  • 18k a week
  • MIT
  • Updated

Install React Webmcp

Built from the published package, never by AI.

claude mcp add react-webmcp -- npx -y @mcp-b/react-webmcp

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install React Webmcp in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the react-webmcp block.

About

React Webmcp is the React package in the MCP-B project, published as @mcp-b/react-webmcp. MCP-B bridges the Web Model Context API (document.modelContext) to the Model Context Protocol, so a web page can register tools that AI agents discover and call. The React hooks let a component register a tool with a name, description, input schema and execute function. The hook is used inside components, for example useWebMCP, and the tool is registered while the component is mounted.

The package is aimed at developers building React sites who want AI agents to use page features. It works with @mcp-b/global, which provides the full MCP server runtime with prompts, resources and transports. The source says it can connect to clients such as Claude Desktop and Cursor through a local relay, and it also lists a separate usewebmcp package for JSON Schema only use. The project states it is not an official W3C or MCP project.

Written from the project's README and checked against it.

What you need

  • A React project
  • pnpm or another package manager to install the packages
  • @mcp-b/global for the full MCP runtime
  • Chrome 155 or later for native WebMCP support, or the official polyfill in other browsers

Try asking

  • Use the add_todo tool to add 'buy milk' to my todo list
  • Call the get_page_title tool and tell me the current page title
  • Which tools does this page expose to AI agents right now?

Good to know

  • The Web Model Context API is a W3C Community Group draft spec.
  • The official polyfill covers only the imperative API, so declarative tools need @mcp-b/global or @mcp-b/webmcp-polyfill.
  • Native Chrome support depends on the origin trial or the local testing flag.
  • The project is not an official W3C or MCP project.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

What you can do with it

  • Expose React component actions as AI tools
  • Let AI agents call features on a React website
  • Connect web page tools to Claude Desktop or Cursor

Alternatives to React Webmcp

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

React Webmcp: common questions

Does React Webmcp work in Firefox or Safari?

The source says the official W3C polyfill can add WebMCP support in browsers without native support, including Firefox and Safari. The React hooks rely on the same document.modelContext API.

How do AI assistants like Claude or Cursor call tools registered with this package?

The source describes a Local Relay that forwards website tools to MCP clients such as Claude Desktop and Cursor. It also describes a MCP-B Extension and Chrome native support as other ways agents can discover tools.

Is React Webmcp an official project?

No. The source states that MCP-B is built by MCP-B and is not an official W3C or MCP project.

How do I install React Webmcp?

In Claude Code run claude mcp add react-webmcp -- npx -y @mcp-b/react-webmcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is React Webmcp the official server?

React Webmcp is published by npm:@mcp-b from its verified domain in the official MCP Registry.

Is React Webmcp free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is React Webmcp safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to React Webmcp?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does React Webmcp work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

React Webmcp Install

Add to stack

Loading.