# Design Constraint Validator [Health: Active]

**Category:** 📂 Browser Automation  
**Repository:** https://github.com/CseperkePapp/design-constraint-validator  
**GitHub Stars:** 0  
**npm Downloads (last month):** 355  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/design-constraint-validator

## Description
Validate design tokens for accessibility, scales, and design-system constraint consistency.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "design-constraint-validator": {
    "command": "npx",
    "args": ["-y","design-constraint-validator"]
  }
}
```

## Documentation

## What Design Constraint Validator MCP server does

The Design Constraint Validator MCP server gives AI agents access to a reasoning-oriented validator for design tokens. It checks relationships between values instead of only checking whether a token has the expected structure or type. Supported checks include WCAG text contrast, perceptual lightness limits, increasing typography or spacing scales, minimum and maximum thresholds, and cross-axis rules such as size, weight, and contrast relationships.

The server is distributed with the `design-constraint-validator` npm package and runs through the `dcv-mcp` binary. It communicates with MCP clients over stdio and returns JSON responses. Tool failures use a structured object containing an error code and message.

## How it works

Inputs can be supplied directly to a tool or loaded from files. Token files use DTCG-style values such as `"$value"`, while constraints can be passed inline or read from a configuration file. When a configuration path is omitted, the underlying validator can discover `dcv.config.json` in the current working directory.

The validator flattens and resolves token data, builds its constraint engine, loads configured rules, runs validation plugins, and reports violations. The `why` tool uses a token ID to return provenance, aliases, dependencies, dependents, and alias-chain information. The `graph` tool returns token nodes and dependency edges, which can be used to produce a dependency visualization outside the server.

The Design Constraint Validator MCP server also separates analysis from modification. `list-constraints`, `explain`, and `suggest-fix` only inspect inputs or calculate results. A suggested value may satisfy a WCAG, threshold, or monotonic-boundary violation, but the server does not write it back to a token file.

## Setup and configuration

Install the package locally with `npm i -D design-constraint-validator`, or invoke the MCP binary without a project install through `npx`:

```json
{
  "mcpServers": {
    "dcv": {
      "command": "npx",
      "args": ["-y", "--package", "design-constraint-validator", "dcv-mcp"]
    }
  }
}
```

Add this entry to a Claude Desktop or other generic MCP client configuration. Node.js 18 or newer is required, and the package uses ESM. The MCP setup itself does not specify environment variables. Token paths and constraint configuration are provided as tool arguments rather than server environment settings.

## Tools and capabilities

- `validate` checks inline tokens or a token file against inline constraints or a configuration file.
- `why` explains one token's origin and relationships; the token ID is required.
- `graph` returns dependency nodes and edges.
- `list-constraints` lists active WCAG pairs, thresholds, order or lightness scales, and cross-axis rules.
- `explain` converts a violation into plain-language text with machine-readable facts.
- `suggest-fix` computes a verified satisfying value for supported WCAG, threshold, or monotonic-boundary violations.

## Limitations and notes

The Design Constraint Validator MCP server does not replace a schema linter; its purpose is validating values and relationships. It does not apply fixes, mutate token files, or provide a tool for writing changes through MCP. Built-in WCAG and threshold defaults may target the package's bundled example token IDs, so projects with different names should configure or disable those defaults as appropriate. Validation results can indicate errors or warnings, and the underlying validator supports nonzero failure behavior when violations are found.

_Full upstream README: https://allmcps.com/mcp/design-constraint-validator/readme_

