Tools
How to install, use, and troubleshoot the Marmo UI Claude Code plugin and the MCP server it connects to. The fastest way for AI agents to write correct @marmoui/ui code.
The Marmo UI Claude Code plugin is the recommended way for engineers to use AI to build UI with @marmoui/ui. It bundles three things into a single install:
/marmo-ui:init, /marmo-ui:marmo-build, /marmo-ui:override, /marmo-ui:design-md, /marmo-ui:prototype) for explicit workflows — see the command reference.The result: Claude stops hallucinating prop names, stops importing @chakra-ui/react, and starts producing code that compiles and matches your design system on the first try.
One install per developer, one time. Updates arrive automatically — no per-repo config, no env vars, no shell exports.
┌──────────────────────────────────┐
│ Your repo (any product app) │
│ │
│ Claude Code session │
│ ───────────────── │
│ Skill auto-loads │
│ Slash command available │
└─────────────┬────────────────────┘
│ HTTPS + Bearer token
▼
┌──────────────────────────────────┐
│ marmo-ui MCP server (hosted) │
│ ────────────────────────── │
│ • Component index (74+) │
│ • Pattern catalog │
│ • Prop signatures (live) │
│ • Validators │
└─────────────┬────────────────────┘
│ Re-indexes on every push
▼
┌──────────────────────────────────┐
│ mahmoudilyan/marmoui repo │
│ ────────────────────────── │
│ • packages/ui/src/ │
│ • content/components/*.mdx │
│ • content/patterns/*.mdx │
└──────────────────────────────────┘When you push a component change or update an MDX file, the deployed MCP rebuilds its index within ~2 minutes and every developer's Claude Code session automatically sees the new data on its next tool call. Nobody has to update anything.
In Claude Code, run these two commands inside any repo:
/plugin marketplace add mahmoudilyan/marmoui
/plugin install marmo-ui@marmoui-pluginsWhen prompted for marmo_mcp_token, paste the team-wide bearer token (ask Dan for the token").
That's it. The MCP starts automatically on the next tool call.
You need GitHub read access to
mahmoudilyan/marmouifor/plugin marketplace addto clone the marketplace catalog.
If you'd rather skip the prompt:
CLAUDE_PLUGIN_OPTION_MARMO_MCP_TOKEN=<paste-team-token-here> \
claude plugin marketplace add mahmoudilyan/marmoui && \
CLAUDE_PLUGIN_OPTION_MARMO_MCP_TOKEN=<paste-team-token-here> \
claude plugin install marmo-ui@marmoui-pluginsSame end state — token goes straight to the OS keychain.
In Claude Code:
/plugin # confirm marmo-ui is in the enabled list
/mcp # confirm marmo-ui MCP is connected (green dot)Then in chat:
List all Marmo UI components.
If you see 70+ components come back, you're good. If /mcp shows a red dot, jump to Troubleshooting.
You don't need to do anything special — the skill auto-triggers on UI work. But it helps to know what's happening behind the scenes.
Whenever your prompt mentions any of:
@marmoui/ui, "Marmo components", "our design system"…the marmo-ui skill auto-loads and walks Claude through the validated workflow:
get_knowledge_version).get_design_guidelines).get_pattern for known layouts, otherwise search_components + get_component_info.review_generated_code before returning.You'll see Claude make these calls in the trace. That's the workflow.
For a heavyweight "do it the Marmo way" request:
/marmo-ui:marmo-build a settings page with workspace, notifications, and billing tabsThe slash command runs the same workflow, but doesn't depend on Claude inferring intent from your wording — useful when the prompt is short or ambiguous. All five commands are documented in the command reference below.
You can also invoke MCP tools directly:
@marmo-ui get_pattern patternId="app-shell"
@marmo-ui search_components query="dropdown"
@marmo-ui get_component_info componentName="Button"Useful for spot-checks ("what props does Badge accept?") without launching the full generation workflow.
Five commands ship with the plugin. You never have to use them — every command has a plain-text equivalent, because the marmo-ui skill auto-triggers on natural language. Slash commands exist for precision: they run the exact documented workflow without depending on Claude inferring intent from your wording.
| Command | What it does | Plain-text equivalent |
|---|---|---|
/marmo-ui:init | Bootstrap the project's design identity — detect brand basics from the codebase, interview for the gaps, write DESIGN.md | "Set up a DESIGN.md for this project" |
/marmo-ui:marmo-build | Build UI following the full MCP-backed workflow (guidelines → patterns → props → validate) | "Build a settings page with our design system" |
/marmo-ui:override | Set up the local ui/ wrapper folder, then override an @marmoui/ui component or create a custom one | "Override DataTable with a custom default page size" / "Create a custom InvoiceCard component in our ui folder" |
/marmo-ui:design-md | Generate a portable DESIGN.md (brand color, type, tokens, component inventory) any AI agent can read | "Generate a design brief for this project" |
/marmo-ui:prototype | Scaffold a shareable prototype with the comments + AI-edit overlay, deploy to Netlify, return a public URL | "Spin up a shareable prototype of this flow" |
/marmo-ui:initFirst-run setup for a product app. Scans the repo for existing tokens (CSS custom properties, Tailwind config, fonts), asks only about what it couldn't detect (brand name, primary color, layout family, rounding, density, dark mode), and writes a DESIGN.md at the project root. Every agent — Claude, Cursor, Codex — reads that file to generate on-brand UI. Never overwrites an existing DESIGN.md.
/marmo-ui:init
/marmo-ui:init our brand is Acme, primary color #0F62FE, dark mode required/marmo-ui:marmo-buildThe explicit "build this the Marmo way" command. Runs the same five-step workflow the skill uses (verify MCP freshness → read guidelines → fetch pattern or component info → write code → validate with review_generated_code), but guaranteed — no reliance on the skill recognizing your prompt as UI work.
/marmo-ui:marmo-build a subscribers page with an Import CSV action and a data tableUse it when the prompt is short, ambiguous, or when a previous freeform attempt produced off-system code.
/marmo-ui:overrideCustomize the design system without forking it. On first run it sets up the wrapper convention: creates src/ui/index.ts re-exporting @marmoui/ui, records uiImportPath: "@/ui" in DESIGN.md, and offers to migrate existing imports. After that, app code imports UI from @/ui and overriding a component is one file plus one re-export line.
/marmo-ui:override DataTable # override an existing component (wraps, doesn't fork)
/marmo-ui:override new InvoiceCard # create an app-specific component in src/ui/See Overriding Components for the full convention, the wrap-vs-fork guidance, and common mistakes.
/marmo-ui:design-mdGenerates the same DESIGN.md artifact as /marmo-ui:init, but sourced from the design system itself rather than an interview — brand color, typography, tokens, and the component inventory pulled live from the MCP. The portable wedge: hand the file to any agent in any editor and it generates on-brand UI without an MCP connection.
/marmo-ui:design-md/marmo-ui:prototypeScaffolds a shareable prototype from the prototype starter, pre-wired with the comments + AI-edit overlay (@marmoui/prototype-overlay), deploys it to Netlify, and returns a public URL. Reviewers sign in with Claude to leave inline comments; the owner can make AI edits in select mode.
/marmo-ui:prototype an onboarding flow with a 3-step wizardSlash commands are shortcuts, not requirements. The skill watches for intent, so these are equivalent:
| You type | What runs |
|---|---|
/marmo-ui:override DataTable | The override workflow, explicitly |
| "I want to customize the DataTable in this app — set up an override" | The skill recognizes the intent and follows the same workflow |
/marmo-ui:marmo-build a billing page | The build workflow, explicitly |
| "Build a billing page with our design system" | Skill auto-triggers, same five steps |
Prefer slash commands when you want guaranteed, reproducible behavior (onboarding docs, runbooks, CI prompts); plain text is fine for day-to-day work.
Eight tools, each focused on a specific job:
| Tool | When the AI calls it | What it returns |
|---|---|---|
get_knowledge_version | Once per session, before generating any UI | { gitSha, indexedAt, componentCount, patternCount, uptimeSeconds } |
get_design_guidelines | Mandatory first call before writing @marmoui/ui code | Generation checklist, hard rules (no namespace sub-components, PageSection is self-closing, etc.), import conventions |
list_components | Discovery — when the AI doesn't know what exists | Names, descriptions, categories, prop counts for every component |
search_components | Discovery — when the AI knows the use case | Top 5–8 components matching a keyword ("form", "table", "toast") |
get_component_info | Required before using any component for the first time in a session | Exact prop signatures, types, defaults, examples, common mistakes |
get_pattern | When the task matches a known multi-component layout | Validated copy-pasteable code for app-shell, data-table-with-filters, form-with-validation, confirmation-dialog, dialogs-for-other-actions, posthog-tracking |
review_generated_code | Mandatory on every piece of code before returning to the user | { valid, errors[], warnings[], suggestedFixes[] } against live prop signatures |
validate_component_usage | When validating user-provided or existing code (not freshly generated) | { valid, issues[] } |
The tool descriptions are what tells Claude when to use each tool — they're tuned in the MCP server (apps/design-system-mcp/src/tools/index.ts).
After /plugin install, you have:
| Item | Location | Purpose |
|---|---|---|
The marmo-ui skill | Auto-loaded in every Claude Code session | Walks the AI through the validated workflow |
Five /marmo-ui:* slash commands | Always available | init, marmo-build, override, design-md, prototype — see command reference |
The marmo-ui MCP server connection | mcp_servers registry | Streams design-system knowledge to Claude |
marmo_mcp_token | OS keychain (sensitive) | Authenticates with the hosted MCP |
mcp_url (optional override) | OS keychain | Points the plugin at a fork or local server |
You don't see any of this on disk — there are no per-repo .mcp.json or .env files to commit.
Updates are automatic. The plugin uses git-SHA versioning, which means every commit to mahmoudilyan/marmoui is a new version. Claude Code re-checks the marketplace on a schedule, and you'll be prompted to update when a new SHA lands.
Manual update:
/plugin update marmo-ui@marmoui-pluginsThis re-pulls the plugin from the marketplace; your token stays in the keychain across updates.
The plugin exposes two config values via Claude Code's userConfig:
| Key | Required | Default | Notes |
|---|---|---|---|
marmo_mcp_token | yes | — | Sensitive (sensitive: true). Stored in OS keychain. |
mcp_url | no | https://mcp.marmoui.com/mcp | Override only when running against a fork or local MCP. |
There's no built-in reconfigure flow yet. Two options:
Option A — uninstall + reinstall (re-prompts for both values):
/plugin uninstall marmo-ui@marmoui-plugins
/plugin install marmo-ui@marmoui-pluginsOption B — one-paste with new values:
CLAUDE_PLUGIN_OPTION_MARMO_MCP_TOKEN=<new-token> \
CLAUDE_PLUGIN_OPTION_MCP_URL=<new-url> \
claude plugin install marmo-ui@marmoui-plugins --forceEither way the previous keychain entry is overwritten.
/mcp)Most common cause: wrong or expired token. Reinstall to re-prompt:
/plugin uninstall marmo-ui@marmoui-plugins
/plugin install marmo-ui@marmoui-pluginsIf reinstall doesn't fix it, the issue is server-side. Surface the error to the design-system team.
This means the MCP server returned an HTML 404 instead of a JSON response — typically because the server's TEAM_API_KEY env var is unset or empty, so requests fall through to the docs site's 404 page. Server-side issue; ping the design-system team.
Your token doesn't match the server's TEAM_API_KEY. The team rotated the token, or you pasted the wrong value. Reinstall the plugin and paste the current team token.
The plugin isn't enabled in this session. Run /plugin and confirm marmo-ui is in the enabled list. If it isn't, /plugin install marmo-ui@marmoui-plugins.
The MCP indexes from main. If you don't see a component you just merged, it hasn't redeployed yet (~2 min after merge). You can confirm by calling:
@marmo-ui get_knowledge_versionCompare gitSha to the latest commit on main. If they don't match, wait or check the deploy workflow on GitHub.
marmo-ui MCP entries showing in /mcpYou probably installed the plugin and also have the design-system contributor manual setup (.mcp.json + MARMO_MCP_TOKEN env var) active. They both register a server named marmo-ui — Claude Code can pick the wrong one. Pick one path:
MARMO_MCP_TOKEN from your shell.Cursor doesn't support Claude Code plugins, but it does support the same MCP server. Add a per-user MCP config at ~/.cursor/mcp.json:
{
"mcpServers": {
"marmo-ui": {
"url": "https://mcp.marmoui.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_TEAM_API_KEY"
}
}
}
}Replace YOUR_TEAM_API_KEY with the team token. Restart Cursor.
The skill and slash command are Claude-Code-only, but the MCP tools (get_component_info, get_pattern, review_generated_code, etc.) work the same way in Cursor — just call them directly or let Cursor's agent use them.
The server speaks standard MCP over Streamable HTTP. Configure your client with:
URL: https://mcp.marmoui.com/mcp
Header: Authorization: Bearer <team-token>No client-specific tweaks required.
If you're working inside mahmoudilyan/marmoui and changing the MCP itself, use the project-scoped config rather than the plugin:
echo 'export MARMO_MCP_TOKEN="<paste-token>"' >> ~/.zshrc
source ~/.zshrcThe repo-root .mcp.json interpolates this env var. Don't run this and the plugin — they declare the same server name and Claude Code may pick the wrong one.
The MCP server source lives in a private repository; you only ever connect to the hosted instance.
Every merge to main in this repo flows to the hosted MCP automatically: CI rebuilds the MCP image (which pulls the latest public docs — component-props.json, component MDX, @marmoui/ui exports — plus the private patterns knowledge) and redeploys it. The MCP rebuilds its index on startup.
The pre-commit hook (.husky/pre-commit) keeps component-props.json in sync with component source, so the index never drifts from the real props.
For details on the authoring schema (frontmatter, required sections, cross-reference tables), see CONTRIBUTING-MDX.md.
If your team has stricter data-residency requirements, the same MCP can run inside your network — point mcp_url at your hosted instance.
mahmoudilyan/marmoui with the label claude-plugin.mcp-bug and the offending tool call (the request id from the trace is enough to find it in server logs).mdx-audit and link to the relevant content/components/*.mdx.apps/design-system-mcp/SETUP.md — operator guide for running the MCP locally and the technical reference for env vars / deployment.apps/design-system-mcp/README.md — what the MCP is for, how indexing works.tools/claude-plugin/README.md — internals for plugin authors and how to ship updates.get_pattern.CONTRIBUTING-MDX.md — authoring guide for the MDX content the MCP indexes.