Skip to main content
A component is the BindJS code that backs a Type. A package is an immutable, semantically-versioned snapshot of all the components in a project. Together they form the pair that makes MCP Apps reproducible and rollback-safe: a Type points at a component, the component lives in a package version, and that pairing never silently changes once published.

Component shapes

Every BindJS component declares one of three shapes through a defineComponent(), defineDataSource(), or layout-component declaration. The shape determines what kind of Type the component can back. A Data Tool is a component with a different shape — it has the same lifecycle, same package, same versioning as a layout or view component. There is no separate “Data Tool” object underneath the surface.

A component example

A view component (ProductDetail) declares what properties the AI can supply and renders the result:
A data component declares its handler and the input/output schemas it implements:
For the full BindJS API, see the BindJS Reference.

Packages

A package is a frozen, semantically-versioned bundle of every component in a project, plus the asset references those components depend on. Packages are immutable: once published, version 2.1.0 is 2.1.0 forever. Why this matters:
  • Reproducible renders. A Type that pinned to package 2.1.0 always renders against 2.1.0’s component code, even after you publish 2.2.0.
  • Instant rollback. Reverting from 2.2.0 to 2.1.0 is a metadata flip, not a redeploy.
  • Predictable updates. New tool definitions and component changes ship together as a coherent unit, not as a series of partial states.
The CDN serves package bundles content-addressed by hash. Once a package is requested, every renderer (web iframe, iOS, Android) caches it at the edge.

Draft and published states

Components and packages each have three states: When you publish the project, modified components and Types are promoted: the package version increments, and the production endpoint switches to the new version.

Inspector and the visual builder

Components author both what they render and how the editor configures them. The inspector schema (inspector config on each property) tells MCP App Studio what controls to show — single-line fields, multi-line text, sliders, color pickers, asset pickers, dropdowns. This is what lets non-technical teams configure Tools without writing code.

Where components render

The BindJS authoring layer drives what Claude, ChatGPT, and every other MCP host show your users — the React renderer (@metabindai/bindjs-react) runs in a sandboxed iframe inside each host. For embedded experiences, the Assistant SDK renders the same components through the open source native engines: bindjs-apple (SwiftUI) and bindjs-android (Jetpack Compose). See Native rendering for what runs where.

Tools and Types

How a component becomes a registered MCP tool.

Native rendering

How one component compiles to React, SwiftUI, and Jetpack Compose.

Authoring BindJS components

How-to: write components from scratch.

BindJS Reference

Full BindJS API.