mcp-server

v1.24.0
@nysds/mcp-server Checked 16 hours ago Published 4 days ago

MCP server for the New York State Design System.

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

find_components

Search for NYSDS components by name or description. Omit query to list all components.

ParameterTypeDescription
querystringSearch query to match against component names and descriptions. Omit to list all components.

get_component

Get full documentation for a specific NYSDS component including properties, events, slots, and CSS custom properties. Set framework to 'react', 'angular', or 'vue' to get that framework's import line, event naming, and forms guidance alongside HTML/React/Angular code examples.

ParameterTypeDescription
tagName *stringThe tag name of the component (e.g., 'nys-button')
frameworkstringWhich framework to optimize the response for. 'html' (default) returns plain custom-element usage. 'react', 'angular', and 'vue' add framework-specific usage notes (import line, event naming, forms bi…
includeExamplesbooleanInclude code examples from component JSDoc. Set to true when you need usage patterns. Each example carries html, react, and angular snippets.

find_tokens

Search or browse NYSDS design tokens. Omit query to list all. Returns CSS variable names for use with var(). Tokens that change by agency theme are marked themed; pass theme (or name one in the query, e.g. "health") to get their value in that theme.

ParameterTypeDescription
categorystringFilter by category
includestring'recommended' (default) excludes color primitives (the raw palette, e.g. --nys-color-blue-600) and reports how many it hid in `hidden`; 'primitive' returns only primitives; 'all' returns everything
querystringFree-text search across token names and descriptions; every word must match ("theme mid"). A theme name ("health") matches the tokens that change in that theme. Omit to list all.
themestringAgency theme (default, admin, business, environment, health, local, safety, transportation), or 'all'. Adds each themed token's value in that theme.

get_token

Get full details for a specific design token including resolved values and alternatives. For a token that changes by agency theme, returns its value in every theme; for a palette primitive, lists the theme tokens that use it.

ParameterTypeDescription
token *stringCSS variable name (e.g., "--nys-color-text", "nys-color-text", "color-text", or "var(--nys-color-text)")
themestringAgency theme (default, admin, business, environment, health, local, safety, transportation). Sets cssValue and resolvedValue to that theme's value.

get_token_graph

Get the token dependency graph showing which tokens reference which and which are used by which. Themed tokens list their reference in every agency theme (themeReferences), and palette primitives list the theme tokens that use them (usedByThemes).

ParameterTypeDescription
categorystringFilter to a specific category
filterstringFilter the graph to specific token types
limitintegerMaximum number of tokens to return (default: 20)

validate_component_api

Validate that the provided attributes/properties are valid for a given NYSDS component. Checks names (case-insensitive, like HTML), enum values, and nys-* event bindings. HTML global attributes (class, style, slot, aria-*, data-*) are accepted. Lit binding prefixes (.prop, ?attr, @event) are understood.

ParameterTypeDescription
attributes *objectObject of attribute names and values to validate
tagName *stringThe tag name of the component (e.g., 'nys-button')

get_utility_classes

Get the NYSDS utility class reference: display, flexbox (including order), float, grid, margin & padding, opacity, overflow, position, responsive breakpoint prefixes, typography, and z-index. Each category says whether its classes support breakpoint prefixes. These classes require the full @nysds/styles install (@nysds/styles/full); the default @nysds/styles install has CSS variables only.

ParameterTypeDescription
categorystringCategory of utility classes to retrieve. 'spacing' is margin & padding; 'flex' includes order; 'responsive' lists every utility that supports breakpoint prefixes. Defaults to 'all'.

get_guide

Get NYSDS guides for installation, forms, styles, fonts, page structure, themes, icons (the built-in icon names and registering another icon library), or framework setup

ParameterTypeDescription
topic *stringThe guide topic to retrieve
frameworkstringOnly applies with topic 'installation': returns that framework's setup guide instead of the general installation guide. Ignored for other topics.