atomus-mcp

v4.1.1
@stanvision/atomus-mcp Checked 2 days ago Published 1 month ago

Atomus MCP server: components, props, tokens, patterns, Figma-to-code, validation, setup files and brand ramps for AI agents (stdio via npx, or remote at…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

atomus_get_started Start here: Atomus rules and workflow

CALL THIS FIRST, before you write, change or review any UI that uses Atomus (imports from @stanvision/atomus-react or @stanvision/atomus-tokens, Atomus tokens like --color-text-primary, data-theme/data-brand attributes, or an Atomus Figma file). Returns the required workflow, the core rules, the forbidden list, the setup imports and which Atomus tool to call next. Pass the task in one sentence to get tailored next steps.

ParameterTypeDescription
taskstringWhat you are about to build, in one sentence (optional).

atomus_list_components List Atomus components

List every Atomus component with what it is for, whether it has a React export or is Figma-only, other names people use (dialog → Modal, sheet → Drawer, snackbar → Toast) and the decision trees (Alert vs Toast vs Modal, Card vs section, Tabs vs segmented …). Call this BEFORE choosing a component. Pass `query` to resolve a name or need ("dialog", "combobox", "kpi"); never import a component that this tool marks Figma-only.

ParameterTypeDescription
categorystringOnly this catalogue group, e.g. "Forms and inputs", "Feedback", "Overlays".
decisionTreesbooleanInclude the decision trees (default true).
includeFigmaOnlybooleanInclude Figma-only components (default true).
querystringA component name, another name for it, or a need ("dialog", "date range", "kpi").

atomus_get_component Get an Atomus component

Get one Atomus component from the manifest: import, every prop with type, allowed values, default and the Figma property it mirrors, native attributes, Do / Don't / Forbidden rules, code examples, Figma component sets and Code Connect mapping, accessibility notes and related components. ALWAYS call this before writing JSX for a component, and use only the props and values it returns. Accepts React names (DatePicker), Figma names ("Date picker", "Button icon") and other names ("dialog").

ParameterTypeDescription
name *stringComponent name: React export, Figma component set or another name.
formatstringmarkdown (default) or the raw manifest entry as JSON.

atomus_find_token Find an Atomus token

Find the Atomus design token for an intent, with Light and Dark values, the Tailwind utility and what it is for. Call this INSTEAD of writing any hex, rgb(), hsl(), px value or primitive (--color-gray-500) for colour, spacing, radius, shadow or type. Describe the intent in plain words ("supporting text", "card border", "page background", "gap inside a card", "space between sections", "error background"); a hex, a px value or a primitive name also works and returns the semantic tokens with that value.

ParameterTypeDescription
query *stringIntent in plain words, or a hex / px value / primitive token name.
kindstringRestrict to one kind of token (default any).
limitintegerMaximum results (default 6).

atomus_get_pattern Get an Atomus page pattern

Get a complete, validated screen recipe built only from Atomus components and tokens: app shell (sidebar + page), dashboard, table view, settings, auth (log in / sign up), website sections (marketing pages) or AI chat. Call this before you lay out a new screen, then copy the structure and change the content.

ParameterTypeDescription
pattern *stringOne of: app-shell, dashboard, table-view, settings, auth, website-sections, ai-chat.

atomus_figma_to_code Atomus Figma instance → JSX

Turn an Atomus Figma component instance into Atomus JSX using the Code Connect mappings in the manifest: pass the component set name (e.g. "Button", "Button icon", "Alert") and its property values as shown in Figma ({"Hierarchy": "Primary", "Size": "md", "State": "Loading", "Label": "Save"}). Use it when reading a design through the Figma MCP server and no Code Connect snippet came back. Interaction states (Hover, Focused) are dropped; Figma-only components return what to use instead. The JSX is checked with atomus_validate.

ParameterTypeDescription
component *stringFigma component set name (or React name).
propertiesobjectFigma property values by property name, e.g. {"Hierarchy": "Primary", "Leading icon": true, "Leading icon swap": "plus"}.
textstringText content (label or title) when it is not in properties.

atomus_validate Validate code against Atomus

REQUIRED FINAL STEP: validate every file you created or changed before you hand over. Runs the Atomus ESLint plugin (TSX/JSX/TS/JS: raw colours, primitive tokens, arbitrary Tailwind values, unknown props and enum values, raw <button>/<input>/<select>/<dialog>, unlabelled icon buttons, more than one primary Button per view) or the Atomus Stylelint rules (CSS: raw colours, primitives, non-token spacing/radius/colour values). Returns each problem with line, rule, message and suggestions; with fix=true also the code with safe autofixes applied. Fix every error and run it again.

ParameterTypeDescription
code *stringThe full file content.
filenamestringFile name; the extension picks the linter (.tsx/.jsx/.ts/.js → ESLint, .css → Stylelint). Default Component.tsx.
fixbooleanAlso return the code with safe autofixes applied (default false).

atomus_init Atomus setup files for a project

Return the files to set up Atomus in a consumer repo: AGENTS.md rules (from the Atomus consumer template), CLAUDE.md, a Cursor rule, Copilot instructions, the CSS imports for plain CSS / Tailwind v4 / shadcn, ESLint and Stylelint configs and MCP configs for Claude Code, Cursor, VS Code and Codex. Returns content only and writes nothing: create or merge the files yourself. Call it once when a project starts using Atomus.

ParameterTypeDescription
agentsarrayWhich agent files to return (default all).
lintbooleanInclude ESLint and Stylelint configs (default true).
mcpbooleanInclude MCP server configs (default true).
stylingstringToken setup: plain CSS (default), Tailwind v4 theme or shadcn/ui theme.

atomus_brand Atomus brand ramp from a colour

Turn one brand colour (hex) into an Atomus brand: the 12-step ramp (--color-brand-25 … 950) as a [data-brand="<name>"] CSS block, WCAG contrast checks for buttons and links in light and dark, and the steps to apply it in code and Figma. Use it when a client brand colour must replace the Atomus blue. Never hard-code the brand colour in components; adding a brand is a token change that needs human review.

ParameterTypeDescription
hex *stringBrand colour, e.g. #ff6600.
name *stringBrand name for data-brand, e.g. "acme".
anchorstringRamp step the colour lands on (default auto: the closest lightness).