@mcp-b/global 4.0.0-beta.20260702180822 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mcp-b/global
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> WebMCP runtime - Let Claude, ChatGPT, Gemini, and other AI agents interact with your website
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@mcp-b/global)
|
|
6
6
|
[](https://www.npmjs.com/package/@mcp-b/global)
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
**[Reference](https://docs.mcp-b.ai/packages/global/reference)** | **[First Tool Tutorial](https://docs.mcp-b.ai/tutorials/first-tool)** | **[Add Tools to an App](https://docs.mcp-b.ai/how-to/add-tools-to-an-existing-app)**
|
|
12
12
|
|
|
13
|
-
**@mcp-b/global** implements the [
|
|
13
|
+
**@mcp-b/global** implements the [WebMCP API](https://webmachinelearning.github.io/webmcp/) (`document.modelContext`) specification, allowing AI agents like Claude, ChatGPT, Gemini, Cursor, and Copilot to discover and call functions on your website.
|
|
14
14
|
|
|
15
15
|
## Why Use @mcp-b/global?
|
|
16
16
|
|
|
17
17
|
| Feature | Benefit |
|
|
18
18
|
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| **W3C Standard** | Implements the emerging
|
|
19
|
+
| **W3C Standard** | Implements the emerging WebMCP API specification |
|
|
20
20
|
| **Drop-in IIFE** | Add AI capabilities with a single `<script>` tag - no build step |
|
|
21
21
|
| **Native Chromium Support** | Auto-detects and uses native browser implementation when available |
|
|
22
22
|
| **Dual Transport** | Works with both same-window clients AND parent pages (iframe support) |
|
|
@@ -162,7 +162,7 @@ document.modelContext.registerTool(
|
|
|
162
162
|
{ signal: ac.signal }
|
|
163
163
|
);
|
|
164
164
|
|
|
165
|
-
// Later
|
|
165
|
+
// Later - clean up:
|
|
166
166
|
ac.abort();
|
|
167
167
|
```
|
|
168
168
|
|
|
@@ -213,7 +213,7 @@ These MCP-B compatibility helpers remain available for older integrations. Prefe
|
|
|
213
213
|
| `name` | `string` | Yes | Unique identifier for the tool |
|
|
214
214
|
| `description` | `string` | Yes | Natural language description of what the tool does |
|
|
215
215
|
| `inputSchema` | `InputSchema` | No | JSON Schema describing accepted input. Defaults to `{ type: 'object', properties: {} }` |
|
|
216
|
-
| `outputSchema` | `InputSchema` | No |
|
|
216
|
+
| `outputSchema` | `InputSchema` | No | MCP-B helper metadata for output typing and structured MCP responses |
|
|
217
217
|
| `annotations` | `ToolAnnotations` | No | Hints about tool behavior for LLM planners |
|
|
218
218
|
| `execute` | `(args, client) => Promise<ToolResponse>` | Yes | Async function implementing the tool logic |
|
|
219
219
|
|
|
@@ -495,7 +495,7 @@ document.modelContext.registerTool({
|
|
|
495
495
|
|
|
496
496
|
## Zod Version Compatibility
|
|
497
497
|
|
|
498
|
-
This package supports **Zod 3.25
|
|
498
|
+
This package supports **Zod `^3.25 || ^4.0`** where Zod is used by higher-level helpers. Plain JSON Schema is also supported.
|
|
499
499
|
|
|
500
500
|
## Type Exports
|
|
501
501
|
|
|
@@ -519,20 +519,20 @@ import type {
|
|
|
519
519
|
|
|
520
520
|
## Tool Routing Contract
|
|
521
521
|
|
|
522
|
-
- MCP `tools/list`, `tools/call`, and tool list update notifications are sourced from `
|
|
523
|
-
-
|
|
522
|
+
- MCP `tools/list`, `tools/call`, and tool list update notifications are sourced from the `BrowserMcpServer` registry.
|
|
523
|
+
- Native and polyfill tool backfill use `getTools()` plus `executeTool()` when present, with `navigator.modelContextTesting` kept for preview/testing compatibility.
|
|
524
524
|
|
|
525
525
|
## Related Packages
|
|
526
526
|
|
|
527
527
|
- [`@mcp-b/transports`](https://docs.mcp-b.ai/packages/transports/reference) - MCP transport implementations
|
|
528
528
|
- [`@mcp-b/react-webmcp`](https://docs.mcp-b.ai/packages/react-webmcp/reference) - React hooks for MCP
|
|
529
529
|
- [`@mcp-b/extension-tools`](https://docs.mcp-b.ai/packages/extension-tools/reference) - Chrome Extension API tools
|
|
530
|
-
- [
|
|
530
|
+
- [`chrome-devtools-mcp`](https://github.com/ChromeDevTools/chrome-devtools-mcp) - Upstream Chrome DevTools MCP server
|
|
531
531
|
|
|
532
532
|
## Resources
|
|
533
533
|
|
|
534
534
|
- [WebMCP Documentation](https://docs.mcp-b.ai)
|
|
535
|
-
- [
|
|
535
|
+
- [WebMCP specification](https://webmachinelearning.github.io/webmcp/)
|
|
536
536
|
- [Model Context Protocol Spec](https://modelcontextprotocol.io/)
|
|
537
537
|
|
|
538
538
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-b/global",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "W3C Web Model Context Protocol (WebMCP) API polyfill. Let AI agents like Claude, ChatGPT, and Gemini interact with your website via document.modelContext.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai-agents",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"registry": "https://registry.npmjs.org/"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@mcp-b/
|
|
70
|
-
"@mcp-b/
|
|
71
|
-
"@mcp-b/webmcp-
|
|
72
|
-
"@mcp-b/webmcp-
|
|
69
|
+
"@mcp-b/webmcp-polyfill": "4.0.0",
|
|
70
|
+
"@mcp-b/transports": "4.0.0",
|
|
71
|
+
"@mcp-b/webmcp-ts-sdk": "4.0.0",
|
|
72
|
+
"@mcp-b/webmcp-types": "4.0.0"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/node": "22.17.2",
|