@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 +56 -21
- package/dist/service.js +723 -17
- package/dist/service.js.map +1 -1
- package/package.json +5 -2
- package/dist/instructions.d.ts +0 -173
- package/dist/instructions.js +0 -252
- package/dist/instructions.js.map +0 -1
- package/dist/lib/fs.d.ts +0 -4
- package/dist/lib/fs.js +0 -25
- package/dist/lib/fs.js.map +0 -1
- package/dist/server.d.ts +0 -3
- package/dist/server.js +0 -70
- package/dist/server.js.map +0 -1
- package/dist/service.d.ts +0 -2
- package/dist/services/project-sync-service.d.ts +0 -22
- package/dist/services/project-sync-service.js +0 -60
- package/dist/services/project-sync-service.js.map +0 -1
- package/dist/sources/api-provider.d.ts +0 -25
- package/dist/sources/api-provider.js +0 -238
- package/dist/sources/api-provider.js.map +0 -1
- package/dist/sources/project-data-provider.d.ts +0 -7
- package/dist/sources/project-data-provider.js +0 -2
- package/dist/sources/project-data-provider.js.map +0 -1
- package/dist/sources/project-sync-source.d.ts +0 -8
- package/dist/sources/project-sync-source.js +0 -2
- package/dist/sources/project-sync-source.js.map +0 -1
- package/dist/types.d.ts +0 -33
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
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
|
-
##
|
|
181
|
+
## Runtime behavior
|
|
156
182
|
|
|
157
|
-
|
|
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
|
-
|
|
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
|
-
|
|
189
|
+
Configure these environment variables for local development:
|
|
168
190
|
|
|
169
|
-
|
|
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
|
-
|
|
172
|
-
|
|
194
|
+
Run MCP Inspector:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
pnpm inspect
|
|
173
198
|
```
|
|
174
199
|
|
|
175
|
-
|
|
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
|
-
|
|
178
|
-
Export [missing pages | XXX page] with PrimeUI MCP and add them to my project.
|
|
179
|
-
```
|
|
203
|
+
Main scripts:
|
|
180
204
|
|
|
181
|
-
|
|
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
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
|