Skip to main content
@mcp-b/webmcp-types is the lowest-level package in the MCP-B stack. It provides the contracts used by MCP-B packages, schema inference utilities, and browser global augmentation without runtime code.

When to use this package

  • You are authoring a library that integrates with MCP-B runtimes.
  • You want compile-time inference from JSON Schema literals.
  • You need the compatibility contracts exported by MCP-B packages.

When not to use this package

  • You need a runtime implementation in the browser. Use @mcp-b/webmcp-polyfill or @mcp-b/global.
  • You want prompts, resources, or transport features. Those live higher in the stack.
  • You only need ambient declarations that track the current proposal. Use the Community Group’s webmcp-types package.

Where it sits in the package graph

@mcp-b/webmcp-types sits under the runtime packages. @mcp-b/webmcp-polyfill, @mcp-b/webmcp-ts-sdk, @mcp-b/global, usewebmcp, and @mcp-b/react-webmcp all build on these contracts.

First step

Install the package as a dev dependency, then choose one activation path from the reference page: types in tsconfig.json, a triple-slash reference, or a side-effect type import.

Reference

Type contracts, schema inference helpers, and activation patterns.

Use schemas and structured output

Practical guidance for schema-driven tool inputs and outputs.

WebMCP and MCP-B extensions

Background on the proposal and MCP-B extension boundary.

Choose a runtime

Pick the runtime layer that pairs with these types.