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

ux-axioms-mcp

v1.0.2

Published

UX Axioms Model Context Protocol Server

Readme

UX Axioms MCP Server

An MCP server that exposes UX Axioms parsed from database/rules/*.md as Resources and Tools. It supports:

  • STDIO for Kiro / VS Code MCP clients (npx-style launch)
  • Streamable HTTP (SSE) for a simple browser demo

The repo ships CI (lint/build/test) and npm Trusted Publishing (OIDC) to publish securely without classic tokens.

Install & Build

pnpm install   # or: npm install
pnpm build     # or: npm run build

Output is ESM in dist/.

Run via npx (MCP stdio)

Add this to your MCP client (Kiro / VS Code) configuration to match other servers like Snyk:

"ux-axioms": {
  "command": "npx",
  "args": ["-y", "ux-axioms-mcp@latest", "mcp", "-t", "stdio"]
}

Alternate form is also supported:

"args": ["-y", "ux-axioms-mcp@latest", "--stdio"]

Local, without publishing:

pnpm build
npx ux-axioms-mcp@file:. mcp -t stdio
# or
npx ux-axioms-mcp@file:. --stdio

Local Run (direct)

  • STDIO

    pnpm build
    node dist/src/index.js --stdio
  • HTTP + SSE (optional API key auth)

    # .env or environment
    # VALID_API_KEYS=key1,key2
    pnpm build
    node dist/src/index.js
    # -> http://localhost:3000/mcp
    • Auth header: X-API-Key: <key> or query: ?apiKey=<key>
    • A minimal demo page is served from public/

On boot you’ll see which rules directory is used, e.g.:

Axioms: using rules dir: /…/ux-axioms-mcp/database/rules with 45 file(s)

Resources

  • axioms://list – all axioms as JSON
  • axioms://search/{keyword} – filter by title/content/tags

Tools

  • list_axioms({ keyword?: string, limit?: number })
    • List or filter axioms; keyword matches title/content/tags
  • get_axiom({ id: string })
    • Fetch a single axiom by id (file stem)
  • suggest_axioms({ task?: string, component?: string, persona?: string, keywords?: string[], limit?: number })
    • Recommends using axiom tags, related_rules, and curated mappings in database/mappings/*
  • recommend_for_task({ task: string, persona?: string })
    • Curated suggestions via database/mappings/tasks.json
  • prioritize_axioms({ persona: string })
    • Persona-prioritized ordering via database/mappings/personas.json
  • analyze_ui({ html: string })
    • Naive static checks (Fitts’s min size, Hick’s choices, labels, small fonts)
  • generate_spec({ task: string, context?: string, persona?: string })
    • Spec section with axiom-driven constraints and acceptance criteria
  • generate_tests({ framework: 'playwright'|'jest-axe'|'vitest' })
    • Test scaffolds (hit area checks, a11y shell, timing shell)
  • link_patterns({ html?: string, code?: string })
    • Infers tags from patterns and expands to related axioms

Configuration

  • RULES_DIR – optional absolute or repo-relative path to rules (default database/rules)
  • VALID_API_KEYS – optional comma-separated list for HTTP auth

Project Structure

ux-axioms-mcp/
├── src/
│   ├── loader.ts           # Markdown → objects
│   ├── index.ts            # MCP server: resources + tools + transports
│   └── types.ts            # Types
├── scripts/
│   ├── mcp.ts              # npx entry (stdio)
│   └── cli.ts              # Minimal test client
├── public/                 # Minimal web demo (HTTP)
├── database/               # Rules + mapping JSON
├── specs/                  # Design/plan/tasks
├── .github/workflows/      # CI + publish (Trusted Publishing)
└── tsconfig.json

CI/CD (GitHub Actions) & Publishing (npm OIDC)

  • CI: .github/workflows/ci.yml runs install, lint, build, test
  • Publish: .github/workflows/publish.yml publishes on tags v* using npm Trusted Publishing (OIDC)
    • In npm, configure a Trusted Publisher pointing to this repo and workflow path
    • Release steps:
      1. Bump version in package.json
      2. git tag vX.Y.Z && git push origin vX.Y.Z

Enriching rule frontmatter

Metadata like category, evidence_level, validation, tags, related_rules, components, patterns, common_violations, fix_strategies is used by tools such as suggest_axioms and link_patterns.

pnpm build
node dist/scripts/enrich-frontmatter.js

The enrichment augments missing fields but preserves any manually curated values.

Troubleshooting

  • No tools/resources in client:
    • Ensure you launch via npx ux-axioms-mcp@latest mcp -t stdio
    • Look for “UX Axioms MCP Server running on STDIO” in logs
  • Rules directory warnings:
    • Verify RULES_DIR or keep default database/rules
  • Missing dependencies:
    • pnpm install then pnpm build