@shoppexio/mcp-theme-server 0.2.0 → 0.4.0
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 +85 -29
- package/package.json +2 -2
- package/src/server.mjs +26 -0
package/README.md
CHANGED
|
@@ -1,48 +1,104 @@
|
|
|
1
1
|
# @shoppexio/mcp-theme-server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Model Context Protocol server for Shoppex theme operations.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Connect any MCP-capable client — Claude Desktop, Claude Code, Cursor, Windsurf, Codex — to your Shoppex themes. Inspect, edit, validate, preview, and publish themes directly from your LLM workflow.
|
|
6
6
|
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
The server exposes tools for:
|
|
10
|
-
- inspect and diff
|
|
11
|
-
- read and search
|
|
12
|
-
- apply changes
|
|
13
|
-
- create sections and pages
|
|
14
|
-
- validate, preview, publish, and rollback
|
|
15
|
-
|
|
16
|
-
## Runtime Config
|
|
17
|
-
|
|
18
|
-
Set these environment variables before starting the server:
|
|
7
|
+
## Install
|
|
19
8
|
|
|
20
9
|
```bash
|
|
21
|
-
|
|
22
|
-
export SHOPPEX_API_URL=https://api.shoppex.io
|
|
10
|
+
npm install -g @shoppexio/mcp-theme-server
|
|
23
11
|
```
|
|
24
12
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
Install and run from npm:
|
|
13
|
+
Or run without installing:
|
|
28
14
|
|
|
29
15
|
```bash
|
|
30
16
|
npx -y @shoppexio/mcp-theme-server
|
|
31
17
|
```
|
|
32
18
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
19
|
+
## Claude Desktop
|
|
20
|
+
|
|
21
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"shoppex-themes": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["-y", "@shoppexio/mcp-theme-server"],
|
|
29
|
+
"env": {
|
|
30
|
+
"SHOPPEX_API_KEY": "shx_your_dev_api_key"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
37
35
|
```
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
Restart Claude Desktop. The themes tools appear under the tools menu.
|
|
38
|
+
|
|
39
|
+
## Cursor / Windsurf / Other
|
|
40
|
+
|
|
41
|
+
Any MCP client with stdio transport works. Set the same env var and point to `shoppex-mcp-theme-server` as the command.
|
|
42
|
+
|
|
43
|
+
## Tools (19)
|
|
44
|
+
|
|
45
|
+
| Tool | Purpose |
|
|
46
|
+
|------|---------|
|
|
47
|
+
| `theme.inspect` | Inspect theme structure and manifest |
|
|
48
|
+
| `theme.diff` | Diff theme state against a target |
|
|
49
|
+
| `theme.read_file` | Read one file from a theme |
|
|
50
|
+
| `theme.search_files` | Search across theme files |
|
|
51
|
+
| `theme.apply` | Apply a change set to a theme |
|
|
52
|
+
| `theme.accept` | Accept a pending change |
|
|
53
|
+
| `theme.create` | Scaffold a new theme |
|
|
54
|
+
| `theme.create_section` | Add a section |
|
|
55
|
+
| `theme.create_page` | Add a page |
|
|
56
|
+
| `theme.update_config` | Update `theme.config.ts` |
|
|
57
|
+
| `theme.preview` | Start a preview instance |
|
|
58
|
+
| `theme.stop_preview` | Stop a preview instance |
|
|
59
|
+
| `theme.publish` | Publish theme |
|
|
60
|
+
| `theme.publish_status` | Check publish status |
|
|
61
|
+
| `theme.validate` | Validate theme build |
|
|
62
|
+
| `theme.settings_get` | Read theme settings |
|
|
63
|
+
| `theme.settings_update` | Update theme settings |
|
|
64
|
+
| `theme.backups` | List backups |
|
|
65
|
+
| `theme.rollback` | Rollback to a previous version |
|
|
66
|
+
| `theme.latest_run` | Inspect last run result |
|
|
67
|
+
|
|
68
|
+
## Required Scopes
|
|
69
|
+
|
|
70
|
+
Your Shoppex Dev API key needs:
|
|
42
71
|
- `themes.read`
|
|
43
72
|
- `themes.write`
|
|
44
73
|
|
|
45
|
-
|
|
74
|
+
Create one at [dashboard.shoppex.io/developer/api](https://dashboard.shoppex.io/developer/api).
|
|
75
|
+
|
|
76
|
+
## Environment Variables
|
|
77
|
+
|
|
78
|
+
| Variable | Required | Default |
|
|
79
|
+
|----------|----------|---------|
|
|
80
|
+
| `SHOPPEX_API_KEY` | yes | — |
|
|
81
|
+
| `SHOPPEX_API_URL` | no | `https://api.shoppex.io` |
|
|
82
|
+
|
|
83
|
+
## Example Prompts
|
|
84
|
+
|
|
85
|
+
Once connected in Claude Desktop:
|
|
86
|
+
|
|
87
|
+
- "Inspect the Nebula theme and list its sections."
|
|
88
|
+
- "Create a new Hero section in my Pulse theme with a purple gradient background."
|
|
89
|
+
- "Preview the Classic theme with the accent color set to `#7C3AED`."
|
|
90
|
+
- "Publish the current draft of my Starlight theme."
|
|
91
|
+
|
|
92
|
+
## Companion
|
|
93
|
+
|
|
94
|
+
Pair with [`@shoppexio/mcp-commerce-server`](https://www.npmjs.com/package/@shoppexio/mcp-commerce-server) for products, orders, customers, coupons, and payment links.
|
|
95
|
+
|
|
96
|
+
## Docs
|
|
97
|
+
|
|
98
|
+
- [AI Workflows](https://docs.shoppex.io/themes/ai-workflows)
|
|
99
|
+
- [Build & Customize with AI](https://docs.shoppex.io/themes/build-and-customize-with-ai)
|
|
100
|
+
- [Developer API](https://docs.shoppex.io/api-reference/introduction)
|
|
101
|
+
|
|
102
|
+
## License
|
|
46
103
|
|
|
47
|
-
|
|
48
|
-
- Theme Control Plane: `https://docs.shoppex.io/themes/theme-control-plane`
|
|
104
|
+
Proprietary. © Shoppex.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shoppexio/mcp-theme-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Shoppex MCP server for theme control plane operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
41
|
-
"@shoppexio/theme-control-client": "^0.
|
|
41
|
+
"@shoppexio/theme-control-client": "^0.3.0"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/server.mjs
CHANGED
|
@@ -21,6 +21,12 @@ function jsonContent(value) {
|
|
|
21
21
|
|
|
22
22
|
export function createThemeToolCatalog() {
|
|
23
23
|
return [
|
|
24
|
+
{
|
|
25
|
+
name: 'theme_list',
|
|
26
|
+
description: 'List all themes belonging to the authenticated shop. Returns id, name, scheme, version, is_active, preview_url for each theme. Use this first when the user asks about a theme by name — find the id, then call theme_inspect.',
|
|
27
|
+
inputSchema: {},
|
|
28
|
+
execute: (_args, client) => client.listThemes(),
|
|
29
|
+
},
|
|
24
30
|
{
|
|
25
31
|
name: 'theme_inspect',
|
|
26
32
|
description: 'Inspect a Shoppex theme and return editable areas, sections, settings, design tokens, and constraints.',
|
|
@@ -103,6 +109,26 @@ export function createThemeToolCatalog() {
|
|
|
103
109
|
...(set_as_active !== undefined ? { setAsActive: set_as_active } : {}),
|
|
104
110
|
}),
|
|
105
111
|
},
|
|
112
|
+
{
|
|
113
|
+
name: 'theme_ai_apply',
|
|
114
|
+
description: 'Let Shoppex\'s theme-builder agent edit a theme from a natural-language prompt. Runs plan+apply in one call: agent picks a plan, edits files, verifies the build. Returns a draft run_id + summary. Use theme_preview next to get a live URL, then theme_accept to lock it in, then theme_publish to deploy. Examples: "add a testimonials section above the footer", "switch the accent color to purple", "fix the homepage hero to center-align on mobile".',
|
|
115
|
+
inputSchema: {
|
|
116
|
+
theme_id: z.string().min(1),
|
|
117
|
+
prompt: z.string().min(1).max(2000),
|
|
118
|
+
variant_count: z.number().int().min(1).max(3).optional(),
|
|
119
|
+
mode: z.enum(['standard', 'compare_variants', 'fix_build_error', 'fix_type_error']).optional(),
|
|
120
|
+
verification_mode: z.enum(['off', 'smart', 'always']).optional(),
|
|
121
|
+
preview_notes: z.string().min(1).max(1200).optional(),
|
|
122
|
+
},
|
|
123
|
+
execute: ({ theme_id, prompt, variant_count, mode, verification_mode, preview_notes }, client) => {
|
|
124
|
+
const body = { prompt };
|
|
125
|
+
if (variant_count !== undefined) body.variant_count = variant_count;
|
|
126
|
+
if (mode !== undefined) body.mode = mode;
|
|
127
|
+
if (verification_mode !== undefined) body.verification_mode = verification_mode;
|
|
128
|
+
if (preview_notes !== undefined) body.preview_notes = preview_notes;
|
|
129
|
+
return client.aiApplyTheme(theme_id, body);
|
|
130
|
+
},
|
|
131
|
+
},
|
|
106
132
|
{
|
|
107
133
|
name: 'theme_create_section',
|
|
108
134
|
description: 'Scaffold a new theme section and wire it into theme.config.ts.',
|