@primeuicom/mcp 0.1.11 → 0.1.13
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/README.md +21 -9
- package/dist/service.js +498 -165
- package/dist/service.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,12 @@ Core goals:
|
|
|
23
23
|
## PrimeUI API KEY
|
|
24
24
|
|
|
25
25
|
- PrimeUI provides this key together with the exported project.
|
|
26
|
-
- In
|
|
26
|
+
- In linked/exported projects, the key is stored in `.primeui/project.json` under `apiKey`.
|
|
27
|
+
- PrimeUI MCP loads `PRIMEUI_API_KEY` from env first, then falls back to `.primeui/project.json`.
|
|
28
|
+
- `.primeui/project.json` must include:
|
|
29
|
+
- `projectId`
|
|
30
|
+
- `apiKey`
|
|
31
|
+
- `targetProjectPath` (required, relative path such as `"./"` or `"./apps/web"`)
|
|
27
32
|
|
|
28
33
|
## Your first prompts
|
|
29
34
|
|
|
@@ -39,6 +44,12 @@ Next step:
|
|
|
39
44
|
Export [X page | XX pages] from PrimeUI and add them to my project.
|
|
40
45
|
```
|
|
41
46
|
|
|
47
|
+
Targeted page inspection:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
Inspect PrimeUI page /pricing components and compare them with my local /pricing page.
|
|
51
|
+
```
|
|
52
|
+
|
|
42
53
|
## Tools
|
|
43
54
|
|
|
44
55
|
Available tools:
|
|
@@ -46,6 +57,7 @@ Available tools:
|
|
|
46
57
|
| Tool | What it does | Input |
|
|
47
58
|
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
|
|
48
59
|
| `primeui_get_project_info` | Returns project metadata and page list, including export readiness and source paths. | none |
|
|
60
|
+
| `primeui_inspect_page` | Returns details for one page by slug, raw active-variant components (or `null`), and a formatted component report table for local comparison. | `pageSlug` |
|
|
49
61
|
| `primeui_list_exports` | Lists existing exports with ID, status, and creation time. | none |
|
|
50
62
|
| `primeui_create_export` | Starts a new export and returns created export info plus page snapshot. | none |
|
|
51
63
|
| `primeui_download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/` and writes sidecar manifest `.primeui/temp/exports/<exportId>.manifest.json`. | `id` (export ID) |
|
|
@@ -80,14 +92,12 @@ If your CLI command syntax differs by client version, use the JSON config from G
|
|
|
80
92
|
<details>
|
|
81
93
|
<summary>Codex CLI</summary>
|
|
82
94
|
|
|
83
|
-
Use the Codex MCP add command:
|
|
95
|
+
Use the Codex MCP add command to install MCP globally:
|
|
84
96
|
|
|
85
97
|
```bash
|
|
86
98
|
codex mcp add primeui -- npx -y @primeuicom/mcp@latest
|
|
87
99
|
```
|
|
88
100
|
|
|
89
|
-
Then set `PRIMEUI_API_KEY` in the MCP server env for `primeui`.
|
|
90
|
-
|
|
91
101
|
</details>
|
|
92
102
|
|
|
93
103
|
<details>
|
|
@@ -169,10 +179,7 @@ Use the same JSON server configuration shown in Getting started:
|
|
|
169
179
|
"primeui": {
|
|
170
180
|
"type": "stdio",
|
|
171
181
|
"command": "npx",
|
|
172
|
-
"args": ["-y", "@primeuicom/mcp@latest"]
|
|
173
|
-
"env": {
|
|
174
|
-
"PRIMEUI_API_KEY": "your-primeui-api-key"
|
|
175
|
-
}
|
|
182
|
+
"args": ["-y", "@primeuicom/mcp@latest"]
|
|
176
183
|
}
|
|
177
184
|
}
|
|
178
185
|
}
|
|
@@ -183,6 +190,11 @@ Use the same JSON server configuration shown in Getting started:
|
|
|
183
190
|
## Runtime behavior
|
|
184
191
|
|
|
185
192
|
- PrimeUI MCP uses bearer authentication with `PRIMEUI_API_KEY`.
|
|
193
|
+
- If `PRIMEUI_API_KEY` env is missing, PrimeUI MCP reads `.primeui/project.json` (`apiKey`).
|
|
194
|
+
- Config lookup:
|
|
195
|
+
- if `PRIMEUI_PROJECT_ROOT` is set, MCP reads `${PRIMEUI_PROJECT_ROOT}/.primeui/project.json`;
|
|
196
|
+
- otherwise MCP searches `.primeui/project.json` upward from current working directory.
|
|
197
|
+
- Missing or invalid `targetProjectPath` is treated as a configuration error.
|
|
186
198
|
- Downloaded archives are validated as ZIP payloads before extraction.
|
|
187
199
|
- Temporary export files are written under `.primeui/temp/` in user project folder
|
|
188
200
|
|
|
@@ -191,7 +203,7 @@ Use the same JSON server configuration shown in Getting started:
|
|
|
191
203
|
Configure these environment variables for local development:
|
|
192
204
|
|
|
193
205
|
- `PRIMEUI_API_BASE_URL`: PrimeUI API base URL (for example `http://localhost:3020` when testing against local Studio API).
|
|
194
|
-
- `PRIMEUI_PROJECT_ROOT`:
|
|
206
|
+
- `PRIMEUI_PROJECT_ROOT`: explicit project root override for `.primeui/project.json` and `.primeui/temp/` location.
|
|
195
207
|
|
|
196
208
|
Run MCP Inspector:
|
|
197
209
|
|