Skip to main content
@mcp-b/webmcp-types is the lowest-level package in the MCP-B stack. It gives you the type contracts for navigator.modelContext, schema inference utilities, and the global Navigator augmentation without shipping any runtime code.

When to use this package

  • You are authoring a library that wants to type against the WebMCP core surface.
  • You want compile-time inference from JSON Schema literals.
  • You need navigator.modelContext types in TypeScript without choosing a runtime yet.

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.

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.