@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.modelContexttypes 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-polyfillor@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.
Related pages
Reference
Type contracts, schema inference helpers, and activation patterns.
Use schemas and structured output
Practical guidance for schema-driven tool inputs and outputs.
Strict core vs MCP-B extensions
Background on where the standard surface ends.
Choose a runtime
Pick the runtime layer that pairs with these types.
