Brand your blocks

Use your brand accents and display font while your blocks follow the MCP host theme.

1.Apply the host context

Call applyHostContext with the context from your MCP host. The reference tokens expose its palette and fonts through utilities such as bg-host-bg. Built-in light and dark defaults supply values the host leaves out.

2.Set the app tokens you want to change

Set --mb-* variables on a wrapper or on the document root. Blocks read them throughhost-app-* utilities. Each unset app token uses the corresponding reference value at the point where the block renders, including after a theme change.

.my-brand {
  --mb-accent: #09e1cd;
  --mb-accent-fg: #141413;
  --mb-font-display: Georgia, serif;
}
--mb-surface
Main surface
--mb-surface-muted
Secondary and subtle surfaces
--mb-fg
Main text
--mb-fg-muted
Secondary and subtle text
--mb-border
Neutral borders
--mb-accent
Primary control fill
--mb-accent-fg
Text on primary controls
--mb-font-display
Display font for block titles
--mb-{info,success,warning,danger}-{bg,fg,border}
Status colors

3.Try a branded confirmation

$npx shadcn@latest add https://mcpblocks.dev/r/branded-confirm-action.json

The same teal button and display font appear in both host themes. The surface, body text, and borders follow the host.

Light host

Move Northwind Traders to Negotiation

Northwind TradersSample deal

Stage Proposal → Negotiation

Nothing is saved until you confirm.

Dark host

Move Northwind Traders to Negotiation

Northwind TradersSample deal

Stage Proposal → Negotiation

Nothing is saved until you confirm.

To see it in Claude, add the MCP Blocks connector at https://mcpblocks.dev/mcp with No sign in selected and ask it to show the branded-confirm-action block. Switch Claude between light and dark to see its host colors change around the brand accents.