Agent tooling
MiHCM ships agent tooling in two layers:
- Maintainer tooling for agents working inside this repository.
- External developer tooling for agents building product screens from the published packages, hosted MCP endpoint, docs, and examples.
Use skills for process. Use MCP for live facts.
This page is the source of truth for hosted MCP setup, downloadable .skill files, client-specific install steps, one-click links, setup verification, and installer security. External developer onboarding links here instead of repeating agent setup instructions.
What ships
Maintainer skill — .claude/skills/mihcm-design-system/
The maintainer skill is the repository playbook. It points agents to the universal-component contract, token rules, AI-UI safety rules, wiki protocol, and verification loop.
External skill pack — skills/
These skills are safe to share with community or partner developers:
| Skill | Use |
|---|---|
mihcm-design-system | Query MCP/docs first, then use published packages and semantic tokens. |
mihcm-frontend-build | Wire MiHCM into Next.js, Vite, or Expo consumer apps. |
mihcm-component-review | Review component work against accessibility, token, AI-UI, and security rules. |
mihcm-brand | Apply the MiHCM brand family, logo variants, marketing typography, and brand-safe asset rules. |
@mihcm/mcp — src/packages/mcp/
The MCP package is the live tool layer. It exposes component search, component details, examples, pattern lookup, token lookup, descriptor validation, semantics/accessibility review, frontend snippet review, client/server boundary checks, contract checks, and recent wiki log lookup.
Together, the skills and MCP answer the two questions agents need before touching the design system:
- What is the rule for this kind of work?
- What does the repo currently contain?
Build the MCP server
Run from the monorepo workspace:
cd src
pnpm install
pnpm --filter @mihcm/mcp buildThe built server entry is:
src/packages/mcp/dist/index.jsRebuild after changing src/packages/mcp/src/**.
Use the hosted MCP
The docs site also exposes the same tools as a remote Streamable HTTP endpoint:
https://designsystem.mihcm.com/mcpRemote clients can register it as an HTTP MCP server:
claude mcp add --transport http mihcm https://designsystem.mihcm.com/mcpThe hosted endpoint is stateless and JSON-response only. It is meant for component metadata, token lookup, descriptor validation, contract checks, and recent design-system log entries. Source-code output is disabled on the hosted route even if a client asks for includeSource.
Install MCP and skills
Use the hosted MCP and the matching skill files together. MCP gives the agent current design-system facts; skills tell the agent how to apply those facts safely.
| Client | MCP install | Skill install |
|---|---|---|
| Claude Code | claude mcp add --transport http mihcm https://designsystem.mihcm.com/mcp or download config | Download the .skill files below, or use the raw SKILL.md links when your setup expects folders. |
| Codex | codex mcp add mihcm --url https://designsystem.mihcm.com/mcp or download config | Download the .skill files below, then place the needed skills in the Codex skills directory. |
| Cursor | One-click install or download MCP config | Download Cursor rule. |
| VS Code | One-click install, code --add-mcp '{"type":"http","name":"mihcm","url":"https://designsystem.mihcm.com/mcp"}', or download MCP config | Download VS Code instructions. |
| VS Code Insiders | One-click install or code-insiders --add-mcp '{"type":"http","name":"mihcm","url":"https://designsystem.mihcm.com/mcp"}' | Use the same VS Code instruction file. |
Skill install guide
For most users, download the .skill file for the workflow they need. Install mihcm-design-system first; add the other skills only when the task matches.
Design system skill
Use for MiHCM UI implementation, token rules, component selection, MCP checks, and AI-UI validation.
Frontend build skill
Use when setting up a Next.js, Vite, or Expo app with MiHCM packages, MCP, theme CSS, and enforcement.
Component review skill
Use for component audits covering accessibility, docs, Storybook, AI-UI, MCP metadata, and release readiness.
Brand skill
Use for logos, brand assets, marketing pages, typography, presentations, documents, and visual brand QA.
Use .skill archives when the client supports bundled skill imports. Use raw SKILL.md files when the client expects a directory with SKILL.md. The skill pack manifest remains available for automation and internal tooling, but users should start with the buttons above.
Claude Code
- Install MCP:
claude mcp add --transport http mihcm https://designsystem.mihcm.com/mcp- Download the needed skill archive or raw skill folder from
/downloads/skills/. - Place each skill in the Claude Code skills directory used by your workspace or user profile.
- Keep
mihcm-design-systeminstalled by default. Addmihcm-frontend-buildfor project setup,mihcm-component-reviewfor audits, andmihcm-brandfor logo or marketing work. - Verify with
claude mcp list, then ask Claude Code to callmihcm_get_agent_setup({ "client": "claude-code" }).
Codex
- Install MCP:
codex mcp add mihcm --url https://designsystem.mihcm.com/mcp- Or download mihcm-codex-config.toml and merge it into the Codex MCP config.
- Install raw skill folders or
.skillarchives into the Codex skills directory for the current workspace or user profile. - Verify with
codex mcp listandcodex mcp get mihcm --json. - Run an agent check by asking Codex to call
mihcm_search_componentsbefore writing UI,mihcm_review_semantics_accessibilityfor semantic/a11y review, andmihcm_review_frontend_snippetbefore final output.
Cursor
- Use the Cursor MCP one-click link above or download mihcm-cursor-mcp.json.
- Add mihcm-cursor.mdc under
.cursor/rules/in the project. - Use the rule for project-wide MiHCM component, token, MCP, AI-UI, and brand constraints.
- Verify in Cursor Settings -> MCP that
mihcmis enabled and tools are visible.
VS Code
- Use the VS Code MCP one-click link above, run
code --add-mcp, or download mihcm-vscode-mcp.json. - Add mihcm-vscode.instructions.md to your workspace instructions.
- Use the same instruction file for VS Code Insiders.
- Verify through the Command Palette: MCP: List Servers, then start
mihcmand confirm tools appear in Copilot agent mode.
Using the skills
| Task | Skill order |
|---|---|
| Build product UI | mihcm-design-system -> MCP component search -> mihcm_review_semantics_accessibility -> MCP snippet review. |
| Start a new consumer app | mihcm-frontend-build -> mihcm-design-system -> CI enforcement guide. |
| Review a component contribution | mihcm-component-review -> mihcm_check_contract -> docs and Storybook checks. |
| Create a marketing page or presentation | mihcm-brand -> logo manifest -> Logo component or approved SVG assets. |
| Render AI-generated UI | mihcm-design-system -> mihcm_validate_descriptor -> renderer allowlist. |
Every skill expects the same safety rule: MiHCM components, MiHCM icons, standard Tailwind utilities, and MiHCM semantic token classes are allowed; hardcoded design values and local primitive forks are not. Every UI task must also pass semantic and accessibility review: real headings and paragraphs, Link for navigation, Button for side effects, labelled fields, image alt text, icon-only labels, keyboard focus, contrast, reduced motion, and 44px touch targets.
Every skill also expects agents to use the approved underlying library through the MiHCM wrapper before adding a dependency:
| Area | Use |
|---|---|
| Forms | Form with TanStack Form. Do not add React Hook Form or @hookform/resolvers. |
| Calendar/date/time | Calendar and DatePicker, both backed by @daypicker/react v10. Do not add react-datepicker. |
| Data grids | DataTable with TanStack Table and optional TanStack Virtual. |
| Command/search | Command, Combobox, and Select before custom listbox logic. |
| Analytics | Chart, SparkChart, BarList, CategoryBar, ProgressCircle, and Tracker. |
| Drag/drop and upload | SortableList and Dropzone. |
| Rich text | RichTextEditor; sanitize stored rich text before display. |
Verify setup
After installation, run these checks:
- MCP server is registered as
mihcm. mihcm_get_agent_setupreturns the client you installed.mihcm_search_componentsreturns component results.mihcm_list_tokensreturns semantic token names.mihcm_review_semantics_accessibilityreturns findings for invalid JSX and passes valid representative JSX.- The agent can explain the approved library path for forms, calendars, data grids, command palettes, charts, drag/drop, uploads, and rich text.
- The relevant skill triggers when you ask for MiHCM UI, project setup, component review, or brand/logo work.
- The agent can explain that hosted MCP is read-only and source-disabled.
If token tools work but component search returns an empty list, the client is reaching the MCP server but the hosted deployment is missing the generated component registry fallback. Redeploy the docs site with the latest @mihcm/mcp build so src/packages/mcp/src/generated-component-registry.ts is included.
For generated install guidance, call:
{
"tool": "mihcm_get_agent_setup",
"input": { "client": "all" }
}Security rules for installers:
- Review the MCP URL and config before accepting a one-click install.
- Do not place package tokens, PATs, bearer tokens, or
.npmrccontents in a downloaded skill file. - Prefer workspace/team config only when every collaborator should use the same server.
- Keep hosted MCP read-only. Use local stdio only for maintainers who need source-oriented metadata.
Wire local MCP into Claude
The repository Claude settings register a local stdio server named mihcm:
{
"mcpServers": {
"mihcm": {
"type": "stdio",
"command": "node",
"args": ["./src/packages/mcp/dist/index.js"]
}
}
}Restart Claude after the first build. The local server reads the checked-out repository and may return source-oriented metadata.
Share with external developers
External developers do not need repository access to use the design system facts:
- Register the hosted MCP endpoint.
- Install the external skill pack from
skills/. - Add
mihcm-brandwhen the work includes logos, brand pages, marketing layouts, documents, or presentations. - Use the external onboarding guide at
/getting-started/external-developersfor registry, package, framework, and import setup. - Use package access from
/getting-started/registry-access.
The hosted endpoint is intentionally narrower than local stdio. It returns design-system metadata, docs snippets, tokens, and validation results, but source-code output is disabled.
Daily workflows
Before adding a component
Search first with mihcm_search_components. If something close exists, extend or compose it before creating a new primitive.
Before editing a component
Inspect it with mihcm_get_component. That returns source paths, wiki coverage, story coverage, AI-UI schema hints, and parsed variant or size options where available.
Before rendering model output
Validate the descriptor with mihcm_validate_descriptor. It uses the same Zod schema as @mihcm/ai-ui, so the MCP check and renderer share one source of truth.
Before building in a consumer app
Use mihcm_list_components, mihcm_get_component_examples, and mihcm_search_patterns to pick existing primitives and compositions before writing JSX.
Before finalizing consumer JSX
Use mihcm_review_frontend_snippet. It combines import checks, token checks, local primitive checks, native control warnings, and Next.js client/server boundary heuristics.
Before claiming a primitive is done
Run mihcm_check_contract. It audits the §7 requirements: source, platform variant, Storybook story, AI-UI schema/allowlist, docs page, and index coverage.
Tool reference
| Tool | Returns |
|---|---|
mihcm_search_components | Matching primitives from the registry. |
mihcm_get_component | Paths, artifact presence, docs preview, variants, and sizes for one primitive. |
mihcm_list_components | Filtered primitive catalog with platform and artifact metadata. |
mihcm_get_component_examples | Docs paths, example previews, usage guidance, and live example exports. |
mihcm_search_patterns | Recommended MiHCM app compositions. |
mihcm_get_component_matrix | Web/native/story/wiki/AI-UI coverage matrix. |
mihcm_list_tokens | Semantic token names by kind: color, spacing, radius, typography, motion, or all. |
mihcm_validate_descriptor | A pass/fail result from the live AI-UI descriptor schema. |
mihcm_validate_component_usage | JSX/TSX usage review for imports, tokenization, and primitive policy. |
mihcm_audit_tokens | Token-only audit for hardcoded visual values. |
mihcm_check_client_server_boundary | Next.js RSC boundary review. |
mihcm_review_frontend_snippet | Combined frontend review with score and required actions. |
mihcm_get_agent_setup | Client-specific MCP commands, one-click links where supported, config files, and skill download guidance. |
mihcm_get_installation_guide | Setup guide by target runtime and enforcement mode. |
mihcm_get_versions | Current package versions. |
mihcm_get_changesets | Pending changeset previews. |
mihcm_get_security_rules | MCP and design-system security rules. |
mihcm_check_contract | Pass/fail checks for the universal-component contract. |
mihcm_recent_log | Recent entries from docs/log.md. |
MiHCM-only enforcement
MCP review is advisory unless the consumer project wires it into local checks. For a strict Next.js project:
- Install
@mihcm/mcpas a dev dependency. - Add
mihcm-design-system-check app components srcto CI. - Block non-MiHCM UI imports in ESLint.
- Protect
mainso the checker must pass.
Full guide: MiHCM-only Next.js enforcement.
Verification loop
Agent-assisted changes still use the normal repo gate from src/:
pnpm build
pnpm typecheck
pnpm lint
pnpm testUpdate the wiki after source changes: docs/index.md, docs/log.md, MEMORY.md, and tasks/gotchas.md when a new lesson should be remembered.
Versioning
@mihcm/mcp is publishable through public npm. The current package is installed without consumer registry tokens.
Use a changeset for any user-facing MCP change:
cd src
pnpm changesetChoose @mihcm/mcp. New tools or request/response changes are minor before 1.0; same-contract bug fixes are patch. Changesets generates src/packages/mcp/CHANGELOG.md in the Version Packages PR.
Security boundary
The MCP server must stay deterministic and repo-bounded, whether it runs locally or on Vercel:
- It reads known repo files only.
- It never evaluates model output.
- It never imports a model-supplied component path.
- It never logs secrets or user prompts.
- Descriptor validation stays anchored to the schema-only
componentDescriptorSchemaexport.
The hosted route also rejects unsupported methods, caps request body size, validates host/origin headers, and can require Authorization: Bearer <token> when MIHCM_MCP_BEARER_TOKEN is configured in Vercel.
Full operational guides: