@primeuicom/mcp 0.1.8 → 0.1.10

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 CHANGED
@@ -24,6 +24,32 @@ Core goals:
24
24
  - PrimeUI provides this key together with the exported project.
25
25
  - In practice, it is preconfigured in the exported project's `.mcp.json` for the `primeui` server entry.
26
26
 
27
+ ## Your first prompts
28
+
29
+ Try this in your MCP-enabled agent:
30
+
31
+ ```text
32
+ Use PrimeUI MCP to get my project info, list pages that are ready to export.
33
+ ```
34
+
35
+ Next step:
36
+
37
+ ```text
38
+ Export [missing pages | XXX page] with PrimeUI MCP and add them to my project.
39
+ ```
40
+
41
+ ## Tools
42
+
43
+ Available tools:
44
+
45
+ | Tool | What it does | Input |
46
+ | -------------------------- | ------------------------------------------------------------------------------------ | ---------------- |
47
+ | `primeui_get_project_info` | Returns project metadata and page list, including export readiness and source paths. | none |
48
+ | `primeui_list_exports` | Lists existing exports with ID, status, and creation time. | none |
49
+ | `primeui_create_export` | Starts a new export and returns created export info plus page snapshot. | none |
50
+ | `primeui_download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/`. | `id` (export ID) |
51
+ | `primeui_clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout. | none |
52
+
27
53
  ## Getting started
28
54
 
29
55
  The setup below works in any MCP client that supports `.mcp.json` with `stdio` command servers (for example: Codex CLI, Cursor, Cline, and other compatible clients).
@@ -152,37 +178,46 @@ Use the same JSON server configuration shown in Getting started:
152
178
 
153
179
  </details>
154
180
 
155
- ## Tools
181
+ ## Runtime behavior
156
182
 
157
- Available tools:
183
+ - PrimeUI MCP uses bearer authentication with `PRIMEUI_API_KEY`.
184
+ - Downloaded archives are validated as ZIP payloads before extraction.
185
+ - Temporary export files are written under `.primeui/temp/` in user project folder
158
186
 
159
- | Tool | What it does | Input |
160
- | -------------------------- | ------------------------------------------------------------------------------------ | ---------------- |
161
- | `primeui_get_project_info` | Returns project metadata and page list, including export readiness and source paths. | none |
162
- | `primeui_list_exports` | Lists existing exports with ID, status, and creation time. | none |
163
- | `primeui_create_export` | Starts a new export and returns created export info plus page snapshot. | none |
164
- | `primeui_download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/`. | `id` (export ID) |
165
- | `primeui_clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout. | none |
187
+ ## Local development and testing
166
188
 
167
- ## Your first prompt
189
+ Configure these environment variables for local development:
168
190
 
169
- Try this in your MCP-enabled agent:
191
+ - `PRIMEUI_API_BASE_URL`: PrimeUI API base URL (for example `http://localhost:3020` when testing against local Studio API).
192
+ - `PRIMEUI_PROJECT_ROOT`: local project root where PrimeUI temp files are created (defaults to the current working directory if not set).
170
193
 
171
- ```text
172
- Use PrimeUI MCP to get my project info, list pages that are ready to export.
194
+ Run MCP Inspector:
195
+
196
+ ```bash
197
+ pnpm inspect
173
198
  ```
174
199
 
175
- Next step:
200
+ This runs `@modelcontextprotocol/inspector` against `tsx src/service.ts`.
201
+ After startup, open the local Inspector URL shown in the terminal (for example `http://127.0.0.1:<port>`) and interact with the PrimeUI MCP tools from the browser UI.
176
202
 
177
- ```text
178
- Export [missing pages | XXX page] with PrimeUI MCP and add them to my project.
179
- ```
203
+ Main scripts:
180
204
 
181
- ## Runtime behavior
205
+ - `pnpm dev`: run the MCP server locally via `tsx src/service.ts`.
206
+ - `pnpm test`: run unit tests with Vitest.
207
+ - `pnpm typecheck`: run TypeScript type checks without emitting build artifacts.
208
+ - `pnpm build`: clean `dist/`, bundle the MCP server with `tsup`, and mark `dist/service.js` executable.
209
+ - `pnpm prepack`: run build before packaging/publishing.
182
210
 
183
- - PrimeUI MCP uses bearer authentication with `PRIMEUI_API_KEY`.
184
- - Downloaded archives are validated as ZIP payloads before extraction.
185
- - Temporary export files are written under `.primeui/temp/` in user project folder
211
+ ### Publish
212
+
213
+ Publish flow includes:
214
+
215
+ 1. Update the package version (usually a patch bump).
216
+ 2. Publish with the `latest` tag:
217
+
218
+ ```bash
219
+ npm publish --tag latest
220
+ ```
186
221
 
187
222
  ## Credits
188
223