HIG Doctor

# hig-mcp MCP server for the HIG Doctor skills corpus and audit engine. Node 22+ or Bun. ```bash 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: ```json { "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](https://developer.apple.com/design/human-interface-guidelines/) 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](https://github.com/raintree-technology/hig-doctor#readme), [rule catalog](https://github.com/raintree-technology/hig-doctor#framework-coverage), [security policy](https://github.com/raintree-technology/hig-doctor/blob/main/SECURITY.md) and [changelog](https://github.com/raintree-technology/hig-doctor/blob/main/CHANGELOG.md). MIT licensed. Apple HIG content is © Apple Inc.; see [THIRD_PARTY_NOTICES.md](https://github.com/raintree-technology/hig-doctor/blob/main/THIRD_PARTY_NOTICES.md).