> ## Documentation Index
> Fetch the complete documentation index at: https://mcp-b-sync-npm-packages-docs-bf03420.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Changelog

> Complete changelog showing WebMCP package version history, breaking changes, migration guides, new features, bug fixes, and deprecation notices for all npm packages.

<Update label="December 2025" description="v1.1.0-beta" tags={["New Features", "Beta Release"]}>
  ## 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

  ```tsx theme={null}
  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

  ```html theme={null}
  <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

  ```tsx theme={null}
  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`:

  ```bash theme={null}
  # 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
</Update>

<Update label="January 2025" description="v1.0.0" tags={["Breaking Changes", "Major Release"]}>
  <Warning>
    **Breaking Changes**: Version 1.0.0 introduces breaking changes. Please review the migration guide below before upgrading.
  </Warning>

  ## Major Changes

  ### Package Renaming

  Several packages have been renamed for clarity and consistency:

  | Old Name                 | New Name              | Migration                |
  | ------------------------ | --------------------- | ------------------------ |
  | `@mcp-b/mcp-react-hooks` | `@mcp-b/react-webmcp` | Update import statements |
  | `useMcpServer()` hook    | `useWebMCP()`         | 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):**

  ```tsx theme={null}
  const { registerTool } = useMcpServer();

  useEffect(() => {
    const tool = registerTool('my_tool', { description: '...' }, handler);
    return () => tool.remove();
  }, []);
  ```

  **After (v1.0):**

  ```tsx theme={null}
  useWebMCP({
    name: 'my_tool',
    description: '...',
    handler
  });
  // Auto-registers and cleans up
  ```

  ### navigator.modelContext API

  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

  <Steps>
    <Step title="Update package names">
      ```bash theme={null}
      # Remove old packages
      pnpm remove @mcp-b/mcp-react-hooks

      # Install new packages
      pnpm add @mcp-b/react-webmcp @mcp-b/global zod
      ```
    </Step>

    <Step title="Update imports">
      ```tsx theme={null}
      // Before
      import { useMcpServer } from '@mcp-b/mcp-react-hooks';

      // After
      import { useWebMCP } from '@mcp-b/react-webmcp';
      ```
    </Step>

    <Step title="Replace useMcpServer with useWebMCP">
      ```tsx theme={null}
      // 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) => { /* ... */ }
      });
      ```
    </Step>

    <Step title="Update vanilla JS tool registration">
      ```javascript theme={null}
      // 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();
      ```
    </Step>

    <Step title="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
    </Step>
  </Steps>

  ## 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
</Update>

<Update label="December 2024" description="v0.9.x" tags={["Minor Releases"]}>
  ## 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
</Update>

***

## 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

<Warning>
  The following will be removed in version 2.0.0 (estimated Q3 2025):
</Warning>

* `@mcp-b/mcp-react-hooks` package (use `@mcp-b/react-webmcp`)
* `useMcpServer()` hook (use `useWebMCP()`)
* Implicit tool registration patterns (use explicit `registerTool()`)

### Migration Timeline

| Version    | Release  | Deprecated Features | Removed Features               |
| ---------- | -------- | ------------------- | ------------------------------ |
| 1.0.0      | Jan 2025 | Old package names   | -                              |
| 1.1.0-beta | Dec 2025 | -                   | -                              |
| 1.1.0      | Q1 2026  | -                   | -                              |
| 2.0.0      | Q3 2026  | -                   | Old packages, `useMcpServer()` |

***

## Breaking Change Policy

WebMCP follows [Semantic Versioning](https://semver.org/):

* **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

<CardGroup cols={2}>
  <Card title="GitHub Releases" icon="github" href="https://github.com/WebMCP-org/npm-packages/releases">
    View detailed release notes
  </Card>

  <Card title="NPM Changelog" icon="npm" href="https://www.npmjs.com/package/@mcp-b/global?activeTab=versions">
    Browse version history
  </Card>

  <Card title="Discord Community" icon="discord" href="https://discord.gg/ZnHG4csJRB">
    Discuss updates and ask questions
  </Card>

  <Card title="Migration Guides" icon="book" href="/quickstart">
    Step-by-step upgrade instructions
  </Card>
</CardGroup>

***

## Reporting Issues

Found a bug or regression? Please report it:

1. Check [existing issues](https://github.com/WebMCP-org/npm-packages/issues)
2. Create a [new issue](https://github.com/WebMCP-org/npm-packages/issues/new) with:
   * Version numbers
   * Steps to reproduce
   * Expected vs actual behavior
   * Browser and extension versions

<Note>
  For security vulnerabilities, please email [security@mcp-b.ai](mailto:security@mcp-b.ai) instead of creating a public issue.
</Note>
