Skip to content

Brand in core: get_brand MCP tool, and once-ui brand / create --brand - #576

Merged
lorant-one merged 2 commits into
previewfrom
feat/mcp-get-brand
Nov 23, 2026
Merged

lorant-one merged 2 commits into
previewfrom
feat/mcp-get-brand

Conversation

@lorant-one

@lorant-one lorant-one commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

These are the core side of the Brand Kit MCP and API plan. The server side is once-ui-system/studio#310 (switch brandKitApi).

1. get_brand in once-ui-mcp (local, no network)

It reads the app's own brand from its files:

  • once-ui.config: the style schemes and seeds, theme, border, surface, the font family per variant, and schema.name.
  • src/brand/brand.json (written by once-ui brand pull) or src/brand/brand.ts (the Brand Kit zip).
  • The logo, icon and mascot files the kit and Stack write.

It returns:

  • A ready <Logo icon=… wordmark=…>, or <Logo text monogram> when there are no logo files.
  • A brandSeed hint when the config uses the nearest scheme rather than the exact hex.
  • The token rules for using the brand.

2. CLI: once-ui brand and create --brand

  • brand new "<description>" [--pick 0-3] [--engine …]: generates four candidates on once-ui.com (Pro and Indie). It writes them as SVGs to a temp folder, prints the board link, and keeps the one you pick. Run inside an app, it writes the brand in.
  • brand list, brand pull <id> [dir]: the files come from the server, and paths outside the app are refused. Then once-ui.config gets brand: "custom", brandSeed, the heading font and the name, and AGENTS.md gets the brand note.
  • create <dir> --brand "<description>"|<id>: the brand is settled before the scaffold, then written into the new app.

The README and CHANGELOG are updated. These commands need studio#310 live with brandKitApi on for the account.

Checks

  • packages/core: vitest run src/__tests__/mcp-server.test.ts, 11 passed.
  • packages/cli: tsc --noEmit is clean. vitest run: 53 passed, including the new test/brand.test.ts (config rewrite, apply, path escape, list, pull, create --brand by description and by id, against a mock server).
  • Biome passes on the changed files.

🤖 Generated with Claude Code

https://claude.ai/code/session_016gNJu1KhHYnxDSec1Jd6QM

once-ui-mcp gains get_brand: brand and accent schemes, the exact colour
from the Brand Kit's src/brand/brand.ts, fonts, logo files with the
<Logo> that renders them, and the app's mascot. Read from the files in
the app's root, so it needs no network.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJu1KhHYnxDSec1Jd6QM
@lorant-one lorant-one self-assigned this Nov 22, 2026
brand new generates four candidates and keeps one, brand list shows saved
brands, brand pull writes one into an app (files from the server, then
once-ui.config gets brand "custom" + brandSeed, the heading font and the
name). create --brand does the same for a new app, by description or id.
get_brand in once-ui-mcp also reads src/brand/brand.json, which pull writes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJu1KhHYnxDSec1Jd6QM
@lorant-one lorant-one changed the title feat(mcp): get_brand tool reads the app's own brand Brand in core: get_brand MCP tool, and once-ui brand / create --brand Nov 22, 2026
@lorant-one
lorant-one merged commit b1686c4 into preview Nov 23, 2026
9 of 12 checks passed
@lorant-one lorant-one added the approved label Nov 23, 2026 — with Claude
@lorant-one lorant-one mentioned this pull request Nov 23, 2026
6 tasks done
@lorant-one
lorant-one deleted the feat/mcp-get-brand branch November 29, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants