uiplug-mcp 1.2.0 → 1.2.2

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -100,7 +100,13 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
100
100
  name: "create_component",
101
101
  description: "Submit a new UI component to the UIPlug marketplace. " +
102
102
  "The component will be submitted for review (status: pending) and visible in your dashboard at uiplug.com/dashboard/components. " +
103
- "Use this after building a component to share it with the community.",
103
+ "Use this after building a component to share it with the community. " +
104
+ "IMPORTANT — code quality standard: the code field must be a complete, self-contained file. " +
105
+ "It must start with all necessary imports (e.g. import { useState } from 'react'), " +
106
+ "contain the full component implementation (not just a snippet or function body), " +
107
+ "support common props like size, variant, disabled, loading, onClick, children, and icon where relevant, " +
108
+ "and end with a default export (e.g. export default MyComponent). " +
109
+ "Do NOT submit partial snippets, TypeScript-only interfaces without implementation, or placeholder code.",
104
110
  inputSchema: {
105
111
  type: "object",
106
112
  required: ["name", "description", "framework", "category", "code"],
@@ -124,7 +130,13 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
124
130
  },
125
131
  code: {
126
132
  type: "string",
127
- description: "Full component source code.",
133
+ description: "Complete, self-contained component source code. " +
134
+ "Must include: (1) all imports at the top, (2) full component with props and logic, " +
135
+ "(3) export default at the bottom. " +
136
+ "Example structure for React: " +
137
+ "import { useState } from 'react'; " +
138
+ "const MyComponent = ({ size = 'md', disabled = false, onClick, children }) => { ... }; " +
139
+ "export default MyComponent;",
128
140
  },
129
141
  installation: {
130
142
  type: "string",
@@ -331,8 +343,10 @@ ${c.code_component}
331
343
  // ── create_component ────────────────────────────────────────────────────────
332
344
  if (name === "create_component") {
333
345
  const { name: compName, description, framework, category, code, installation, tags, model, } = (args ?? {});
346
+ const { createHash: createHash2 } = await import("crypto");
347
+ const keyHashForCreate = createHash2("sha256").update(process.env.UIPLUG_API_KEY ?? "").digest("hex");
334
348
  const { data: componentId, error } = await supabase.rpc("create_component", {
335
- p_user_id: userId,
349
+ p_key_hash: keyHashForCreate,
336
350
  p_name: compName,
337
351
  p_description: description,
338
352
  p_framework: framework,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uiplug-mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
4
  "description": "MCP server for UIPlug — gives AI agents access to the UIPlug UI component marketplace",
5
5
  "type": "module",
6
6
  "bin": {