npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@axaraaudit/mcp-server

v0.3.0

Published

AxaraAudit MCP server: design-token rules, RGAA validation, project audit & drift auto-fix for AI agents (stdio, JSON-RPC 2.0)

Readme

@axaraaudit/mcp-server

AxaraAudit Model Context Protocol server — JSON-RPC 2.0 over stdio, built on the official @modelcontextprotocol/sdk. It lets an AI agent generate UI code that is token-correct and RGAA-accessible by construction, audit a whole project, and apply safe design-token fixes — through the exact same core pipeline as the axaraaudit CLI, so scores and findings are identical across surfaces.

Register in an MCP client

One-liner for Claude Code:

claude mcp add axara -- npx -y @axaraaudit/mcp-server

Or in any MCP client config:

{
  "mcpServers": {
    "axara": {
      "command": "npx",
      "args": ["-y", "@axaraaudit/mcp-server"],
      "env": { "A11YENGINE_TOKENS": "/abs/path/design-tokens.dtcg.json" }
    }
  }
}

The A11YENGINE_TOKENS variable is optional — without it the server discovers design-tokens.dtcg.json (and friends) in the working directory, and project-level tools fall back to the zero-config CSS custom-properties extraction, exactly like the CLI.

System prompt

The server ships an accessibility system prompt as MCP instructions (surfaced to clients on initialize) and as a callable prompt (accessibility_engineer). In short: never hard-code colors/spacing — reference design tokens via var(--token) — always provide accessible names and required ARIA, validate before delivering, and use the project tools to audit and remediate an existing codebase.

Tools

Every tool declares an outputSchema (results are returned as validated structuredContent) and MCP behavior annotations: all tools are read-only and idempotent except fix_drift, which writes files when — and only when — write: true is passed.

get_design_system_rules (read-only)

Reads the project's DTCG tokens and returns them with their ready-to-use var(--token) reference, grouped by category. Input: { tokensPath?: string } (else $A11YENGINE_TOKENS or auto-discovery).

validate_component_code (read-only)

Normalizes a React/Vue/HTML snippet to HTML, runs the RGAA (axe-core) audit on its structure, checks design-token drift (React), and returns a conformance verdict plus an Ara declaration. Input:

{
  code: string;
  framework?: 'react' | 'vue' | 'html' | 'auto'; // default: auto-detect
  tokensPath?: string;
  checkDrift?: boolean;                            // default: true
  scope?: 'component' | 'page';                    // default: component
}

scope: 'component' disables page-level rules (h1, landmarks, skip-link) that don't apply to an isolated fragment.

audit_project (read-only)

Runs the full AxaraAudit pipeline (token drift + RGAA) on a project directory and returns the 0–100 conformity score, the CI-gate verdict, and the worst findings first. The response is deliberately compact (maxDriftIssues / maxRgaaFindings, default 30 each) to preserve the agent's context window — the untruncated payload is available through the axara://report/latest resource. Input: { projectDir?, configPath?, tokensPath?, skipRgaa?, maxDriftIssues?, maxRgaaFindings? }.

fix_drift (writes files when write: true)

Applies the mechanical, position-verified design-drift fixes (#6366f1var(--color-brand-primary)). Dry-run by default: nothing touches disk unless write: true. includeNearMatches: true also applies close-but-not-exact values above minConfidence (default 0.7). RGAA issues are never auto-fixed — they need a human (or generation-time) decision. Input: { projectDir?, configPath?, tokensPath?, write?, includeNearMatches?, minConfidence? }.

explain_rule (read-only)

Returns an RGAA 4.1 criterion's metadata — theme, official wording, WCAG 2.1 references — and the axe-core rules mapped onto it. Pass a bare theme number ("11") to list every covered criterion of that theme. Input: { criterion: string }.

Resources

| URI | Content | |---|---| | axara://design-tokens | The raw DTCG token document (source of truth). | | axara://config | The resolved .auditorrc.json (defaults included). | | axara://report/latest | Full payload of the session's last audit_project run. |

Suggested agent workflow

  1. get_design_system_rules → generate code referencing var(--token).
  2. validate_component_code on each produced component → fix → re-validate.
  3. audit_project for a whole-codebase score; explain_rule to dig into any criterion.
  4. fix_drift (dry-run) → show the preview → fix_drift { write: true }.

Run from source

pnpm --filter @axaraaudit/mcp-server build
node packages/mcp-server/dist/index.js          # speaks JSON-RPC on stdio
node packages/mcp-server/scripts/stdio-smoke.mjs # end-to-end demo