uiplug-mcp 1.1.0 → 1.1.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.
- package/README.md +32 -6
- package/dist/index.js +2 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,6 +12,10 @@ Exposes three tools to any MCP-compatible agent:
|
|
|
12
12
|
| `search_components` | Search by name, description, or tag |
|
|
13
13
|
| `get_component` | Get full source code + installation instructions |
|
|
14
14
|
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
Starting from v1.1.0, a free API key is required. Generate one at [uiplug.com/dashboard/settings](https://uiplug.com/dashboard/settings) — it takes under a minute.
|
|
18
|
+
|
|
15
19
|
## Usage with Claude Desktop
|
|
16
20
|
|
|
17
21
|
Add this to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
@@ -21,13 +25,16 @@ Add this to `~/Library/Application Support/Claude/claude_desktop_config.json`:
|
|
|
21
25
|
"mcpServers": {
|
|
22
26
|
"uiplug": {
|
|
23
27
|
"command": "npx",
|
|
24
|
-
"args": ["-y", "uiplug-mcp"]
|
|
28
|
+
"args": ["-y", "uiplug-mcp"],
|
|
29
|
+
"env": {
|
|
30
|
+
"UIPLUG_API_KEY": "uiplug_sk_your_key_here"
|
|
31
|
+
}
|
|
25
32
|
}
|
|
26
33
|
}
|
|
27
34
|
}
|
|
28
35
|
```
|
|
29
36
|
|
|
30
|
-
Restart Claude Desktop.
|
|
37
|
+
Restart Claude Desktop.
|
|
31
38
|
|
|
32
39
|
## Example prompts
|
|
33
40
|
|
|
@@ -41,9 +48,9 @@ Restart Claude Desktop. No API key needed — works out of the box.
|
|
|
41
48
|
|
|
42
49
|
React · Vue · Svelte · Angular · HTML/CSS · Jetpack Compose · Compose Multiplatform · Flutter · SwiftUI · React Native
|
|
43
50
|
|
|
44
|
-
##
|
|
51
|
+
## Usage with Cursor
|
|
45
52
|
|
|
46
|
-
|
|
53
|
+
Add to `.cursor/mcp.json`:
|
|
47
54
|
|
|
48
55
|
```json
|
|
49
56
|
{
|
|
@@ -52,10 +59,29 @@ To point the server at your own Supabase instance:
|
|
|
52
59
|
"command": "npx",
|
|
53
60
|
"args": ["-y", "uiplug-mcp"],
|
|
54
61
|
"env": {
|
|
55
|
-
"
|
|
56
|
-
|
|
62
|
+
"UIPLUG_API_KEY": "uiplug_sk_your_key_here"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Usage with VS Code (GitHub Copilot)
|
|
70
|
+
|
|
71
|
+
Add to `.vscode/mcp.json`:
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"servers": {
|
|
76
|
+
"uiplug": {
|
|
77
|
+
"type": "stdio",
|
|
78
|
+
"command": "npx",
|
|
79
|
+
"args": ["-y", "uiplug-mcp"],
|
|
80
|
+
"env": {
|
|
81
|
+
"UIPLUG_API_KEY": "uiplug_sk_your_key_here"
|
|
57
82
|
}
|
|
58
83
|
}
|
|
59
84
|
}
|
|
60
85
|
}
|
|
61
86
|
```
|
|
87
|
+
|
package/dist/index.js
CHANGED
|
@@ -28,12 +28,8 @@ async function validateApiKey(apiKey) {
|
|
|
28
28
|
if (error || !data) {
|
|
29
29
|
return { userId: null, error: "Invalid or revoked API key." };
|
|
30
30
|
}
|
|
31
|
-
// Fire-and-forget: update usage stats
|
|
32
|
-
supabase
|
|
33
|
-
.from("api_keys")
|
|
34
|
-
.update({ last_used_at: new Date().toISOString(), usage_total: data.usage_total + 1 })
|
|
35
|
-
.eq("id", data.id)
|
|
36
|
-
.then(() => { });
|
|
31
|
+
// Fire-and-forget: update usage stats via SECURITY DEFINER RPC (bypasses RLS)
|
|
32
|
+
supabase.rpc("increment_api_key_usage", { p_key_id: data.id }).then(() => { });
|
|
37
33
|
return { userId: data.user_id, error: null };
|
|
38
34
|
}
|
|
39
35
|
// ── MCP Server ────────────────────────────────────────────────────────────────
|