@primeuicom/mcp 0.1.7 → 0.1.9
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 +58 -35
- package/dist/instructions.js +68 -26
- package/dist/instructions.js.map +1 -1
- package/dist/lib/fs.js.map +1 -1
- package/dist/server.js.map +1 -1
- package/dist/service.js.map +1 -1
- package/dist/services/project-sync-service.js.map +1 -1
- package/dist/sources/api-provider.js +13 -4
- package/dist/sources/api-provider.js.map +1 -1
- package/package.json +30 -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).
|
|
@@ -45,16 +71,6 @@ Create or update `.mcp.json`:
|
|
|
45
71
|
}
|
|
46
72
|
```
|
|
47
73
|
|
|
48
|
-
Optional environment variables:
|
|
49
|
-
|
|
50
|
-
- `PRIMEUI_API_BASE_URL`: custom PrimeUI app base URL (default: `https://app.primeui.com/`).
|
|
51
|
-
- `PRIMEUI_PROJECT_ROOT`: absolute path to the target local project root. If omitted, current working directory is used.
|
|
52
|
-
|
|
53
|
-
Notes:
|
|
54
|
-
|
|
55
|
-
- API root is normalized to `/api/v1`.
|
|
56
|
-
- Temporary export files are written under `.primeui/temp/`.
|
|
57
|
-
|
|
58
74
|
## Install in common MCP clients
|
|
59
75
|
|
|
60
76
|
If your CLI command syntax differs by client version, use the JSON config from Getting started with the same `primeui` server block.
|
|
@@ -162,40 +178,47 @@ Use the same JSON server configuration shown in Getting started:
|
|
|
162
178
|
|
|
163
179
|
</details>
|
|
164
180
|
|
|
165
|
-
##
|
|
181
|
+
## Runtime behavior
|
|
166
182
|
|
|
167
|
-
|
|
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
|
|
168
186
|
|
|
169
|
-
|
|
170
|
-
| --- | --- | --- |
|
|
171
|
-
| `primeui_get_project_info` | Returns project metadata and page list, including export readiness and source paths. | none |
|
|
172
|
-
| `primeui_list_exports` | Lists existing exports with ID, status, and creation time. | none |
|
|
173
|
-
| `primeui_create_export` | Starts a new export and returns created export info plus page snapshot. | none |
|
|
174
|
-
| `primeui_download_export` | Downloads and extracts a completed export into `.primeui/temp/exports/<exportId>/`. | `id` (export ID) |
|
|
175
|
-
| `primeui_clear_temp` | Clears `.primeui/temp/` and recreates baseline temp layout. | none |
|
|
187
|
+
## Local development and testing
|
|
176
188
|
|
|
177
|
-
|
|
189
|
+
Configure these environment variables for local development:
|
|
178
190
|
|
|
179
|
-
|
|
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).
|
|
180
193
|
|
|
181
|
-
|
|
182
|
-
|
|
194
|
+
Run MCP Inspector:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
pnpm inspect
|
|
183
198
|
```
|
|
184
199
|
|
|
185
|
-
|
|
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.
|
|
186
202
|
|
|
187
|
-
|
|
188
|
-
Download that export with PrimeUI MCP and show me the local extracted projectPath and pagePath for the /pricing page.
|
|
189
|
-
```
|
|
203
|
+
Main scripts:
|
|
190
204
|
|
|
191
|
-
|
|
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/`, compile TypeScript, and mark `dist/service.js` executable.
|
|
209
|
+
- `pnpm prepack`: run build before packaging/publishing.
|
|
192
210
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
+
```
|
|
196
221
|
|
|
197
|
-
##
|
|
222
|
+
## Credits
|
|
198
223
|
|
|
199
|
-
|
|
200
|
-
- `Failed to extract zip`: verify local file permissions and retry.
|
|
201
|
-
- API contract mismatch errors: your client/server versions may be out of sync; update to latest package and verify PrimeUI backend version.
|
|
224
|
+
PrimeUI 2026
|
package/dist/instructions.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { z } from "zod/v3";
|
|
2
|
-
const pageSchema = z
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
const pageSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
id: z
|
|
5
|
+
.string()
|
|
6
|
+
.describe("Stable PrimeUI page identifier. Use this to match the same page across tool responses."),
|
|
7
|
+
title: z
|
|
8
|
+
.string()
|
|
9
|
+
.describe("Human-readable page title. Show this to the user when confirming which pages to import."),
|
|
5
10
|
slug: z
|
|
6
11
|
.string()
|
|
7
12
|
.describe("PrimeUI route slug, for example '/', '/pricing', '/docs/getting-started'. Use to match user intent."),
|
|
@@ -17,15 +22,20 @@ const pageSchema = z.object({
|
|
|
17
22
|
componentsPath: z
|
|
18
23
|
.string()
|
|
19
24
|
.describe("Relative directory path inside downloaded export root where page-level components live. Use as dependency copy start."),
|
|
20
|
-
})
|
|
25
|
+
})
|
|
26
|
+
.describe("PrimeUI page descriptor used by project and export tools. Paths are always relative to export project root.");
|
|
21
27
|
const exportStatusSchema = z
|
|
22
28
|
.enum(["in_progress", "completed", "failed"])
|
|
23
29
|
.describe("Export lifecycle state. Use 'completed' before calling primeui_download_export.");
|
|
24
30
|
const exportItemSchema = z
|
|
25
31
|
.object({
|
|
26
|
-
id: z
|
|
32
|
+
id: z
|
|
33
|
+
.string()
|
|
34
|
+
.describe("Export identifier. Pass this value to primeui_download_export input.id."),
|
|
27
35
|
status: exportStatusSchema,
|
|
28
|
-
createdAt: z
|
|
36
|
+
createdAt: z
|
|
37
|
+
.string()
|
|
38
|
+
.describe("Export creation timestamp in ISO-8601 UTC format."),
|
|
29
39
|
})
|
|
30
40
|
.describe("Single export record from PrimeUI export history.");
|
|
31
41
|
// ============================================================
|
|
@@ -43,12 +53,13 @@ const TRIGGER_PHRASES = [
|
|
|
43
53
|
].join(", ");
|
|
44
54
|
const WORKFLOW_SUMMARY = `
|
|
45
55
|
WORKFLOW ORDER (always follow this sequence):
|
|
46
|
-
1. primeui_get_project_info -> discover pages
|
|
47
|
-
2.
|
|
48
|
-
3.
|
|
49
|
-
4.
|
|
50
|
-
5.
|
|
51
|
-
6.
|
|
56
|
+
1. primeui_get_project_info -> discover PrimeUI pages
|
|
57
|
+
2. Reconcile PrimeUI pages with local project pages/routes/paths, then confirm target pages with user
|
|
58
|
+
3. primeui_create_export -> generate export snapshot for agreed pages/analysis scope
|
|
59
|
+
4. primeui_download_export -> download to temp directory
|
|
60
|
+
5. Reconcile downloaded export pages with local files, resolve ambiguities
|
|
61
|
+
6. Move agreed page code + dependencies into user's project and apply integration updates where appropriate
|
|
62
|
+
7. primeui_clear_temp -> cleanup temp files
|
|
52
63
|
`.trim();
|
|
53
64
|
// ============================================================
|
|
54
65
|
// Server Instructions (initialInstructions)
|
|
@@ -62,6 +73,14 @@ ${WORKFLOW_SUMMARY}
|
|
|
62
73
|
|
|
63
74
|
CRITICAL RULES FOR PAGE IMPORT:
|
|
64
75
|
- Import is PAGE-BY-PAGE only. Never import the entire project at once.
|
|
76
|
+
- After primeui_get_project_info, always compare PrimeUI pages against the user's existing local project pages before proposing imports.
|
|
77
|
+
- Reconciliation report MUST include: page presence match, slug/pagePath/componentsPath path match, and proposed action per page.
|
|
78
|
+
- Decision matrix:
|
|
79
|
+
- PrimeUI + local page exists -> candidate for update/review.
|
|
80
|
+
- PrimeUI exists, local missing -> import candidate.
|
|
81
|
+
- Local exists, PrimeUI missing -> custom local page, no action unless user asks.
|
|
82
|
+
- Both exist but path mismatch -> ambiguous, export + compare before deciding.
|
|
83
|
+
- Before creating export, ask user which pages to add/update (specific pages or all missing pages) and keep that choice in thread context.
|
|
65
84
|
- The downloaded export in .primeui/temp/ contains a full standalone Next.js project.
|
|
66
85
|
Do NOT copy it wholesale.
|
|
67
86
|
- Copy ONLY the target page file and its direct component dependencies.
|
|
@@ -69,6 +88,9 @@ CRITICAL RULES FOR PAGE IMPORT:
|
|
|
69
88
|
- Trace each page's imports to identify which component folders are needed.
|
|
70
89
|
- Check if components already exist in user's project - merge carefully, don't blindly overwrite.
|
|
71
90
|
- Adjust import paths to match user's project structure.
|
|
91
|
+
- After download/import work, inspect integration points (navigation configs, link menus, route registries, page indexes).
|
|
92
|
+
- If integration pattern is obvious, apply it and explicitly mark it in the report with "⚠ integration update".
|
|
93
|
+
- If integration pattern is unclear, ask the user before editing integration files.
|
|
72
94
|
- Do NOT copy: package.json, next.config, tailwind.config, layout files, or any project-level config.
|
|
73
95
|
- If merge conflicts arise and cannot be resolved unambiguously, STOP and ask the user to decide.
|
|
74
96
|
`.trim();
|
|
@@ -82,11 +104,17 @@ export const toolGetProjectInfo = {
|
|
|
82
104
|
WHEN TO USE: Call this FIRST when user wants to import, add, sync, pull, or transfer a page from PrimeUI. Intent examples (semantic intent, not exact phrase matching): ${TRIGGER_PHRASES}.
|
|
83
105
|
|
|
84
106
|
AFTER CALLING:
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
107
|
+
- Scan the user's local project to discover existing pages/routes and related page component folders.
|
|
108
|
+
- Build a reconciliation report between PrimeUI and local project with action labels:
|
|
109
|
+
- Page exists in both PrimeUI and local project.
|
|
110
|
+
- Page exists in PrimeUI but not in local project -> import candidate.
|
|
111
|
+
- Page exists in local project but not in PrimeUI -> custom local page, no action by default.
|
|
112
|
+
- Page exists in both but slug/pagePath/componentsPath mapping does not match -> ambiguous, requires export-based comparison before decision.
|
|
113
|
+
- If user already requested specific pages, first verify those pages exist in PrimeUI and are isReadyToExport: true.
|
|
114
|
+
- If any requested page is not found or not ready, report this immediately and ask for replacement page choices.
|
|
115
|
+
- Ask the user which pages to add or update now (specific page list or all missing pages) and keep this decision in thread context.
|
|
116
|
+
- Import works per page. Multiple pages are allowed, but each page transfer is handled explicitly.
|
|
117
|
+
- Only after user decision is clear, proceed to primeui_create_export.
|
|
90
118
|
|
|
91
119
|
${WORKFLOW_SUMMARY}`,
|
|
92
120
|
inputSchema: {},
|
|
@@ -94,7 +122,9 @@ ${WORKFLOW_SUMMARY}`,
|
|
|
94
122
|
projectId: z
|
|
95
123
|
.string()
|
|
96
124
|
.describe("PrimeUI project identifier associated with the API key and current import session context."),
|
|
97
|
-
projectName: z
|
|
125
|
+
projectName: z
|
|
126
|
+
.string()
|
|
127
|
+
.describe("Human-readable PrimeUI project name for confirmations in chat."),
|
|
98
128
|
metadata: z
|
|
99
129
|
.record(z.unknown())
|
|
100
130
|
.describe("Additional project metadata from PrimeUI. May include project-description and other context fields."),
|
|
@@ -149,7 +179,9 @@ export const toolCreateExport = {
|
|
|
149
179
|
WHEN TO USE: Call this AFTER the user has confirmed which pages they want to import via primeui_get_project_info. This tool is REQUIRED before primeui_download_export, unless the user explicitly and directly asked to download a specific previous export.
|
|
150
180
|
|
|
151
181
|
AFTER CALLING:
|
|
152
|
-
- Verify that
|
|
182
|
+
- Verify that all user-selected pages are present in the export result AND have isReadyToExport: true.
|
|
183
|
+
- If path mismatch pages were flagged during project-info reconciliation, ensure they are included for deeper comparison after download.
|
|
184
|
+
- If any required page is missing or not ready, report and pause for user decision before proceeding.
|
|
153
185
|
- Use the returned export ID to call primeui_download_export.
|
|
154
186
|
|
|
155
187
|
${WORKFLOW_SUMMARY}`,
|
|
@@ -157,7 +189,9 @@ ${WORKFLOW_SUMMARY}`,
|
|
|
157
189
|
outputSchema: {
|
|
158
190
|
export: z
|
|
159
191
|
.object({
|
|
160
|
-
id: z
|
|
192
|
+
id: z
|
|
193
|
+
.string()
|
|
194
|
+
.describe("Freshly created export identifier. Use this as primeui_download_export input.id."),
|
|
161
195
|
status: exportStatusSchema,
|
|
162
196
|
})
|
|
163
197
|
.describe("Created export summary."),
|
|
@@ -184,8 +218,10 @@ Do NOT call this as the first step. Requires export ID from primeui_create_expor
|
|
|
184
218
|
WHEN TO USE: Call this AFTER primeui_create_export has returned a completed export. Requires the export ID returned by primeui_create_export (or from primeui_list_exports if the user explicitly requested a previous export).
|
|
185
219
|
|
|
186
220
|
AFTER DOWNLOAD:
|
|
187
|
-
-
|
|
188
|
-
-
|
|
221
|
+
- Reconcile downloaded export pages with the current local project state again.
|
|
222
|
+
- If thread context already defines which pages to add/update and there is no ambiguity, complete the transfer without extra confirmation.
|
|
223
|
+
- If ambiguity remains (especially page/path mismatches), analyze differences in detail and ask direct clarification questions before editing.
|
|
224
|
+
- The response includes pagePath and componentsPath fields. Use these as direct pointers to locate page code and dependencies in export files.
|
|
189
225
|
|
|
190
226
|
MANUAL IMPORT STEPS per page (do not skip):
|
|
191
227
|
1. Read the page file at the pagePath from the response.
|
|
@@ -196,9 +232,13 @@ MANUAL IMPORT STEPS per page (do not skip):
|
|
|
196
232
|
- If code overlaps or was modified on the user's side, carefully determine the nature of changes on both sides.
|
|
197
233
|
- If the merge conflict can be resolved unambiguously - resolve it.
|
|
198
234
|
- If NOT - STOP, explain the conflict to the user, and ask for their decision before continuing.
|
|
199
|
-
6.
|
|
200
|
-
7.
|
|
201
|
-
8.
|
|
235
|
+
6. Inspect integration points used by existing pages (navigation configs, route registries, link components, page indexes).
|
|
236
|
+
7. If integration pattern is obvious and consistent with project conventions, apply integration updates and mark them in the report as "⚠ integration update".
|
|
237
|
+
8. If integration pattern is not obvious, provide concrete integration suggestions and ask user confirmation before changing integration files.
|
|
238
|
+
9. Do NOT copy project config files (package.json, next.config, tailwind.config, layout, etc.).
|
|
239
|
+
10. REPEAT steps 1-9 for each page the user wants to import.
|
|
240
|
+
11. Report exactly which files/areas were changed and which items require user follow-up.
|
|
241
|
+
12. Only after ALL pages are successfully imported, call primeui_clear_temp to clean up.
|
|
202
242
|
|
|
203
243
|
${WORKFLOW_SUMMARY}`,
|
|
204
244
|
inputSchema: {
|
|
@@ -240,7 +280,9 @@ Safe to call multiple times. Only affects .primeui/temp/ directory - never touch
|
|
|
240
280
|
${WORKFLOW_SUMMARY}`,
|
|
241
281
|
inputSchema: {},
|
|
242
282
|
outputSchema: {
|
|
243
|
-
success: z
|
|
283
|
+
success: z
|
|
284
|
+
.boolean()
|
|
285
|
+
.describe("True when temp cleanup completed and baseline temp structure was recreated."),
|
|
244
286
|
},
|
|
245
287
|
annotations: {
|
|
246
288
|
readOnlyHint: false,
|
package/dist/instructions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["../src/instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,MAAM,UAAU,GAAG,CAAC;KACjB,MAAM,CAAC;IACN,EAAE,EAAE,CAAC;SACF,MAAM,EAAE;SACR,QAAQ,CACP,wFAAwF,CACzF;IACH,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,QAAQ,CACP,yFAAyF,CAC1F;IACH,IAAI,EAAE,CAAC;SACJ,MAAM,EAAE;SACR,QAAQ,CACP,qGAAqG,CACtG;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CACP,0FAA0F,CAC3F;IACH,eAAe,EAAE,CAAC;SACf,OAAO,EAAE;SACT,QAAQ,CACP,yGAAyG,CAC1G;IACH,QAAQ,EAAE,CAAC;SACR,MAAM,EAAE;SACR,QAAQ,CACP,2GAA2G,CAC5G;IACH,cAAc,EAAE,CAAC;SACd,MAAM,EAAE;SACR,QAAQ,CACP,uHAAuH,CACxH;CACJ,CAAC;KACD,QAAQ,CACP,6GAA6G,CAC9G,CAAC;AAEJ,MAAM,kBAAkB,GAAG,CAAC;KACzB,IAAI,CAAC,CAAC,aAAa,EAAE,WAA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AK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvE,MAAM,IAAI,KAAK,CAAC,6BAA6B,OAAO,MAAM,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;AACH,CAAC"}
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,GAChB,MAAM,mBAAmB,CAAC;AAS3B,SAAS,QAAQ,CAAI,KAAa,EAAE,IAAO;IACzC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,YAAY,EAAE,CAAC;QACvD,iBAAiB,EAAE,IAA+B;KACnD,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,MAAM,OAAO,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvE,OAAO;QACL,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,OAAO,EAAE,EAAE,CAAC;KACnE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,MAAyB;IAC9D,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;QACE,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,OAAO;KACjB,EACD;QACE,YAAY,EAA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,CAAC;YACtC,OAAO,QAAQ,CAAC,yBAAyB,EAAE,MAAM,CAAC,CAAC;QACrD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB,aAAa,EACb,KAAK,IAA6B,EAAE;QAClC,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,SAAS,EAAE,CAAC;YACzB,OAAO,QAAQ,CAAC,oBAAoB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3D,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC,CACF,CAAC;IAEF,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/service.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE,KAAK,UAAU,IAAI;IACjB,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IACtE,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC;IAE3C,MAAM,QAAQ,GAAG,IAAI,sBAAsB,CAAC;QAC1C,MAAM;QACN,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB;KAC1C,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CACX,uGAAuG,CACxG,CAAC;IACJ,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,kBAAkB,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,CAAC;IACtE,MAAM,MAAM,GAAG,sBAAsB,CAAC,WAAW,CAAC,CAAC;IAEnD,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CAAC,mCAAmC,WAAW,EAAE,CAAC,CAAC;AAClE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;IACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-sync-service.js","sourceRoot":"","sources":["../../src/services/project-sync-service.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"project-sync-service.js","sourceRoot":"","sources":["../../src/services/project-sync-service.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAe1E,MAAM,OAAO,kBAAkB;IACZ,QAAQ,CAAsB;IAC9B,WAAW,CAAS;IACpB,WAAW,CAAS;IACpB,QAAQ,CAAS;IACjB,WAAW,CAAS;IAErC,YAAY,OAAkC;QAC5C,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QAC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|
|
8
8
|
const DEFAULT_API_BASE_URL = "https://app.primeui.com/";
|
|
9
|
-
const ZIP_CONTENT_TYPES = [
|
|
9
|
+
const ZIP_CONTENT_TYPES = [
|
|
10
|
+
"application/zip",
|
|
11
|
+
"application/octet-stream",
|
|
12
|
+
"application/x-zip-compressed",
|
|
13
|
+
];
|
|
10
14
|
const exportStatusSchema = z.enum(["in_progress", "completed", "failed"]);
|
|
11
15
|
const projectPageSchema = z.object({
|
|
12
16
|
id: z.string(),
|
|
@@ -90,7 +94,10 @@ const createZipSignatureGuard = (endpoint) => {
|
|
|
90
94
|
if (!validated) {
|
|
91
95
|
const requiredBytes = Math.max(0, 4 - signature.length);
|
|
92
96
|
if (requiredBytes > 0) {
|
|
93
|
-
signature = Buffer.concat([
|
|
97
|
+
signature = Buffer.concat([
|
|
98
|
+
signature,
|
|
99
|
+
chunkBuffer.subarray(0, requiredBytes),
|
|
100
|
+
]);
|
|
94
101
|
}
|
|
95
102
|
if (signature.length >= 4) {
|
|
96
103
|
if (!looksLikeZipArchive(signature)) {
|
|
@@ -126,7 +133,9 @@ export class ApiProjectDataProvider {
|
|
|
126
133
|
return response.exports;
|
|
127
134
|
}
|
|
128
135
|
async createExport() {
|
|
129
|
-
return this.requestJson("project/exports", createExportResponseSchema, {
|
|
136
|
+
return this.requestJson("project/exports", createExportResponseSchema, {
|
|
137
|
+
method: "POST",
|
|
138
|
+
});
|
|
130
139
|
}
|
|
131
140
|
/**
|
|
132
141
|
* Consumer-side runtime contract for GET /api/v1/project/exports/:exportId/download.
|
|
@@ -206,7 +215,7 @@ export class ApiProjectDataProvider {
|
|
|
206
215
|
async readError(response) {
|
|
207
216
|
const contentType = response.headers.get("content-type") ?? "";
|
|
208
217
|
try {
|
|
209
|
-
if (contentType
|
|
218
|
+
if (isJsonContentType(contentType)) {
|
|
210
219
|
const body = (await response.json());
|
|
211
220
|
if (body?.message && body?.code) {
|
|
212
221
|
return `${body.code}: ${body.message}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-provider.js","sourceRoot":"","sources":["../../src/sources/api-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"api-provider.js","sourceRoot":"","sources":["../../src/sources/api-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAczC,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,iBAAiB,GAAG;IACxB,iBAAiB;IACjB,0BAA0B;IAC1B,8BAA8B;CAC/B,CAAC;AACF,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,aAAa,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAC1E,MAAM,iBAAiB,GAAkC,CAAC,CAAC,MAAM,CAAC;IAChE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;CAC3B,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,iBAAiB,GAAkC,CAAC,CAAC,MAAM,CAAC;IAChE,S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ACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primeuicom/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "MCP server that connects AI agents with PrimeUI project",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"model-context-protocol",
|
|
8
|
+
"primeui",
|
|
9
|
+
"ai-agent",
|
|
10
|
+
"agent-tools",
|
|
11
|
+
"developer-tools",
|
|
12
|
+
"nextjs",
|
|
13
|
+
"export",
|
|
14
|
+
"website ai generation",
|
|
15
|
+
"next.js ai generation",
|
|
16
|
+
"ai sitebuilder",
|
|
17
|
+
"primeui components",
|
|
18
|
+
"primeui pages"
|
|
19
|
+
],
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "Oleg",
|
|
22
|
+
"email": "oleg@primeui.com",
|
|
23
|
+
"url": "https://pixelpoint.io/"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://primeui.com/",
|
|
26
|
+
"repository": "https://primeui.com/",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://primeui.com/",
|
|
29
|
+
"email": "oleg@primeui.com"
|
|
30
|
+
},
|
|
4
31
|
"type": "module",
|
|
5
32
|
"main": "dist/service.js",
|
|
6
33
|
"bin": {
|
|
@@ -12,6 +39,8 @@
|
|
|
12
39
|
"scripts": {
|
|
13
40
|
"clean": "rm -rf dist",
|
|
14
41
|
"build": "pnpm run clean && tsc -p tsconfig.json && chmod 755 dist/service.js",
|
|
42
|
+
"format": "prettier --write ./src",
|
|
43
|
+
"format:check": "prettier --check ./src",
|
|
15
44
|
"typecheck": "tsc --noEmit",
|
|
16
45
|
"dev": "tsx src/service.ts",
|
|
17
46
|
"test": "vitest run",
|