@mcp-b/global weekly downloads statistics
By mcp-b (4 listings) · npm · MCP servers
W3C Web Model Context Protocol (WebMCP) API polyfill. Let AI agents like Claude, ChatGPT, and Gemini interact with your website via document.modelContext.
@mcp-b/global has 183,844 recorded weekly downloads on npm, a decrease of 21.1% over the past 30 days, ranking #542 of 3,247 tracked listings.
About @mcp-b/global
@mcp-b/global
WebMCP runtime - Let Claude, ChatGPT, Gemini, and other AI agents interact with your website
Reference | First Tool Tutorial | Add Tools to an App
@mcp-b/global implements the WebMCP API (document.modelContext) specification, allowing AI agents like Claude, ChatGPT, Gemini, Cursor, and Copilot to discover and call functions on your website.
Why Use @mcp-b/global?
| Feature | Benefit |
|---|---|
| W3C Standard | Implements the emerging WebMCP API specification |
| Drop-in IIFE | Add AI capabilities with a single <script> tag - no build step |
| Native Chromium Support | Auto-detects and uses native browser implementation when available |
| Dual Transport | Works with both same-window clients AND parent pages (iframe support) |
| Spec-Aware Compatibility | Tracks the current WebMCP draft (document.modelContext, registerTool(tool, { signal }), and getTools()) and object-input executeTool(...). |
| Works with Any AI | Claude, ChatGPT, Gemini, Cursor, Copilot, and any MCP client |
Package Selection
- Use the official
webmcp-typesfor standard browser contracts and@mcp-b/webmcp-ts-sdkfor MCP-B extensions. - Use the official
@w3c/webmcp-polyfillwhen you only need the standard WebMCP API without MCP. - Use
@mcp-b/globalwhen you want MCPB integration features (bridge transport, prompts/resources, extension APIs).
Polyfill runtime
When no context is installed, @mcp-b/global calls installWebMCP() from
@mcp-b/webmcp-polyfill. That package passes through the official W3C
@w3c/webmcp-polyfill, which
implements the core imperative API and frames.
@mcp-b/webmcp-polyfill adds the declarative API and its SubmitEvent extensions
until the official polyfill supports them. @mcp-b/global adds MCP-B transports, prompts,
resources, MCP outputSchema metadata, and structured MCP responses. Existing native
contexts take precedence and receive the MCP-B adapter when wrapped,
including when the official polyfill was installed before @mcp-b/global.
cleanupWebModelContext() removes the MCP-B adapter; the polyfill context and
declarative layer remain installed for the document lifetime. Existing native
SubmitEvent hooks are preserved.
executeTool(tool, inputObject) follows the current draft and returns JSON.
Quick Start
Via IIFE Script Tag (No Build Required)
<!DOCTYPE html>
<html>
<head>
<script src="https://unpkg.com/@mcp-b/global@6/dist/index.iife.js"></script>
</head>
<body>
<h1>My AI-Powered App</h1>
<script>
void document.modelContext
.registerTool({
name: 'get-page-title',
description: 'Get the current page title',
inputSchema: { type: 'object', properties: {} },
async execute() {
return {
content: [{ type: 'text', text: document.title }],
};
},
})
.catch(console.error);
</script>
</body>
</html>
- Self-contained - All dependencies bundled
- Auto-initializes -
document.modelContextready immediately - No build step - Just drop it in your HTML
Via ES Module
<script type="module">
import '@mcp-b/global';
await document.modelContext.registerTool({/* your tool */});
</script>
The ESM entry keeps @mcp-b/transports, @mcp-b/webmcp-polyfill, and
@mcp-b/webmcp-ts-sdk external; only the IIFE bundles them.
Via NPM
npm install @mcp-b/global
import '@mcp-b/global';
await document.modelContext.registerTool({/* your tool */});
API Reference
Functions
initializeWebModelContext(options?)
Initializes the global adapter. Replaces document.modelContext with a BrowserMcpServer instance that bridges WebMCP tools to the MCP protocol layer.
window.__webModelContextOptions = { autoInitialize: false };
const { initializeWebModelContext } = await import('@mcp-b/global');
initializeWebModelContext({
transport: {
tabServer: { allowedOrigins: ['https://example.com'] },
},
});
await document.modelContext.registerTool({/* your tool */});
Behavior:…
Description from the npm listing.
- ai-agents
- ai-assistant
- ai-integration
- ai-tools
- anthropic
- browser
- browser-ai
- chatgpt
- chromium
- claude
- copilot
- cursor
- gemini
- iife
- llm
- mcp
- model-context-protocol
- openai
- polyfill
- tool-registration
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm MCP servers plugins
All 20 @mcp-b/global alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@mcp-b/global. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.