design-system-mcp-server

v2.10.2
@onemrvapublic/design-system-mcp-server Checked 2 days ago Published 12 hours ago

Centralized MCP server for ONEM/RVA Design System with stdio and HTTP transport support

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

help_friend

Start here when intent is unclear. Returns a grouped MCP tool catalog plus a recommended call sequence so AI can choose the next best tool with less trial-and-error.

list_components

List all available design system components with their categories and descriptions. Optionally filter by category (mat-*, page-*, layout-*).

ParameterTypeDescription
categorystringFilter by component prefix: "mat", "page", "layout", or "all"

get_component

Get detailed information about a specific component including its API (inputs, outputs), usage examples, and accessibility notes.

ParameterTypeDescription
name *stringComponent name (e.g., "mat-avatar", "page-not-found", "layout")

search_components

Use first for keyword-driven discovery across all synced datasets (components, Figma, tokens, styles, icons, JSON Forms, theme). Best tool when the user does not know exact component names.

ParameterTypeDescription
query *stringSearch query (e.g., "form", "navigation", "upload", "date")

generate_component_usage

Generate a complete code example showing how to use a specific component with proper imports and common configuration.

ParameterTypeDescription
name *stringComponent name to generate usage for
scenariostringOptional: specific use case scenario (e.g., "with validation", "reactive form")

get_component_props

Get a detailed list of all inputs, outputs, and methods for a component with their types and descriptions.

ParameterTypeDescription
name *stringComponent name

get_accessibility_info

Get accessibility information and WCAG compliance notes for a component, including common accessibility patterns and testing results.

ParameterTypeDescription
name *stringComponent name

list_jsonforms_renderers

List all available JSON Forms custom renderers for form controls like checkbox, datepicker, phone, IBAN, etc.

get_jsonforms_renderer

Get detailed information about a specific JSON Forms renderer including its inputs and tester function.

ParameterTypeDescription
name *stringRenderer name (e.g., "checkbox-renderer", "datepicker-renderer")

list_theme_utilities

List all available theme utilities including SCSS variables, CSS custom properties (design tokens), color palettes, spacing scales, mixins, and breakpoints.

ParameterTypeDescription
typestringFilter by type: "variable", "palette", "mixin", "css-custom-property", or "all"

get_theme_utility

Get detailed information about a specific theme utility (variable, palette, or mixin).

ParameterTypeDescription
name *stringUtility name (e.g., "palette", "breakpoints", "$spacer")

list_icons

List DS icons synced from Figma in a human-readable table with icon name, key, description, and link. Use before writing icon usage code to avoid wrong icon names.

ParameterTypeDescription
categorystringOptional icon category filter (e.g., "action", "arrow", "status")
limitnumberOptional max rows to return (default: all filtered icons, max: 1000).
offsetnumberOptional zero-based offset for pagination.

get_sync_status

Get MCP sync health and freshness for Figma + codebase data, including last sync times and error summaries.

list_figma_components

List components synced from Nemo Figma with page, mapping, and variant counts. Supports filters for page, status, and mapped-only.

ParameterTypeDescription
limitnumberOptional max rows to return (default: 80, max: 1000).
mappedOnlybooleanIf true, only returns components mapped to Angular selectors
offsetnumberOptional zero-based offset for pagination.
pagestringOptional page filter (e.g., "button", "icons")
statusstringOptional status filter

get_spacing_spec

The padding, gap, direction and alignment of one or many components, in a compact form, in a single call. Use this when checking or correcting the spacing of a page against its design: it is far cheaper than calling get_figma_component per component. Accepts names, node ids or pasted Figma URLs.

ParameterTypeDescription
components *arrayComponent names, node ids, or Figma URLs. Pass every component on the page at once.

get_figma_component

Get detailed info for one synced Figma component: mapping, properties, variants, tokens used, the Figma link, and the anatomy tree with padding, gap and layout per layer. Accepts a component name, a node id, or a pasted Figma frame URL. For spacing across several components prefer get_spacing_spec, which is far cheaper.

ParameterTypeDescription
name *stringFigma component name, a node id (51-1711 or 51:1711), or a full Figma frame URL.

list_design_tokens

List design tokens from synced Figma variables when available, with safe fallback guidance to codebase theme utilities.

ParameterTypeDescription
collectionstringOptional collection filter
limitnumberOptional max rows to return (default: 120, max: 1000).
offsetnumberOptional zero-based offset for pagination.
sourcestringToken source filter

get_design_token

Get full details for a single design token by name: hex value, CSS custom property or Sass map usage, section context, and which Figma components reference this token.

ParameterTypeDescription
name *stringExact token name, e.g. "page-colors/semantic/primary"

explain_token_diff

Explain differences between two design tokens including value comparison, role context, and Figma-derived descriptions.

ParameterTypeDescription
tokenA *stringFirst token name (example: "page-colors/primary/40")
tokenB *stringSecond token name (example: "page-colors/primary/90")

list_figma_styles

List synced Figma styles (TEXT, FILL, EFFECT, GRID) with resolved values when available.

ParameterTypeDescription
typestringOptional style type filter

suggest_component

Describe what UI behaviour or pattern you need in plain English and get the top DS component suggestions with use-case guidance, code snippets, and Figma links. Ideal when you do not know which component to use.

ParameterTypeDescription
description *stringPlain-language description of what you need, e.g. "I need a loading skeleton while data fetches" or "show a confirmation dialog".

audit_component

Run a quality/completeness audit on a DS component and get a scored report (0–100) covering documentation coverage, input/output typing, accessibility notes, Figma mapping, standalone status, and more.

ParameterTypeDescription
name *stringComponent name or selector, e.g. "onemrva-mat-avatar"

compare_components

Compare two DS components side by side: inputs, outputs, accessibility features, Figma mappings, and use-case guidance. Useful when choosing between similar components.

ParameterTypeDescription
nameA *stringFirst component name or selector
nameB *stringSecond component name or selector

get_color_palette

Browse the DS color palette from synced Figma tokens. For each tone shows the hex value, CSS custom property, and WCAG contrast ratios against white and black (AA/AAA grades). Filter by role (e.g. "primary", "neutral").

ParameterTypeDescription
rolestringOptional color role to filter by, e.g. "primary", "neutral", "error". Omit to see all roles.

migrate_to_ds

Single-file migration analyzer. Returns a complete plan: setup prerequisites (npm install + provider + theme class), DS replacement mapping, ready-to-paste snippets, imports to ADD/REMOVE from @Component imports[], TypeScript handler/subscription rewrites, and SCSS hints. Two equivalent input shapes — pick whichever feels natural: { code, ts_code, scss_code } OR { html, typescript, scss }. The HTML/code field is required; the others are optional.

ParameterTypeDescription
codestringAngular template HTML to analyse (canonical name). Alias: `html`. One of `code`/`html` is required.
htmlstringAngular template HTML to analyse (alias for `code`). Use either `code` or `html` — both work identically.
scssstringOptional SCSS/CSS file content (alias for `scss_code`).
scss_codestringOptional SCSS/CSS file content. Alias: `scss`. When provided, the tool flags hardcoded colours and suggests DS token replacements (--mat-sys-* and DS-specific tokens).
ts_codestringOptional TypeScript component class (.ts file content). Alias: `typescript`. When provided, the tool emits handler-signature fixes and reactive subscription patterns specific to your class.
typescriptstringOptional TypeScript component class (alias for `ts_code`).

migrate_file

One-call migration. Takes ANY file from an Angular component triple (foo.component.ts / .html / .scss / .css) and auto-resolves the sibling files before running migrate_to_ds. Saves 3-4 read roundtrips per file. Use this when migrating a known component file; use `migrate_to_ds` directly when you only have inline snippets.

ParameterTypeDescription
filePathstringAbsolute or cwd-relative path to one file of the component triple. The other siblings (same basename, .ts/.html/.scss) are read automatically if present. Example: "projects/test/src/app/x/x.component.…
pathstringAlias for `filePath`. Either name works.

analyze_repo_migration

Use first for repo-scale migration and quality checks. Reports Material/custom patterns to migrate, DS misuse (missing required inputs, deprecated components), and a file-by-file Copilot fix-pack.

ParameterTypeDescription
includeCopilotFixPackbooleanOptional flag to include Copilot file-by-file remediation prompts (default: true).
includePatternsarrayOptional glob patterns to include (default: ["**/*.html", "**/*.ts"]).
maxFilesnumberOptional scan limit (default: 800, min: 50, max: 5000).
maxFixFilesnumberOptional number of files to include in the Copilot fix-pack (default: 10, min: 1, max: 30).
rootPathstringOptional repository root path. Defaults to current working directory.

rescan_components

[Admin] Re-scan all design system source files and reload component metadata. Use after code changes have been deployed.

get_release_notes

Show the design system release notes, most recent first (5 per page). Each entry explains exactly what shipped: affected entry points plus the style values, config values, ARIA attributes and public members its diff changed. Pass `version` for a single release, or `page` to go back in time.

ParameterTypeDescription
pagenumberPage number, 1-indexed (5 releases per page). Defaults to 1 (latest).
versionstringOne release only, e.g. "22.8.1" or "v22.8.1". Takes precedence over `page`.

angular_migration_guide

Guide upgrading a project to the Angular version the design system targets. Read `@angular/core` from the project's package.json and pass it as `currentAngularVersion`; returns the ng update path, the official update guide, and the DS compatibility.

ParameterTypeDescription
currentAngularVersionstringThe project's current Angular version (from its package.json @angular/core), e.g. "17" or "17.3.0".

lint_ds_usage

Lint an Angular template that uses the design system and report usage bugs before the compiler does: missing required inputs, unknown inputs/outputs (with did-you-mean), invalid enum values, leftover Angular Material, and unknown DS selectors.

ParameterTypeDescription
html *stringThe Angular template markup to lint.
typescriptstringOptional component class, used only to resolve bound property names.

review_implementation

Quality gate for code you just wrote or changed. Reports custom CSS that a spacing utility class already covers, hard-coded px and hex values, stylesheets that restyle design system internals or pierce encapsulation, inline style attributes, and templates that have grown into a monolith. Run it after implement_figma_design, alongside lint_ds_usage.

ParameterTypeDescription
htmlstringThe component template.
scssstringThe component stylesheet. The most important input: most findings come from here.
tsstringOptional component class, used for size signals.

generate_form

Scaffold a complete design system form from a field spec. Default JSON Forms mode emits schema + uischema + the renderers to register; reactive mode emits a FormGroup + template. Routing to iban/phone/ssin/date/select renderers is handled automatically.

ParameterTypeDescription
fields *arrayFields: [{ name, dataType: "string"|"number"|"boolean"|"date"|"enum", label?, required?, readonly?, format?: "iban"|"phone"|"ssin", enumOptions?: string[] }].
modestring"jsonforms" (default) or "reactive".
titlestringOptional form title.

get_started

Zero-to-first-component quickstart: required Angular version, install command, the correct import for a first component, and a working snippet. Ideal when integrating the design system into a new or existing project.

ParameterTypeDescription
componentstringFirst component to scaffold (defaults to a simple one).
packageManagerstringnpm (default), yarn, or pnpm.

explain_component

Plain-language explanation of one component: what it is, when to use it, its required inputs, whether a demo exists, and which sibling components to consider instead. Great for choosing the right component.

ParameterTypeDescription
name *stringComponent name or selector.

ds_upgrade_guide

One-call guide to upgrade a project stuck on an older design system: the Angular upgrade path to the DS target, the DS package bump, breaking changes pulled from the release notes since the project version, and a pointer to lint_ds_usage to catch broken component usage.

ParameterTypeDescription
currentAngularVersionstringThe project's current Angular version, e.g. "17" (for the ng update path).
currentDsVersionstringThe project's current @onemrvapublic/design-system version, e.g. "20.7.0" (used to list what changed since).

ds_install

Repo-aware install & configuration plan the AI agent should APPLY DIRECTLY (run the commands, make the file edits), not just print. Pass the project's package.json (and optionally angular.json). Returns an ordered action plan: the Angular-matched install command pinned to a published dist-tag (never a bare @latest), the required peer-dependency install command, the SCSS theme setup, the app.config providers, the index.html theme class, and a confirmation page that renders real DS components. Fonts and Material Icons load automatically from the internal CDN via the theme (corporate network requ…

ParameterTypeDescription
packageJson *stringThe raw contents of the project's package.json (the hosted server cannot read your files).
angularJsonstringOptional: the project's angular.json, for styles setup.
packageManagerstringOptional override: npm, yarn, or pnpm.

implement_figma_design

Call this FIRST, before any other tool and before writing code, whenever the user pastes a figma.com link, a frame, a mockup or a screenshot. It does not matter whether they say what to do with it: a bare Figma link on its own is enough. Triggers on messages like "Implement this design from Figma <link>", "build this screen", "recreate this page", or a message that is only a Figma URL. Returns the workflow to follow: how to read the frame, how to map every layer to a nemo Design System component, which tools to call in which order, and the rules (no raw Angular Material, no hard-coded colours…

ParameterTypeDescription
figmaUrlstringThe Figma frame link the user pasted, if any.
notesstringAnything else the user said about the screen.
screenstringWhat the screen is, e.g. "claims intake step 2".