@primeuicom/mcp 0.1.24 → 0.1.26
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 +38 -10
- package/dist/service.js +1477 -539
- package/dist/service.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,15 +54,15 @@ Inspect PrimeUI page /pricing components and compare them with my local /pricing
|
|
|
54
54
|
|
|
55
55
|
Available tools:
|
|
56
56
|
|
|
57
|
-
| Tool
|
|
58
|
-
|
|
|
59
|
-
| `get_project_info` | Returns project metadata and page list, including export readiness and source paths.
|
|
60
|
-
| `inspect_page` | Returns details for one page by slug, raw active-variant components (or `null`), and a formatted component report table for local comparison.
|
|
61
|
-
| `list_exports` | Lists existing exports with ID, status, and creation time.
|
|
62
|
-
| `create_export` | Starts a new export and returns strict API manifest payload (`pages[].manifest.files` + `export.components`), then saves sidecar manifest `.primeui/temp/exports/<exportId>.manifest.json`. | `projectRoot?`
|
|
63
|
-
| `download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/` and validates existing local sidecar manifest for this export ID.
|
|
64
|
-
| `copy_page` | Safely copies one page from downloaded export into user project using only `pages[].manifest.files` (new files only, conflicts as diff, add-only missing deps).
|
|
65
|
-
| `clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout.
|
|
57
|
+
| Tool | What it does | Input |
|
|
58
|
+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
59
|
+
| `get_project_info` | Returns project metadata and page list, including export readiness and source paths. | `projectRoot?` |
|
|
60
|
+
| `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`, `projectRoot?` |
|
|
61
|
+
| `list_exports` | Lists existing exports with ID, status, and creation time. | `projectRoot?` |
|
|
62
|
+
| `create_export` | Starts a new export and returns strict API manifest payload (`pages[].manifest.files` + `export.components`), then saves sidecar manifest `.primeui/temp/exports/<exportId>.manifest.json`. | `projectRoot?` |
|
|
63
|
+
| `download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/` and validates existing local sidecar manifest for this export ID. | `id` (export ID), `projectRoot?` |
|
|
64
|
+
| `copy_page` | Safely copies one page from downloaded export into user project using only `pages[].manifest.files` (new files only, conflicts as diff, add-only missing deps). | `originPageSlug`, `actualPageSlug?`, `projectRoot?` |
|
|
65
|
+
| `clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout. | `projectRoot?` |
|
|
66
66
|
|
|
67
67
|
## Getting started
|
|
68
68
|
|
|
@@ -190,6 +190,7 @@ Use the same JSON server configuration shown in Getting started:
|
|
|
190
190
|
## Runtime behavior
|
|
191
191
|
|
|
192
192
|
- PrimeUI MCP uses bearer authentication with `PRIMEUI_API_KEY`.
|
|
193
|
+
- `--help`, `--version`, and `--health` do not start the MCP server.
|
|
193
194
|
- If `PRIMEUI_API_KEY` env is missing, PrimeUI MCP reads `.primeui/project.json` (`apiKey`).
|
|
194
195
|
- Server startup does not require `.primeui/project.json`; project config is resolved lazily per tool call.
|
|
195
196
|
- Config lookup order on each tool call:
|
|
@@ -202,7 +203,28 @@ Use the same JSON server configuration shown in Getting started:
|
|
|
202
203
|
- Missing or invalid `targetProjectPath` is treated as a configuration error.
|
|
203
204
|
- Downloaded archives are validated as ZIP payloads before extraction.
|
|
204
205
|
- `create_export` is the source of truth for local sidecar manifest creation in `.primeui/temp/exports/<exportId>.manifest.json`.
|
|
205
|
-
- Temporary export files are written under `.primeui/temp/` in user project folder
|
|
206
|
+
- Temporary export files are written under `.primeui/temp/` in user project folder.
|
|
207
|
+
|
|
208
|
+
## CLI behavior
|
|
209
|
+
|
|
210
|
+
PrimeUI MCP has three execution modes:
|
|
211
|
+
|
|
212
|
+
- `npx @primeuicom/mcp@latest` starts the MCP `stdio` server for use by an MCP-compatible client.
|
|
213
|
+
- `npx @primeuicom/mcp@latest --help` prints CLI help and exits.
|
|
214
|
+
- `npx @primeuicom/mcp@latest --version` prints the package version and exits.
|
|
215
|
+
- `npx @primeuicom/mcp@latest --health` prints runtime diagnostics and exits.
|
|
216
|
+
- `npx @primeuicom/mcp@latest --health /absolute/project/path` runs the same diagnostics against an explicit project root.
|
|
217
|
+
|
|
218
|
+
Examples:
|
|
219
|
+
|
|
220
|
+
```bash
|
|
221
|
+
npx @primeuicom/mcp@latest --help
|
|
222
|
+
npx @primeuicom/mcp@latest --version
|
|
223
|
+
npx @primeuicom/mcp@latest --health
|
|
224
|
+
npx @primeuicom/mcp@latest --health /absolute/project/path
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Normal MCP client configuration should launch `@primeuicom/mcp` without `--help`, `--version`, or `--health`.
|
|
206
228
|
|
|
207
229
|
## Local development and testing
|
|
208
230
|
|
|
@@ -211,6 +233,12 @@ Configure these environment variables for local development:
|
|
|
211
233
|
- `PRIMEUI_API_BASE_URL`: PrimeUI API base URL (for example `http://localhost:3020` when testing against local Studio API).
|
|
212
234
|
- `PRIMEUI_PROJECT_ROOT`: explicit project root override for `.primeui/project.json` and `.primeui/temp/` location.
|
|
213
235
|
|
|
236
|
+
**tip** to add it to codex globally use:
|
|
237
|
+
|
|
238
|
+
```console
|
|
239
|
+
codex mcp add primeui --env PRIMEUI_API_BASE_URL=http://localhost:3020 -- npx -y @primeuicom/mcp@latest
|
|
240
|
+
```
|
|
241
|
+
|
|
214
242
|
Run MCP Inspector:
|
|
215
243
|
|
|
216
244
|
```bash
|