Design Constraint Validator logo

Design Constraint Validator

Validates design tokens for WCAG contrast, scales, thresholds, dependencies, and other design-system constraints over MCP.

Install Design Constraint Validator

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "design-constraint-validator": {
      "command": "npx",
      "args": [
        "-y",
        "design-constraint-validator"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

Design Constraint Validator MCP server exposes a design-token constraint engine to MCP-compatible AI agents over stdio. It accepts inline token and constraint data or file paths, then returns structured JSON for validation, provenance, dependency graphs, active constraints, explanations, and verified fix suggestions. Reach for it when an agent needs to check accessibility or mathematical relationships between tokens rather than only validate schema shape. The server is read-only and does not apply suggested changes.

Use cases

  • Validate token contrast against WCAG ratios
  • Inspect why a token violates a design constraint
  • Export token dependency relationships for graphing
  • Find breaks in typography or spacing scales
  • Suggest values that satisfy supported constraints

Key features

  • WCAG contrast validation
  • Monotonic order and lightness checks
  • Threshold and cross-axis constraints
  • Token provenance and dependency analysis
  • Structured JSON MCP responses
  • Read-only verified fix suggestions

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

27/27 checks healthy over the last 111d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 9d ago via OSV.dev · design-constraint-validator (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads355Package downloads in the last 30 days.
Last commit5mo agoMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Design Constraint Validator works

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:

config.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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Design Constraint Validator

Design Constraint Validator is an MCP server that connects MCP-compatible AI agents to the Design Constraint Validator engine for checking design tokens against constraints. Its main tools are validate, why, graph, list-constraints, explain, and suggest-fix. They return JSON and do not modify token files.

Install the npm package or configure `npx` to run its `dcv-mcp` binary. Use `npx -y --package design-constraint-validator dcv-mcp` in the MCP server command, and run it with Node.js 18 or newer.

Yes, Design Constraint Validator can be added to Claude Desktop as an MCP server. Configure a server entry whose command is `npx` and whose arguments invoke the package's `dcv-mcp` binary.

No, it only returns suggestions and does not write changes. The `suggest-fix` tool computes a verified satisfying value for supported WCAG, threshold, or monotonic-boundary violations, leaving application of that value to the user or another process.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewDesign Constraint Validator AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/design-constraint-validator?style=directory)](https://allmcps.com/mcp/design-constraint-validator)
HTML Embed
<a href="https://allmcps.com/mcp/design-constraint-validator"><img src="https://allmcps.com/api/badge/design-constraint-validator?style=directory" alt="Design Constraint Validator on AllMCPs" /></a>