@corva/ui 3.58.0-1 → 3.58.0-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/MCP_README.md CHANGED
@@ -8,6 +8,7 @@ supports Claude Code, Cursor, and Codex CLI.
8
8
  - [Overview](#overview)
9
9
  - [Available Tools](#available-tools)
10
10
  - [Usage](#usage)
11
+ - [Available Prompts](#available-prompts)
11
12
  - [Setup](#setup)
12
13
  - [Quick Setup](#quick-setup)
13
14
  - [Local Setup (Recommended)](#local-setup-recommended)
@@ -21,7 +22,9 @@ supports Claude Code, Cursor, and Codex CLI.
21
22
 
22
23
  ### Available Tools
23
24
 
24
- - `search_corva_ui` - Search components, hooks, utils by name or description
25
+ - `search_corva_ui` - Search components, hooks, utils by name or description. When the requested `category` (`v2` or
26
+ `v1`) has no match, the response surfaces a labeled fallback block from the other version so a single search still
27
+ discovers a candidate.
25
28
  - `get_component_docs` - Get detailed component documentation with props and examples
26
29
  - `get_hook_docs` - Get hook documentation
27
30
  - `get_theme_docs` - Get theme/styling documentation
@@ -41,6 +44,38 @@ No special keywords required. The AI automatically uses these tools when you ask
41
44
 
42
45
  Mentioning `@corva/ui`, component names, or asking about the design system triggers the MCP automatically.
43
46
 
47
+ ### Available Prompts
48
+
49
+ MCP prompts are surfaced as slash commands in clients that support them. In Claude Code they appear under
50
+ `/mcp__corva-ui__<name>`.
51
+
52
+ - `figma_to_code` — Translate a Figma node into React components that follow `@corva/ui` conventions. Orchestrates the
53
+ Figma Dev Mode MCP (for design context and Code Connect mappings) and the `@corva/ui` MCP tools above (for component,
54
+ icon, theme, and hook lookups).
55
+
56
+ **Argument** (optional; the assistant asks if missing):
57
+
58
+ - `input` — Freeform request. Paste the full Figma node URL (e.g.
59
+ `https://www.figma.com/design/<fileKey>/...?node-id=<nodeId>`) together with any extra context: target path or
60
+ directory in the app, an existing file to extend, naming preferences, edge cases. The assistant extracts the URL
61
+ itself.
62
+
63
+ > A single freeform argument is intentional: Claude Code's MCP-prompt bridge splits positional string arguments on
64
+ > whitespace, so a multi-arg schema would only capture the first token of each.
65
+
66
+ **Example invocation** (Claude Code):
67
+
68
+ ```
69
+ /mcp__corva-ui__figma_to_code https://www.figma.com/design/ABC/Sample?node-id=1-2 create under src/apps/drilling/RigStatusCard.tsx
70
+ ```
71
+
72
+ **Prerequisite:** the Figma Dev Mode MCP must be enabled in the same client session so the prompt can call
73
+ `mcp__figma__get_design_context`. Enable it via Figma Desktop → Preferences → Enable Dev Mode MCP Server, then restart
74
+ your client.
75
+
76
+ **Scope:** primarily consumer mode — app repos that depend on `@corva/ui` and import from its entry points. Authoring
77
+ mode (inside the `@corva/ui` repo itself) is auto-detected from `package.json` and adjusts output conventions.
78
+
44
79
  ## Setup
45
80
 
46
81
  > **Just generated a fresh project with the latest `create-corva-app`?** MCP is already configured for Claude Code,
@@ -274,7 +309,9 @@ Node lives inside WSL, so where you point the MCP config depends on where the *M
274
309
  "corva-ui": {
275
310
  "command": "wsl.exe",
276
311
  "args": [
277
- "-e", "bash", "-lc",
312
+ "-e",
313
+ "bash",
314
+ "-lc",
278
315
  ". \"$HOME/.nvm/nvm.sh\" && exec corva-ui-mcp"
279
316
  ]
280
317
  }
@@ -396,7 +433,9 @@ lives in WSL, write to `~/.cursor/mcp.json`:
396
433
  "corva-ui": {
397
434
  "command": "wsl.exe",
398
435
  "args": [
399
- "-e", "bash", "-lc",
436
+ "-e",
437
+ "bash",
438
+ "-lc",
400
439
  ". \"$HOME/.nvm/nvm.sh\" && exec corva-ui-mcp"
401
440
  ]
402
441
  }
@@ -467,7 +506,9 @@ Find your global install's path with `npm prefix -g`, then substitute it below:
467
506
  "mcpServers": {
468
507
  "corva-ui": {
469
508
  "command": "node",
470
- "args": ["<npm-prefix>/lib/node_modules/@corva/ui/mcp-server/server.mjs"]
509
+ "args": [
510
+ "<npm-prefix>/lib/node_modules/@corva/ui/mcp-server/server.mjs"
511
+ ]
471
512
  }
472
513
  }
473
514
  }