Skip to main content
December 2025
v1.1.0-beta

Major Features

Prompts & Resources API

Full Web Model Context API support now extends beyond tools to include prompts and resources:New React Hooks:
  • useWebMCPPrompt() - Register prompts that AI assistants can invoke
  • useWebMCPResource() - Expose resources with URI template support
import { useWebMCPPrompt, useWebMCPResource } from '@mcp-b/react-webmcp';
import { z } from 'zod';

// Register a prompt
useWebMCPPrompt({
  name: 'summarize',
  description: 'Summarize the current page content',
  argsSchema: {
    format: z.string().describe('Output format'),
  },
  get: async (args) => ({
    messages: [{
      role: 'user',
      content: { type: 'text', text: `Summarize in ${args.format} format` }
    }]
  })
});

// Register a resource
useWebMCPResource({
  uri: 'app://current-user',
  name: 'Current User',
  description: 'Currently logged in user data',
  handler: async () => ({
    contents: [{ uri: 'app://current-user', text: JSON.stringify(userData) }]
  })
});

MCP Iframe Custom Element

New @mcp-b/mcp-iframe package introduces the <mcp-iframe> web component:
  • Automatic tool namespacing - Iframe tools are automatically prefixed to avoid collisions
  • Context propagation - Exposes iframe tools, prompts, and resources to the parent context
  • Cross-frame communication - Seamless MCP communication between parent and child frames
<mcp-iframe src="https://example.com/mcp-enabled-app"></mcp-iframe>
Tools registered inside the iframe automatically become available to the parent page’s MCP context with namespaced names.

Sampling & Elicitation Support

Corrected architecture for server-to-client requests:
  • createMessage() - Request the AI to generate a response (sampling)
  • elicitInput() - Request user input through the AI interface
import { useMcpClient } from '@mcp-b/react-webmcp';

function MyComponent() {
  const { createMessage, elicitInput } = useMcpClient();

  const handleSampling = async () => {
    const response = await createMessage({
      messages: [{ role: 'user', content: 'Explain this code' }],
      maxTokens: 1000
    });
  };

  const handleElicitation = async () => {
    const input = await elicitInput({
      message: 'Please provide your API key',
      schema: { type: 'string' }
    });
  };
}

usewebmcp Package Alias

Published usewebmcp as a simpler alias for @mcp-b/react-webmcp:
# Either works
pnpm add @mcp-b/react-webmcp
pnpm add usewebmcp

Bug Fixes

  • Fixed race condition where tools registered by hooks were missed before notification handlers initialized
  • Added re-fetching mechanism to catch tools registered during setup gaps
  • Consolidated type imports for consistency across packages

Infrastructure

  • Updated Biome configuration with overrides for generated files
  • Changed react-webmcp test port from 5174 to 8888 to prevent conflicts
  • Comprehensive E2E test coverage for prompts, resources, and iframe routing
January 2025
v1.0.0
Breaking Changes: Version 1.0.0 introduces breaking changes. Please review the migration guide below before upgrading.

Major Changes

Package Renaming

Several packages have been renamed for clarity and consistency:
Old NameNew NameMigration
@mcp-b/mcp-react-hooks@mcp-b/react-webmcpUpdate import statements
useMcpServer() hookuseWebMCP()Replace hook calls

API Changes

@mcp-b/react-webmcp
  • Removed useMcpServer() hook - use useWebMCP() instead
  • New useWebMCPContext() hook for read-only context
  • Automatic registration/cleanup (no manual useEffect needed)
  • Built-in Zod support for type-safe schemas
Before (v0.x):
const { registerTool } = useMcpServer();

useEffect(() => {
  const tool = registerTool('my_tool', { description: '...' }, handler);
  return () => tool.remove();
}, []);
After (v1.0):
useWebMCP({
  name: 'my_tool',
  description: '...',
  handler
});
// Auto-registers and cleans up
Version 1.0.0 aligns with the W3C Web Model Context API proposal:
  • registerTool() is now the recommended approach (returns unregister())
  • provideContext() only for base tools (replaces all base tools)
  • Two-bucket tool management system introduced

New Features

@mcp-b/global

  • ✨ Two-bucket tool management (base vs dynamic tools)
  • ✨ IIFE build for CDN usage (no build step required)
  • ✨ Event-based tool call handling
  • ✨ Improved TypeScript types

@mcp-b/react-webmcp

  • useWebMCP() hook with automatic lifecycle management
  • useWebMCPContext() for read-only tools
  • ✨ Execution state tracking (isExecuting, lastResult, error)
  • McpClientProvider and useMcpClient() for consuming tools

@mcp-b/transports

  • ✨ Enhanced origin validation
  • ✨ Keep-alive support for extension transports
  • ✨ Server discovery for tab clients
  • ✨ Cross-extension communication support

@mcp-b/extension-tools

  • ✨ 62+ Chrome Extension API wrappers
  • ✨ Comprehensive TypeScript definitions
  • ✨ Zod-based validation
  • ✨ Manifest V3 compatible

Migration Guide

1

Update package names

# Remove old packages
pnpm remove @mcp-b/mcp-react-hooks

# Install new packages
pnpm add @mcp-b/react-webmcp @mcp-b/global zod
2

Update imports

// Before
import { useMcpServer } from '@mcp-b/mcp-react-hooks';

// After
import { useWebMCP } from '@mcp-b/react-webmcp';
3

Replace useMcpServer with useWebMCP

// Before
const { registerTool } = useMcpServer();
useEffect(() => {
  const tool = registerTool('my_tool', config, handler);
  return () => tool.remove();
}, []);

// After
useWebMCP({
  name: 'my_tool',
  description: 'Tool description',
  inputSchema: { /* Zod schemas */ },
  handler: async (args) => { /* ... */ }
});
4

Update vanilla JS tool registration

// Before - still works but not recommended
window.navigator.modelContext.provideContext({
  tools: [/* all your tools */]
});

// After - recommended for most tools
const reg = window.navigator.modelContext.registerTool({
  name: 'my_tool',
  description: '...',
  inputSchema: {},
  async execute(args) { /* ... */ }
});

// Clean up when needed
reg.unregister();
5

Test your integration

  • Verify all tools register correctly
  • Test tool execution with MCP-B extension
  • Check that tools unregister on component unmount
  • Validate input schemas work as expected

Bug Fixes

  • Fixed tool name collision errors
  • Improved error messages for schema validation
  • Fixed memory leaks in React StrictMode
  • Corrected TypeScript definitions for transport options
  • Fixed race condition in extension port connections

Performance Improvements

  • Reduced bundle size by 30%
  • Optimized tool registration performance
  • Improved transport message handling
  • Better memory management in long-running sessions
December 2024
v0.9.x

Version 0.9.5

  • Added experimental React hooks package
  • Improved documentation
  • Bug fixes for transport disconnections

Version 0.9.0

  • Initial public release
  • Basic MCP support for web browsers
  • Tab transport implementation
  • Extension transport for Chrome extensions

Upcoming Features

Version 1.1.0 Stable (Planned - Q1 2026)

  • 🔄 Stable release of prompts & resources API
  • 🔄 Stable release of MCP iframe component
  • 🔄 Firefox extension support
  • 🔄 Enhanced developer tools

Version 1.2.0 (Planned - Q2 2026)

  • 🔄 Safari extension support
  • 🔄 Performance monitoring and analytics
  • 🔄 Tool versioning support
  • 🔄 Advanced caching strategies

Deprecation Notices

Deprecated in 1.0.0

The following will be removed in version 2.0.0 (estimated Q3 2025):
  • @mcp-b/mcp-react-hooks package (use @mcp-b/react-webmcp)
  • useMcpServer() hook (use useWebMCP())
  • Implicit tool registration patterns (use explicit registerTool())

Migration Timeline

VersionReleaseDeprecated FeaturesRemoved Features
1.0.0Jan 2025Old package names-
1.1.0-betaDec 2025--
1.1.0Q1 2026--
2.0.0Q3 2026-Old packages, useMcpServer()

Breaking Change Policy

WebMCP follows Semantic Versioning:
  • Major versions (X.0.0): Breaking changes, major new features
  • Minor versions (1.X.0): New features, backward compatible
  • Patch versions (1.0.X): Bug fixes, backward compatible

Deprecation Process

  1. Announce: Deprecated features announced in release notes
  2. Warn: Console warnings added in code
  3. Grace period: Minimum 6 months before removal
  4. Remove: Removed in next major version

Stay Updated


Reporting Issues

Found a bug or regression? Please report it:
  1. Check existing issues
  2. Create a new issue with:
    • Version numbers
    • Steps to reproduce
    • Expected vs actual behavior
    • Browser and extension versions
For security vulnerabilities, please email [email protected] instead of creating a public issue.