HIG Doctor

v0.2.4
io.github.raintree-technology/hig-doctor Checked 11 hours ago Published 3 days ago

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

MCP server for the HIG Doctor skills corpus and audit engine. Node 22+ or Bun. Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json), Cursor, Windsurf and Claude Code all take the same mcpServers entry: From a checkout, use bun /abs/path/packages/mcp/src/index.ts or, after bun run build, node /abs/path/packages/mcp/dist/index.js.

Summary extracted from the README.

hig-mcp

MCP server for the HIG Doctor skills corpus and audit engine. Node 22+ or Bun.

npx hig-mcp              # stdio
npx hig-mcp --http 3845  # streamable HTTP at http://127.0.0.1:3845/mcp

Client config

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json), Cursor, Windsurf and Claude Code all take the same mcpServers entry:

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

From a checkout, use bun /abs/path/packages/mcp/src/index.ts or, after bun run build, node /abs/path/packages/mcp/dist/index.js.

Tools

Tool Purpose
hig_list_skills List skills with descriptions and reference topics.
hig_lookup Return a skill overview, or one topic (skill=hig-foundations, topic=color).
hig_search BM25 search across all topics, e.g. "minimum touch target size".
hig_audit Audit a project directory: severity counts, categories, markdown report, optional fail_on gate. Honors hig-doctor.config.json, .hig-baseline.json and hig-disable comments.
hig_audit_file Audit one file: findings with rule ID, severity, line, fix and HIG link.
hig_explain_finding Rule metadata plus an excerpt of the HIG topic it cites.

Every tool returns structuredContent plus a JSON text mirror. skill and topic must be kebab-case; audit paths must be absolute. Content is an attributed snapshot of Apple's HIG (2025-02-02); the live HIG is canonical.

Skills directory

The npm package bundles the corpus at dist/skills. Set HIG_SKILLS_DIR to use a different copy. Otherwise the server tries the bundled copy, the monorepo skills/, then $PWD/skills.

Limits

Audits are static evidence, not proof of HIG conformance or accessibility. HTTP mode binds to 127.0.0.1, rejects non-loopback Host headers and has no authentication, so any local process can call it, including the audit tools that read files. Prefer stdio.

See the project README, rule catalog, security policy and changelog. MIT licensed. Apple HIG content is © Apple Inc.; see THIRD_PARTY_NOTICES.md.