PluginBench
MCP Server
Active

HIG Doctor MCP Server

io.github.raintree-technology/hig-doctor

Apple Human Interface Guidelines search, lookup, and compliance audits for AI coding agents.

What is the HIG Doctor MCP server?

HIG Doctor is an MCP server that provides structured access to Apple's Human Interface Guidelines with 14 skills and 156 reference topics. It offers six tools for Claude, Cursor, and other AI agents to search HIG content, audit projects for compliance across 14 frameworks, and explain findings—backed by a 431-rule compliance scanner.

HIG Doctor gives AI coding agents native access to Apple's design guidelines through an MCP server, a comprehensive audit CLI, and a skills corpus. Use it to search HIG topics in natural language, audit your codebase for HIG compliance across SwiftUI, UIKit, React, Vue, Flutter, and other frameworks, and get detailed explanations of violations with fix suggestions.

How to install HIG Doctor

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • HIG_SKILLS_DIR

    Optional override for the skills directory. The published package bundles the HIG skills corpus, so this is only needed to point the server at a different or newer local copy.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "hig-doctor": {
      "command": "npx",
      "args": [
        "-y",
        "hig-mcp"
      ],
      "env": {
        "HIG_SKILLS_DIR": "<YOUR_HIG_SKILLS_DIR>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • hig_list_skills — Enumerate skills, descriptions, and reference topics.
  • hig_lookup — Fetch HIG reference markdown by skill and optional topic.
  • hig_search — BM25 full-text search across every reference topic in natural language.
  • hig_audit — Run the HIG compliance audit on a project directory.
  • hig_audit_file — Audit a single file the agent just wrote; returns per-finding fixes.
  • hig_explain_finding — Rule metadata plus an excerpt of the cited HIG reference, by rule ID.

Use cases

  • Search Apple HIG topics by natural language query to get design guidance while coding
  • Audit a SwiftUI, UIKit, React, or Vue project for HIG compliance violations across accessibility, color, typography, and layout
  • Run compliance checks in CI/CD pipelines with SARIF output for GitHub code scanning
  • Get automatic fix suggestions for HIG violations and apply safe mechanical fixes
  • Validate that your app follows Apple's design guidelines for dark mode, Dynamic Type, semantic colors, and accessibility

HIG Doctor MCP server FAQ

What is HIG Doctor?

HIG Doctor is an MCP server that gives AI agents access to Apple's Human Interface Guidelines. It includes a skills corpus of 156 reference topics, six tools for searching and auditing, and a 431-rule compliance scanner across 14 frameworks (SwiftUI, UIKit, React, Vue, Flutter, etc.).

Is HIG Doctor free?

Yes. The MCP server and audit CLI are MIT-licensed for structure and tooling. The HIG content itself is © Apple Inc., but the organization, cross-referencing, and detection rules are open-source.

How do I install it in Claude Desktop or Cursor?

Install via npm: add `"hig-mcp"` to your MCP server config with `command: "npx"` and `args: ["-y", "hig-mcp"]`. For Claude Code, use `/plugin marketplace add raintree-technology/hig-doctor`.

What frameworks does it audit?

It audits SwiftUI, UIKit, AppKit, watchOS, visionOS, React/Next.js, Vue/Nuxt, Svelte, Angular, React Native, Flutter, Jetpack Compose, Android XML, and plain HTML/CSS.

Does it require authentication?

No. The MCP server runs locally with no external dependencies or authentication required.

Can I use it in CI/CD pipelines?

Yes. The audit CLI supports `--json`, `--format sarif` for GitHub code scanning, `--fail-on` severity thresholds, baselines, and a GitHub Action for automated compliance checks on pull requests.

README (reference)

Source of truth, from the repository.

<p align="center"> <img src="brand/hig-doctor-mark.svg" alt="HIG Doctor" width="96" height="96" /> </p>

HIG Doctor

Agent-native Apple Human Interface Guidelines: a structured skills corpus, MCP server, and universal compliance auditor for AI coding agents and developers.

GitHub stars

  • Skills corpus — 14 skills and 156 reference topics covering the complete HIG (foundations, components, patterns, inputs, platforms, technologies). Snapshot dated 2025-02-02; canonical content remains at developer.apple.com/design/human-interface-guidelines.
  • MCP server (hig-mcp) — six tools for Claude Desktop, Cursor, Windsurf, and Claude Code: hig_list_skills, hig_lookup, hig_search (BM25 over every topic), hig_audit, hig_audit_file, and hig_explain_finding. Runs over stdio or streamable HTTP.
  • Audit CLI (hig-doctor) — a 431-rule compliance scanner across 14 frameworks. A regex base tier plus a TypeScript-compiler JSX tier and a Swift structural tier; every finding is tagged with the engine that produced it. Config files, inline suppressions, baselines, SARIF output, and --fix autofixes.
  • Engine (@raintree-technology/hig-doctor-core) — the rule engine, embeddable in your own tooling.

Content is © Apple Inc.; this repository provides organization, cross-referencing, and detection rules for AI agent use. MIT-licensed for structure and tooling.

Production logo files and usage guidance are available in brand/.

Star History

<a href="https://star-history.com/#raintree-technology/hig-doctor&Date"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=raintree-technology/hig-doctor&type=Date&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=raintree-technology/hig-doctor&type=Date" /> <img alt="Star history chart for raintree-technology/hig-doctor" src="https://api.star-history.com/svg?repos=raintree-technology/hig-doctor&type=Date" /> </picture> </a>

Install as a Claude Code plugin

/plugin marketplace add raintree-technology/hig-doctor

Or add as a git submodule into any project's .claude/ directory.

MCP server

The published package bundles the skills corpus, so it runs with no clone:

{
  "mcpServers": {
    "hig-doctor": {
      "command": "npx",
      "args": ["-y", "hig-mcp"]
    }
  }
}

Tools:

ToolPurpose
hig_list_skillsEnumerate skills, descriptions, and reference topics.
hig_lookupFetch HIG reference markdown by skill (and optional topic).
hig_searchBM25 full-text search across every reference topic — ask in natural language.
hig_auditRun the HIG compliance audit on a project directory.
hig_audit_fileAudit a single file the agent just wrote; returns per-finding fixes.
hig_explain_findingRule metadata plus an excerpt of the cited HIG reference, by rule ID.

Every tool returns structured JSON alongside text. For a local checkout, point command/args at bun /abs/path/packages/mcp/src/index.ts. hig-mcp --http [port] serves the same tools over streamable HTTP. HIG_SKILLS_DIR overrides the bundled corpus.

HIG Audit CLI

Scan any project for Apple HIG compliance across SwiftUI, UIKit, AppKit, watchOS, visionOS, React/Next.js, Vue/Nuxt, Svelte/SvelteKit, Angular, React Native, Flutter, Jetpack Compose, Android XML, and plain HTML/CSS — 431 rules across accessibility, color, typography, layout, dark mode, motion, and i18n.

npx hig-doctor <directory>
# or, from a git clone (requires Bun): bun run --cwd packages/cli audit <directory>

Example output:

  HIG Audit: my-app   2 serious

  nextjs · 412 detections · 48 files
  ────────────────────────────────────────────────────────────────────
  Foundations                312  ██████████████░░░░░░  286 good  2 serious
  Layout & Navigation         41  ████░░░░░░░░░░░░░░░░  9 good
  Controls                    24  ░░░░░░░░░░░░░░░░░░░░
  Input Methods               15  ██████████████░░░░░░  11 good
  ────────────────────────────────────────────────────────────────────
  Totals                     412  306 good  2 serious  4 moderate

  Serious issues found — Significant HIG violations degrade UX.

Options

FlagDescription
--exportWrite a full audit report to <directory>/hig-audit.md
--stdoutPrint raw audit markdown to stdout (pipe to an AI for evaluation)
--jsonPrint structured results as JSON, including per-concern fix suggestions
--format sarifEmit SARIF 2.1.0 for GitHub code scanning
--fixApply safe mechanical fixes in place; print unsafe ones as suggestions
--fail-on <severity>Exit 1 if any concern at/above critical, serious, or moderate is found
--config <path> / --no-configUse or skip hig-doctor.config.json
--write-baseline / --baseline <path> / --no-baselineSnapshot, use, or ignore a baseline
--exclude <glob>Skip paths (repeatable; also reads .higauditignore)
--cacheCache per-file results; re-scan only changed files
--helpShow help

Configuration, suppressions, and baselines

A hig-doctor.config.json in the audited project disables rules, remaps severities, ignores globs, and adds per-path overrides (rule IDs are documented in docs/rules.md):

{
  "rules": { "swift/hardcoded-color": "off", "css/*": "moderate" },
  "ignore": ["legacy/**"],
  "overrides": [{ "files": ["marketing/**"], "rules": { "css/outline-none": "off" } }]
}

Inline comments suppress at the source: // hig-disable-next-line swift/hardcoded-color -- brand splash and // hig-disable-file <rule-id> (any comment syntax). hig-doctor --write-baseline snapshots existing concerns into .hig-baseline.json, keyed by content rather than line number, so a CI gate only fails on new violations.

Severity model

Concerns are classified as:

  • critical — accessibility-breaking (missing alt, empty button, user-scalable=no, <video> without captions, etc.)
  • serious — significant UX degradation (div with onClick and no role, positive tabindex, outline: none outside progressive enhancement, onTapGesture without traits, hover-without-focus, autoplay, etc.)
  • moderate — HIG style/best-practice violations (hardcoded colors, deprecated components, !important usage, physical text-align, etc.)

Positive detections (semantic colors, Dynamic Type, accessibility modifiers, focus-visible, reduced-motion support) are tracked and reported but don't affect the gate.

What it detects

The audit scans code, stylesheets, and config files, then categorizes findings across HIG areas:

  • Foundations — semantic vs hardcoded colors, Dynamic Type vs fixed font sizes, dark mode, motion preferences, accessibility labels, focus management, heading hierarchy, landmark regions, touch targets, i18n/RTL support
  • Layout & Navigation — navigation patterns, responsive breakpoints, semantic HTML, adaptive layout, sidebar/tab patterns
  • Controls — buttons, toggles, form elements, interactive controls, labels
  • Content Display — images, collections, tables, cards, accordions, lists
  • Input Methods — keyboard support, gesture handling, form validation, input types, fieldset/legend, autocomplete
  • Interaction Patterns — drag and drop, pull-to-refresh, undo, animations, haptics, error handling
  • Dialogs & Presentations — modals, sheets, alerts, popovers, toasts, tooltips
  • Menus & Actions — dropdown menus, context menus, toolbars, menu roles
  • Search & Navigation — search fields, search roles, page controls
  • Status & Progress — progress indicators, loading states, aria-busy
  • Apple Technologies — WidgetKit, ActivityKit, HealthKit, ARKit, Apple Pay, Sign in with Apple

Context-aware rules: !important inside @media print and prefers-reduced-motion blocks is not flagged. outline: none inside :focus:not(:focus-visible) progressive enhancement is not flagged. Hover rules skip pseudo-element selectors like ::-webkit-scrollbar-thumb. Test/spec files are excluded from scanning.

Supported frameworks

Rule counts are derived from the catalog; the authoritative per-rule breakdown is docs/rules.md.

Apple platforms — checked against Apple's HIG directly:

FrameworkRulesDetection depth
SwiftUI (swift)70Navigation, controls, color, typography, accessibility, dark mode, technologies
UIKit35Deprecated APIs, Dynamic Type, semantic color, Auto Layout, SF Symbols, haptics
AppKit25Windows, toolbars, NSColor/NSFont semantics, materials/vibrancy, accessibility
watchOS13Digital Crown, complications, Always-On luminance, workouts, haptics
visionOS10Volumetric windows, immersive spaces, ornaments, glass materials, spatial gestures

Web and cross-platform — checked against universal accessibility and UI-quality principles that align with the HIG (semantic colors, scalable type, focus visibility, keyboard operability, motion/RTL), not Apple-specific HIG conformance:

FrameworkRulesDetection depth
React / Next.js (web)122a11y (AST-verified for JSX), color tokens, typography, dark mode, responsive, forms
CSS / SCSS25Custom properties, contrast, focus styles, outline, z-index, logical properties, RTL
Vue / Nuxt19Accessibility, navigation, forms, i18n, transitions
Angular17Accessibility (CDK a11y), Material components, forms, i18n
Svelte / SvelteKit14Accessibility, forms, dark mode, motion
Flutter21Semantics, Theme colors/typography, dark mode, i18n
Jetpack Compose28Semantics, color, typography, dark mode, navigation, controls
Android XML18contentDescription, color resources, sp/dp units, touch targets
React Native14accessibilityLabel/Role, color scheme, navigation, gestures

How it works: tiered analysis

Findings come from three tiers, and each finding carries the tier that produced it:

  • regex — the zero-dependency base scanner (comment- and string-aware), always available.
  • swift-structural — walks the chained-modifier expression around each Image(systemName:) / .onTapGesture to drop findings that are already handled, cutting the two highest false-positive Swift heuristics.
  • ast-tsx — parses .tsx/.jsx with the TypeScript compiler to judge a set of a11y rules (missing alt, clickable div/span without role, positive tabIndex), removing false positives from multi-line elements and spread props. Uses the optional typescript dependency; falls back to regex when it's absent.

Precision and recall are measured on an annotated fixture corpus and published in docs/benchmark.md, guarded by CI so regressions surface.

JSON output

--json emits schema 2, with the tool/snapshot versions, config and baseline status, and a per-concern array carrying the rule ID, fix guidance, HIG citation, and a machine-readable suggested edit:

{
  "schemaVersion": 2,
  "toolVersion": "2.0.0",
  "higSnapshot": "2025-02-02",
  "frameworks": ["nextjs"],
  "severities": { "critical": 0, "serious": 2, "moderate": 4 },
  "config": { "path": null, "warnings": [] },
  "baseline": { "path": null, "absorbed": 0, "stale": 0 },
  "concerns": [
    {
      "ruleId": "css/physical-text-align",
      "severity": "moderate",
      "file": "app/hero.css",
      "line": 12,
      "fix": "Use logical text-align (start/end) so text follows writing direction.",
      "hig": "https://developer.apple.com/design/human-interface-guidelines/right-to-left",
      "suggestion": { "before": "  text-align: left;", "after": "  text-align: start;", "safe": true }
    }
  ]
}

GitHub Action

Audit on every pull request, fail on critical violations, and upload SARIF so findings appear as native code-scanning annotations on the exact lines:

permissions:
  contents: read
  security-events: write
steps:
  - uses: actions/checkout@v4
  - id: hig
    uses: raintree-technology/hig-doctor@main
    with:
      directory: .
      fail-on: critical
  - uses: github/codeql-action/upload-sarif@v3
    if: always()
    with:
      sarif_file: ${{ steps.hig.outputs.sarif }}

Outputs: critical, serious, moderate, report (markdown), and sarif. The Action also emits inline ::error/::warning annotations for the top concerns.

Agent-readable surface

The project website serves:

  • /llms.txt — structured index per the llms.txt convention, linking every HIG topic with excerpts.
  • /raw/<slug> — plain-text markdown for each reference topic (scriptable retrieval).
  • /topics/<slug> — HTML pages for humans.

Remotion demo

An animated Remotion video that visualizes audit output with glass-card UI.

cd demos/remotion-hig-doctor
npm install
npm run preview   # preview in browser
npm run render    # out/hig-doctor-showcase.mp4 (1920x1080, 30fps, 21s)

Skills

SkillDescription
hig-foundationsColor, typography, SF Symbols, dark mode, accessibility, layout, motion, privacy, branding, icons
hig-platformsPlatform-specific design for iOS, iPadOS, macOS, tvOS, watchOS, visionOS
hig-patternsUX patterns: onboarding, navigation, search, feedback, drag and drop, modality, settings
hig-inputsGestures, Apple Pencil, keyboards, game controllers, pointers, Digital Crown, eye tracking
hig-technologiesSiri, Apple Pay, HealthKit, ARKit, machine learning, Sign in with Apple, SharePlay
hig-project-contextShared design context document for tailored guidance across skills
hig-components-contentCharts, collections, image views, web views, color wells, lockups
hig-components-controlsPickers, toggles, sliders, steppers, segmented controls, text fields
hig-components-dialogsAlerts, action sheets, popovers, sheets, digit entry views
hig-components-layoutSidebars, split views, tab bars, scroll views, windows, lists, tables
hig-components-menusMenus, context menus, toolbars, buttons, menu bar, pop-up buttons
hig-components-searchSearch fields, page controls, path controls
hig-components-statusProgress indicators, status bars, activity rings
hig-components-systemWidgets, live activities, notifications, complications, app clips, app shortcuts

Skills use progressive disclosure — agents load only the reference files they need.

Repository structure

hig-doctor/
├── .claude-plugin/marketplace.json       # Claude Code plugin manifest
├── brand/                                # Canonical logo, app icon, and usage guidance
├── skills/                                # 14 Agent Skills (SKILL.md + references/)
├── packages/
│   ├── core/                              # @raintree-technology/hig-doctor-core rule engine (scan → detect → categorize → report)
│   ├── cli/                               # hig-doctor audit CLI
│   ├── mcp/                               # hig-mcp MCP server
│   └── skill-validator/                   # Internal skill-structure validator (dev-only)
├── website/                               # Next.js site + llms.txt + /raw endpoints
├── demos/remotion-hig-doctor/             # Animated audit demo
├── docs/                                  # rules.md, benchmark.md (generated), audit notes
├── hig-snapshot.json                      # HIG drift-detection manifest (per-topic content hashes)
├── scripts/
│   ├── hig-drift.ts                       # DocC-JSON drift detection (--seed / --check)
│   ├── generate-rule-docs.ts              # docs/rules.md from the rule catalog
│   ├── generate-benchmark.ts              # docs/benchmark.md from the fixture corpus
│   └── legal-hardening*.ts                # Strip Apple CDN images, insert attribution
└── .github/                              # CI workflows + GitHub social preview

Content maintenance

Skills content is a frozen snapshot dated 2025-02-02. Drift detection is automated: the hig-drift.yml workflow runs nightly, fetches each reference topic as Apple's DocC JSON (developer.apple.com/tutorials/data/...), hashes its text, and diffs against hig-snapshot.json, maintaining a single consolidated "HIG drift report" issue listing every topic whose live content changed. The content rewrite stays human-in-the-loop: refresh the flagged skills/*/references/*.md, then re-seed the manifest with bun scripts/hig-drift.ts --seed. The annual-hig-rescan.yml workflow still opens a broad tracking issue each year after WWDC.

Each reference file carries an attribution block and canonical source URL in its frontmatter. Apple-hosted screenshots have been stripped to reduce IP transfer; retain the source link and open Apple's page when visual context is needed.

Website deployment

Vercel Git integration deploys website from main; preview-branch deployments are disabled. A push is the routine production deployment; do not follow it with a CLI or agent-triggered deployment for the same SHA. Use a direct CLI deployment only after confirming that Git integration failed and no deployment for that SHA is BUILDING or READY.

Contributing

See CONTRIBUTING.md for how to add skills, update reference content after a re-scan, or propose new audit rules.

License

MIT for repository structure, detection rules, tooling (audit CLI, MCP server, validator, scripts), and the Next.js website. Apple HIG text in skills/*/references/ is © Apple Inc.; this repository provides organization and cross-referencing for AI agent guidance only — the canonical source is developer.apple.com.

Related MCP servers

DODocPull logo

DocPull

Active

Sync public web sources into cited context packs for AI agents and RAG pipelines.

25
Python
MIT
View repository →

Preços e ofertas locais em Lages via MCP para consumidores e agentes de IA.

0
View repository →

MCP server for Django project introspection, enabling AI assistants to understand and interact with Django codebases.

110
Python
MIT
View repository →

Cross-LLM persistent memory: store context once, recall it from any AI model.

View repository →

YouTube intelligence layer for AI agents. 41 tools, 10 modules, zero config.

View repository →

Visa requirements, documents, and FAQs for Indian passport holders. 35 countries.

View repository →