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.
Install React Webmcp
Built from the published package, never by AI.
claude mcp add react-webmcp -- npx -y @mcp-b/react-webmcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"react-webmcp": {
"args": [
"-y",
"@mcp-b/react-webmcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"react-webmcp": {
"args": [
"-y",
"@mcp-b/react-webmcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"react-webmcp": {
"args": [
"-y",
"@mcp-b/react-webmcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add react-webmcp -- npx -y @mcp-b/react-webmcp{
"mcpServers": {
"react-webmcp": {
"args": [
"-y",
"@mcp-b/react-webmcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add react-webmcp npx -y @mcp-b/react-webmcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
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
ANo 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 →Turns GitHub repositories into architecture diagrams, written explanations, Mermaid source and narrated explainer videos. Built for developers who want to understand a codebase, and for AI agents that need to read one.
Mocks, records, and chaos-tests HTTP(S) dependencies for development and testing. One port serves many protocols, including gRPC, WebSockets, and LLM chat APIs. Built for developers and testers who need stand-in services during tests.
Provides MCP server and CLI tools that let AI coding agents build, test and manage iOS and macOS projects with Xcode and simulators. It is aimed at developers working on Apple platform apps.
Creates editable draw.io diagrams in AI chat from Mermaid, PlantUML, CSV or draw.io XML. Built for people who want diagrams from text prompts that stay editable in draw.io.
Indexes your code, git history, tests and decisions on your machine so AI coding agents can query the index instead of re-reading files. Built for developers who want fewer files opened and clearer answers about change risk and code health.
Gives your AI assistant hosted codebase intelligence for repos indexed on repowise.dev. Use it to ask how code works, what a change may break, and which tests to run.
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.
