mcp-server
v1.24.0MCP 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.
| Parameter | Type | Description |
|---|---|---|
query | string | Search 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.
| Parameter | Type | Description |
|---|---|---|
tagName * | string | The tag name of the component (e.g., 'nys-button') |
framework | string | Which 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… |
includeExamples | boolean | Include 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.
| Parameter | Type | Description |
|---|---|---|
category | string | Filter by category |
include | string | '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 |
query | string | Free-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. |
theme | string | Agency 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.
| Parameter | Type | Description |
|---|---|---|
token * | string | CSS variable name (e.g., "--nys-color-text", "nys-color-text", "color-text", or "var(--nys-color-text)") |
theme | string | Agency 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).
| Parameter | Type | Description |
|---|---|---|
category | string | Filter to a specific category |
filter | string | Filter the graph to specific token types |
limit | integer | Maximum 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.
| Parameter | Type | Description |
|---|---|---|
attributes * | object | Object of attribute names and values to validate |
tagName * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
category | string | Category 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
| Parameter | Type | Description |
|---|---|---|
topic * | string | The guide topic to retrieve |
framework | string | Only applies with topic 'installation': returns that framework's setup guide instead of the general installation guide. Ignored for other topics. |