@corva/ui 3.57.0-3 → 3.57.0-5
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 +515 -0
- package/README.md +18 -6
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/Filter.module.css.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/AdditionalFilterControls/AdditionalFilterControls.js +2 -0
- package/cjs-bundle/components/OffsetWellPickerV5/components/Filter/components/AdditionalFilterControls/AdditionalFilterControls.js.map +1 -0
- package/cjs-bundle/components/OffsetWellPickerV5/stores/picker-props-store/PickerPropsStoreProvider.js +1 -1
- package/cjs-bundle/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.js +1 -1
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.types.d.ts +7 -0
- package/components/OffsetWellPickerV5/OffsetWellPickerV5.types.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/Filter.module.css.js +1 -1
- package/components/OffsetWellPickerV5/components/Filter/components/AdditionalFilterControls/AdditionalFilterControls.d.ts +7 -0
- package/components/OffsetWellPickerV5/components/Filter/components/AdditionalFilterControls/AdditionalFilterControls.d.ts.map +1 -0
- package/components/OffsetWellPickerV5/components/Filter/components/AdditionalFilterControls/AdditionalFilterControls.js +2 -0
- package/components/OffsetWellPickerV5/components/Filter/components/AdditionalFilterControls/AdditionalFilterControls.js.map +1 -0
- package/components/OffsetWellPickerV5/stores/picker-props-store/PickerPropsStoreProvider.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/stores/picker-props-store/PickerPropsStoreProvider.js +1 -1
- package/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.d.ts +3 -1
- package/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.d.ts.map +1 -1
- package/components/OffsetWellPickerV5/stores/picker-props-store/createPickerPropsStore.js +1 -1
- package/mcp-server/server.mjs +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/MCP_README.md
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
# @corva/ui MCP Server
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server that exposes `@corva/ui` component library documentation to AI coding agents. Setup
|
|
4
|
+
supports Claude Code, Cursor, and Codex CLI.
|
|
5
|
+
|
|
6
|
+
## Table of Contents
|
|
7
|
+
|
|
8
|
+
- [Overview](#overview)
|
|
9
|
+
- [Available Tools](#available-tools)
|
|
10
|
+
- [Usage](#usage)
|
|
11
|
+
- [Setup](#setup)
|
|
12
|
+
- [Quick Setup](#quick-setup)
|
|
13
|
+
- [Local Setup (Recommended)](#local-setup-recommended)
|
|
14
|
+
- [Monorepo Setup](#monorepo-setup)
|
|
15
|
+
- [Global Installation (Rare)](#global-installation-rare)
|
|
16
|
+
- [Verifying It Works](#verifying-it-works)
|
|
17
|
+
- [Telemetry and Privacy](#telemetry-and-privacy)
|
|
18
|
+
- [FAQ](#faq)
|
|
19
|
+
|
|
20
|
+
## Overview
|
|
21
|
+
|
|
22
|
+
### Available Tools
|
|
23
|
+
|
|
24
|
+
- `search_corva_ui` - Search components, hooks, utils by name or description
|
|
25
|
+
- `get_component_docs` - Get detailed component documentation with props and examples
|
|
26
|
+
- `get_hook_docs` - Get hook documentation
|
|
27
|
+
- `get_theme_docs` - Get theme/styling documentation
|
|
28
|
+
- `list_corva_ui` - List all available items by category
|
|
29
|
+
- `get_constants_docs` - Get constants documentation (values, namespaces, usage)
|
|
30
|
+
- `get_client_docs` - Get API client documentation (methods, endpoints)
|
|
31
|
+
- `get_diagnostics` - Get MCP server health metrics (memory, uptime, request stats, telemetry status)
|
|
32
|
+
|
|
33
|
+
### Usage
|
|
34
|
+
|
|
35
|
+
No special keywords required. The AI automatically uses these tools when you ask about:
|
|
36
|
+
|
|
37
|
+
- **Components**: "What's the Button component?", "How do I use Tooltip?"
|
|
38
|
+
- **Hooks**: "How does useSubscriptions work?"
|
|
39
|
+
- **Theme**: "What colors are in the palette?"
|
|
40
|
+
- **Browsing**: "List all v2 components"
|
|
41
|
+
|
|
42
|
+
Mentioning `@corva/ui`, component names, or asking about the design system triggers the MCP automatically.
|
|
43
|
+
|
|
44
|
+
## Setup
|
|
45
|
+
|
|
46
|
+
> **Just generated a fresh project with the latest `create-corva-app`?** MCP is already configured for Claude Code,
|
|
47
|
+
> Cursor, and Codex CLI in the generated project — skip the setup steps below and jump
|
|
48
|
+
> to [Verifying It Works](#verifying-it-works). Older projects scaffolded before MCP was added to the template still
|
|
49
|
+
> need the setup below.
|
|
50
|
+
|
|
51
|
+
> **Minimum Version:** The MCP server is available starting from `@corva/ui` version **3.44.0**.
|
|
52
|
+
|
|
53
|
+
### Quick Setup
|
|
54
|
+
|
|
55
|
+
Run from your project root:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx -p @corva/ui corva-ui-mcp-setup
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This creates `.mcp.json` (Claude Code), `.cursor/mcp.json` (Cursor), and `.codex/config.toml` (Codex CLI) automatically.
|
|
62
|
+
Restart your IDE or reload MCP servers afterward.
|
|
63
|
+
|
|
64
|
+
> If any of these files already exist, the setup command **extends** them — your existing MCP server entries are
|
|
65
|
+
> preserved, and only the `corva-ui` entry is added or updated.
|
|
66
|
+
|
|
67
|
+
> **Monorepo:** Run the setup command from the monorepo root, not from individual
|
|
68
|
+
> `apps/*` directories. See [Monorepo Setup](#monorepo-setup) for details.
|
|
69
|
+
|
|
70
|
+
### Local Setup (Recommended)
|
|
71
|
+
|
|
72
|
+
**This is the recommended approach.** Add the MCP config to your project and it just works — no global installs, no PATH
|
|
73
|
+
issues, always in sync with your project's `@corva/ui` version.
|
|
74
|
+
|
|
75
|
+
| IDE | Config File |
|
|
76
|
+
|-------------|----------------------|
|
|
77
|
+
| Claude Code | `.mcp.json` |
|
|
78
|
+
| Cursor | `.cursor/mcp.json` |
|
|
79
|
+
| Codex CLI | `.codex/config.toml` |
|
|
80
|
+
|
|
81
|
+
> These configs reference `npx -p @corva/ui corva-ui-mcp` (no machine-specific paths), so they're safe to commit if your
|
|
82
|
+
> team wants project-wide MCP support.
|
|
83
|
+
|
|
84
|
+
#### Claude Code
|
|
85
|
+
|
|
86
|
+
1. Create `.mcp.json` in your project root:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"corva-ui": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": [
|
|
94
|
+
"-p",
|
|
95
|
+
"@corva/ui",
|
|
96
|
+
"corva-ui-mcp"
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
2. Restart Claude Code or run `/mcp` to reload servers
|
|
104
|
+
|
|
105
|
+
3. Verify: Ask Claude "search corva-ui for Button" - it should use the MCP tool
|
|
106
|
+
|
|
107
|
+
> **Native Windows note:** `npx` is a `.cmd` shim, and several MCP clients on native Windows (Claude Code; some Codex
|
|
108
|
+
> CLI builds) fail to spawn it directly with `ENOENT` or `spawn npx`. If you hit that, wrap with `cmd /c`:
|
|
109
|
+
>
|
|
110
|
+
> ```json
|
|
111
|
+
> { "command": "cmd", "args": ["/c", "npx", "--yes", "--package", "@corva/ui", "corva-ui-mcp"] }
|
|
112
|
+
> ```
|
|
113
|
+
>
|
|
114
|
+
> `--yes` skips npx's first-run "Need to install …?" prompt, which an MCP server start-up has no way to answer
|
|
115
|
+
> interactively. (`--package` is the long form of `-p`; in npm proper `-p` aliases `--parseable`, so the long
|
|
116
|
+
> form is clearer.) Cursor on Windows generally accepts plain `"command": "npx"` — try that first, only switch to the
|
|
117
|
+
> `cmd /c` form if it fails. WSL users (with the client also running in WSL) don't hit this — plain `npx` works.
|
|
118
|
+
|
|
119
|
+
#### Cursor
|
|
120
|
+
|
|
121
|
+
1. Create `.cursor/mcp.json` in your project root:
|
|
122
|
+
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"corva-ui": {
|
|
127
|
+
"command": "npx",
|
|
128
|
+
"args": [
|
|
129
|
+
"-p",
|
|
130
|
+
"@corva/ui",
|
|
131
|
+
"corva-ui-mcp"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
2. Restart Cursor or use Command Palette → "MCP: Restart Servers"
|
|
139
|
+
|
|
140
|
+
3. **Note:** MCP is disabled by default in Cursor. Enable it in **Cursor Settings → Features → MCP** before restarting.
|
|
141
|
+
|
|
142
|
+
4. Verify: In Composer, ask about a @corva/ui component
|
|
143
|
+
|
|
144
|
+
#### OpenAI Codex CLI
|
|
145
|
+
|
|
146
|
+
1. Create `.codex/config.toml` in your project root:
|
|
147
|
+
|
|
148
|
+
```toml
|
|
149
|
+
[mcp_servers.corva_ui]
|
|
150
|
+
command = "npx"
|
|
151
|
+
args = ["-p", "@corva/ui", "corva-ui-mcp"]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
2. Restart Codex CLI or start a new session
|
|
155
|
+
|
|
156
|
+
3. Verify: Ask about a @corva/ui component
|
|
157
|
+
|
|
158
|
+
#### Troubleshooting: Direct Path (Last Resort)
|
|
159
|
+
|
|
160
|
+
If `npx` doesn't work in your environment (e.g., restricted shell, corporate proxy blocking npm registry), you can
|
|
161
|
+
reference the module directly:
|
|
162
|
+
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"mcpServers": {
|
|
166
|
+
"corva-ui": {
|
|
167
|
+
"command": "node",
|
|
168
|
+
"args": [
|
|
169
|
+
"node_modules/@corva/ui/mcp-server/server.mjs"
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Trade-offs:**
|
|
177
|
+
|
|
178
|
+
- Path may break if @corva/ui changes internal structure
|
|
179
|
+
- Won't work with monorepo hoisting (yarn/pnpm workspaces)
|
|
180
|
+
- Config isn't portable across different project structures
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
### Monorepo Setup
|
|
185
|
+
|
|
186
|
+
Use the same per-IDE configs from [Local Setup](#local-setup-recommended), but place them in the **monorepo root**.
|
|
187
|
+
|
|
188
|
+
For monorepos, place MCP config files (`.mcp.json`, `.cursor/mcp.json`, `.codex/config.toml`) in the
|
|
189
|
+
**monorepo root** — just like other shared configs (e.g., DC app configs placed at repo root). Do **not** place them
|
|
190
|
+
separately in each `apps/*` directory.
|
|
191
|
+
|
|
192
|
+
> **Cursor-specific note:** If you open each app in a separate Cursor window, the monorepo-root MCP configs won't be
|
|
193
|
+
> detected. To fix this, add the parent monorepo folder to the Cursor workspace: **File → Add Folder to Workspace**,
|
|
194
|
+
> then select the monorepo root.
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
### Global Installation (Rare)
|
|
199
|
+
|
|
200
|
+
Use this **only** if you need `@corva/ui` docs in projects that don't have `@corva/ui` as a dependency (e.g., backend
|
|
201
|
+
repos, scratch projects). For all other cases, prefer the [local setup](#local-setup-recommended) above.
|
|
202
|
+
|
|
203
|
+
**Trade-offs vs local setup:**
|
|
204
|
+
|
|
205
|
+
- You must manually run `npm i -g @corva/ui` to get documentation updates
|
|
206
|
+
- nvm users need absolute paths (PATH isn't inherited by MCP clients)
|
|
207
|
+
- Documentation version may drift from what your project actually uses
|
|
208
|
+
|
|
209
|
+
| IDE | Config File |
|
|
210
|
+
|-------------|------------------------|
|
|
211
|
+
| Claude Code | `~/.claude.json` |
|
|
212
|
+
| Cursor | `~/.cursor/mcp.json` |
|
|
213
|
+
| Codex CLI | `~/.codex/config.toml` |
|
|
214
|
+
|
|
215
|
+
> These are user-level configs — they apply to all projects on your machine. Do not commit them.
|
|
216
|
+
|
|
217
|
+
#### Step 1: Install Globally
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
npm i -g @corva/ui
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
> Required for the with-nvm setups below — they reference the binary by an absolute path (macOS / Linux),
|
|
224
|
+
> source `nvm.sh` to put it on PATH (Windows + WSL), or point Node at `mcp-server/server.mjs` directly
|
|
225
|
+
> (nvm-windows). Optional for the "without nvm" setups: those use `npx --yes --package @corva/ui`, which runs
|
|
226
|
+
> a matching local dependency when present or installs into npm's cache otherwise — `npx` does not honour the
|
|
227
|
+
> global install. If you need a strictly pinned version regardless of cache state (or are working offline / behind
|
|
228
|
+
> a registry-blocking proxy), use the [Troubleshooting: Direct Node Path](#troubleshooting-direct-node-path) form
|
|
229
|
+
> below.
|
|
230
|
+
|
|
231
|
+
#### Claude Code (with nvm)
|
|
232
|
+
|
|
233
|
+
MCP clients can't find nvm-managed binaries due to PATH
|
|
234
|
+
issues ([reference](https://github.com/modelcontextprotocol/servers/issues/64)). Use full paths.
|
|
235
|
+
|
|
236
|
+
##### macOS / Linux
|
|
237
|
+
|
|
238
|
+
1. Find your paths:
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
nvm which current # e.g., /Users/you/.nvm/versions/node/v22.12.0/bin/node
|
|
242
|
+
which corva-ui-mcp # e.g., /Users/you/.nvm/versions/node/v22.12.0/bin/corva-ui-mcp
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
2. Add the `mcpServers` entry to your `~/.claude.json` (create the file if it doesn't exist, or merge into existing
|
|
246
|
+
config):
|
|
247
|
+
|
|
248
|
+
```json
|
|
249
|
+
{
|
|
250
|
+
"mcpServers": {
|
|
251
|
+
"corva-ui": {
|
|
252
|
+
"command": "/Users/you/.nvm/versions/node/v22.12.0/bin/node",
|
|
253
|
+
"args": [
|
|
254
|
+
"/Users/you/.nvm/versions/node/v22.12.0/bin/corva-ui-mcp"
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
##### Windows + WSL
|
|
262
|
+
|
|
263
|
+
Node lives inside WSL, so where you point the MCP config depends on where the *MCP client* runs:
|
|
264
|
+
|
|
265
|
+
- **Client also runs inside WSL** (e.g. you launch `claude` from a WSL shell): follow the macOS / Linux instructions
|
|
266
|
+
above unchanged. WSL is Linux for this purpose.
|
|
267
|
+
- **Client is the native Windows app** (Claude Code installed on Windows, Node only in WSL): wrap with `wsl.exe`. The
|
|
268
|
+
most reliable shape is to source `nvm.sh` explicitly so the spawned shell finds your Node and the global bin,
|
|
269
|
+
regardless of how your `.bashrc` is structured:
|
|
270
|
+
|
|
271
|
+
```json
|
|
272
|
+
{
|
|
273
|
+
"mcpServers": {
|
|
274
|
+
"corva-ui": {
|
|
275
|
+
"command": "wsl.exe",
|
|
276
|
+
"args": [
|
|
277
|
+
"-e", "bash", "-lc",
|
|
278
|
+
". \"$HOME/.nvm/nvm.sh\" && exec corva-ui-mcp"
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Notes for this config:
|
|
286
|
+
|
|
287
|
+
- `wsl.exe` with no `-d` uses your default distro. If your dev environment lives in a non-default distro, add
|
|
288
|
+
`-d <DistroName>` (run `wsl.exe -l -v` to list them).
|
|
289
|
+
- First MCP-server start may be slow if WSL is cold (the VM has to boot). If your client times out, restart the client
|
|
290
|
+
once WSL is warm.
|
|
291
|
+
- Simpler shapes like `["--", "corva-ui-mcp"]` or `["--", "bash", "-lc", "corva-ui-mcp"]` *can* work, but they're
|
|
292
|
+
fragile: WSL's non-interactive shell may not source `nvm.sh`, so `corva-ui-mcp` won't be on PATH. Prefer the
|
|
293
|
+
explicit-source form above unless you've verified the simpler one works on your setup.
|
|
294
|
+
- If you'd rather avoid `wsl.exe` from the Windows-side client, install Node natively on Windows and follow
|
|
295
|
+
[Native Windows (nvm-windows)](#native-windows-nvm-windows) below — keep WSL for everything else and run the MCP
|
|
296
|
+
server off the native Node.
|
|
297
|
+
|
|
298
|
+
##### Native Windows (nvm-windows)
|
|
299
|
+
|
|
300
|
+
`nvm which` doesn't exist on `nvm-windows`. Find the active Node bin path and the global npm prefix:
|
|
301
|
+
|
|
302
|
+
```cmd
|
|
303
|
+
:: cmd
|
|
304
|
+
where node
|
|
305
|
+
npm prefix -g
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
```powershell
|
|
309
|
+
# PowerShell — bare `where` is an alias for Where-Object, so use where.exe (or Get-Command):
|
|
310
|
+
where.exe node
|
|
311
|
+
npm prefix -g
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
`where node` typically returns the `NVM_SYMLINK` path (default `C:\Program Files\nodejs\node.exe`) rather than the
|
|
315
|
+
per-version path. Either path works in the MCP config. `npm prefix -g` returns the directory holding global
|
|
316
|
+
executables and `node_modules\` — on a default `nvm-windows` setup that's `%APPDATA%\nvm\v<version>`, but it can
|
|
317
|
+
differ if you've customized the npm prefix or installed `nvm-windows` to a non-default root.
|
|
318
|
+
|
|
319
|
+
Then in `~/.claude.json` (use forward slashes, or escape backslashes — both are valid JSON; substitute the prefix you
|
|
320
|
+
got from `npm prefix -g`):
|
|
321
|
+
|
|
322
|
+
```json
|
|
323
|
+
{
|
|
324
|
+
"mcpServers": {
|
|
325
|
+
"corva-ui": {
|
|
326
|
+
"command": "C:/Program Files/nodejs/node.exe",
|
|
327
|
+
"args": [
|
|
328
|
+
"C:/Users/you/AppData/Roaming/nvm/v22.12.0/node_modules/@corva/ui/mcp-server/server.mjs"
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
The script path is `mcp-server/server.mjs` (the `bin` entry from `@corva/ui` `package.json`), **not** the `dist/`
|
|
336
|
+
build path. Pointing `command` directly at `corva-ui-mcp.cmd` is technically possible but unreliable as an MCP
|
|
337
|
+
`command` value across clients; the explicit `node.exe` + `.mjs` form mirrors the macOS / Linux example and is the
|
|
338
|
+
recommended shape.
|
|
339
|
+
|
|
340
|
+
#### Claude Code (without nvm)
|
|
341
|
+
|
|
342
|
+
Add the `mcpServers` entry to your `~/.claude.json` (merge into existing config):
|
|
343
|
+
|
|
344
|
+
```json
|
|
345
|
+
{
|
|
346
|
+
"mcpServers": {
|
|
347
|
+
"corva-ui": {
|
|
348
|
+
"command": "npx",
|
|
349
|
+
"args": [
|
|
350
|
+
"--yes",
|
|
351
|
+
"--package",
|
|
352
|
+
"@corva/ui",
|
|
353
|
+
"corva-ui-mcp"
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
> **Windows:** `npx` is a `.cmd` shim — see the [Native Windows note](#claude-code) under Local Setup for the
|
|
361
|
+
> `cmd /c` workaround. WSL users running the native-Windows client should follow the `wsl.exe` config from
|
|
362
|
+
> [Claude Code Windows + WSL](#windows--wsl) instead.
|
|
363
|
+
|
|
364
|
+
#### Cursor (with nvm)
|
|
365
|
+
|
|
366
|
+
Use the same path-discovery and JSON-shape rules as [Claude Code (with nvm)](#claude-code-with-nvm) above, but write
|
|
367
|
+
the config to `~/.cursor/mcp.json`.
|
|
368
|
+
|
|
369
|
+
##### macOS / Linux
|
|
370
|
+
|
|
371
|
+
1. Find your paths (same as Claude Code above)
|
|
372
|
+
|
|
373
|
+
2. Add to `~/.cursor/mcp.json` (create the file if it doesn't exist, or merge into existing config):
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"mcpServers": {
|
|
378
|
+
"corva-ui": {
|
|
379
|
+
"command": "/Users/you/.nvm/versions/node/v22.12.0/bin/node",
|
|
380
|
+
"args": [
|
|
381
|
+
"/Users/you/.nvm/versions/node/v22.12.0/bin/corva-ui-mcp"
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
##### Windows + WSL
|
|
389
|
+
|
|
390
|
+
If Cursor runs inside WSL, follow the macOS / Linux instructions above. If Cursor is the native Windows app and Node
|
|
391
|
+
lives in WSL, write to `~/.cursor/mcp.json`:
|
|
392
|
+
|
|
393
|
+
```json
|
|
394
|
+
{
|
|
395
|
+
"mcpServers": {
|
|
396
|
+
"corva-ui": {
|
|
397
|
+
"command": "wsl.exe",
|
|
398
|
+
"args": [
|
|
399
|
+
"-e", "bash", "-lc",
|
|
400
|
+
". \"$HOME/.nvm/nvm.sh\" && exec corva-ui-mcp"
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
See the [Claude Code Windows + WSL notes](#windows--wsl) above for distro selection (`-d <DistroName>`), cold-start
|
|
408
|
+
caveats, and why the explicit `nvm.sh` source is preferred over simpler shapes.
|
|
409
|
+
|
|
410
|
+
##### Native Windows (nvm-windows)
|
|
411
|
+
|
|
412
|
+
Find your paths with `where.exe node` and `npm prefix -g` as described in the
|
|
413
|
+
[Claude Code native-Windows section](#native-windows-nvm-windows), then write to `~/.cursor/mcp.json`:
|
|
414
|
+
|
|
415
|
+
```json
|
|
416
|
+
{
|
|
417
|
+
"mcpServers": {
|
|
418
|
+
"corva-ui": {
|
|
419
|
+
"command": "C:/Program Files/nodejs/node.exe",
|
|
420
|
+
"args": [
|
|
421
|
+
"C:/Users/you/AppData/Roaming/nvm/v22.12.0/node_modules/@corva/ui/mcp-server/server.mjs"
|
|
422
|
+
]
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
> **Note:** MCP is disabled by default in Cursor. Enable it in **Cursor Settings → Features → MCP** before restarting.
|
|
429
|
+
|
|
430
|
+
#### Cursor (without nvm)
|
|
431
|
+
|
|
432
|
+
Add to `~/.cursor/mcp.json` (merge into existing config):
|
|
433
|
+
|
|
434
|
+
```json
|
|
435
|
+
{
|
|
436
|
+
"mcpServers": {
|
|
437
|
+
"corva-ui": {
|
|
438
|
+
"command": "npx",
|
|
439
|
+
"args": [
|
|
440
|
+
"--yes",
|
|
441
|
+
"--package",
|
|
442
|
+
"@corva/ui",
|
|
443
|
+
"corva-ui-mcp"
|
|
444
|
+
]
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
> **Windows:** `npx` is a `.cmd` shim. Cursor on Windows usually accepts plain `npx` — if it fails, use the
|
|
451
|
+
> `cmd /c` workaround from the [Native Windows note](#claude-code) under Local Setup. WSL users running
|
|
452
|
+
> native-Windows Cursor should follow the `wsl.exe` config from [Cursor Windows + WSL](#windows--wsl-1) instead.
|
|
453
|
+
|
|
454
|
+
> **Note:** MCP is disabled by default in Cursor. Enable it in **Cursor Settings → Features → MCP** before restarting.
|
|
455
|
+
|
|
456
|
+
#### Troubleshooting: Direct Node Path
|
|
457
|
+
|
|
458
|
+
If `npx` isn't viable (offline, corporate proxy blocking the registry, or you need a strictly pinned version
|
|
459
|
+
regardless of npm cache state), point Node directly at the global install's `server.mjs`. This shape requires
|
|
460
|
+
Step 1 above and works for any IDE — drop it into `~/.claude.json`, `~/.cursor/mcp.json`, or
|
|
461
|
+
`~/.codex/config.toml`.
|
|
462
|
+
|
|
463
|
+
Find your global install's path with `npm prefix -g`, then substitute it below:
|
|
464
|
+
|
|
465
|
+
```json
|
|
466
|
+
{
|
|
467
|
+
"mcpServers": {
|
|
468
|
+
"corva-ui": {
|
|
469
|
+
"command": "node",
|
|
470
|
+
"args": ["<npm-prefix>/lib/node_modules/@corva/ui/mcp-server/server.mjs"]
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
Native-Windows substitution (default nodejs.org installer): `command` becomes `"C:/Program Files/nodejs/node.exe"`,
|
|
477
|
+
`args` becomes `["C:/Users/you/AppData/Roaming/npm/node_modules/@corva/ui/mcp-server/server.mjs"]`. nvm-windows
|
|
478
|
+
users should use the [Native Windows (nvm-windows)](#native-windows-nvm-windows) shape above instead — its
|
|
479
|
+
`%APPDATA%\nvm\v<version>\node_modules` path is the same direct-Node form.
|
|
480
|
+
|
|
481
|
+
## Verifying It Works
|
|
482
|
+
|
|
483
|
+
Ask your AI agent a question about a `@corva/ui` component (e.g., "How do I use the Button component from @corva/ui?") —
|
|
484
|
+
it should call one of the MCP tools and return real documentation.
|
|
485
|
+
|
|
486
|
+
For server health (uptime, memory, request stats, telemetry status), call the `get_diagnostics` tool. In Claude Code:
|
|
487
|
+
|
|
488
|
+
```
|
|
489
|
+
Use the get_diagnostics tool from corva-ui MCP
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
If the AI doesn't pick up the MCP tools, restart your IDE / reload MCP servers, and confirm the config file is at the
|
|
493
|
+
location listed in the [Local Setup](#local-setup-recommended) table for your IDE.
|
|
494
|
+
|
|
495
|
+
## Telemetry and Privacy
|
|
496
|
+
|
|
497
|
+
The MCP server may collect anonymous usage telemetry — tool name, arguments, results, latency, and MCP client
|
|
498
|
+
name/version — when a telemetry endpoint is configured at build time. No hostnames, usernames, IP addresses, or other
|
|
499
|
+
direct machine/user identifiers are collected.
|
|
500
|
+
|
|
501
|
+
**Tool arguments and results are exported in full, without redaction or truncation.** Span payloads may therefore
|
|
502
|
+
contain content from your queries (file paths, source snippets, component names, or other text you sent to the tool)
|
|
503
|
+
alongside the documentation responses.
|
|
504
|
+
|
|
505
|
+
To check whether telemetry is currently active for your install, call the `get_diagnostics` tool — it reports the
|
|
506
|
+
resolved telemetry status. Telemetry is fully disabled when no valid endpoint is configured.
|
|
507
|
+
|
|
508
|
+
## FAQ
|
|
509
|
+
|
|
510
|
+
### Does this affect my application bundle or runtime?
|
|
511
|
+
|
|
512
|
+
No. The MCP server adds ~2 MB to the published `@corva/ui` npm package (bundled server, setup CLI, and pre-generated
|
|
513
|
+
documentation data). These files live in `dist/mcp-server/` and are only used when running the CLI binaries (
|
|
514
|
+
`corva-ui-mcp`, `corva-ui-mcp-setup`). Consuming app bundlers resolve imports from the library's ESM/CJS entry points,
|
|
515
|
+
which don't reference MCP files — so they are never included in application bundles or executed at runtime.
|
package/README.md
CHANGED
|
@@ -32,15 +32,27 @@ with
|
|
|
32
32
|
public `@corva/ui`
|
|
33
33
|
components - please also update it's `stories.js` file when it's necessary
|
|
34
34
|
|
|
35
|
-
## AI-Assisted Development
|
|
35
|
+
## AI-Assisted Development (MCP Server)
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
`@corva/ui` ships an MCP (Model Context Protocol) server that exposes the component library to AI coding agents. Setup
|
|
38
|
+
supports Claude Code, Cursor, and Codex CLI. The server provides tools for searching components and viewing component,
|
|
39
|
+
hook, theme, constants, and API client documentation.
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
> If you just generated a fresh project with the latest `create-corva-app`, MCP is already configured for Claude Code,
|
|
42
|
+
> Cursor, and Codex CLI — you can skip this section. (Older projects scaffolded before MCP was added to the template
|
|
43
|
+
> still need the setup below.)
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
Quick setup (run from your project root):
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx -p @corva/ui corva-ui-mcp-setup
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
If `.mcp.json`, `.cursor/mcp.json`, or `.codex/config.toml` already exists, the command extends it — existing MCP server
|
|
52
|
+
entries are preserved, and only the `corva-ui` entry is added or updated.
|
|
53
|
+
|
|
54
|
+
See [MCP Docs](./MCP_README.md) for the full list of tools, per-IDE setup (local / monorepo / global), and
|
|
55
|
+
troubleshooting.
|
|
44
56
|
|
|
45
57
|
## Figma Code Connect
|
|
46
58
|
|