@shoppexio/mcp-theme-server 0.1.1 → 0.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 +85 -29
- package/package.json +3 -3
- package/src/server.mjs +1 -1
- package/src/server.test.mjs +0 -45
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.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Shoppex MCP server for theme control plane operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
},
|
|
28
28
|
"files": [
|
|
29
29
|
"bin",
|
|
30
|
-
"src",
|
|
30
|
+
"src/server.mjs",
|
|
31
31
|
"README.md"
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@modelcontextprotocol/sdk": "^1.28.0",
|
|
41
|
-
"@shoppexio/theme-control-client": "
|
|
41
|
+
"@shoppexio/theme-control-client": "workspace:*"
|
|
42
42
|
}
|
|
43
43
|
}
|
package/src/server.mjs
CHANGED
|
@@ -93,7 +93,7 @@ export function createThemeToolCatalog() {
|
|
|
93
93
|
name: 'theme.create',
|
|
94
94
|
description: 'Create a new theme scaffold from a Shoppex base theme.',
|
|
95
95
|
inputSchema: {
|
|
96
|
-
base: z.enum(['default', 'classic', 'nebula', 'pulse']),
|
|
96
|
+
base: z.enum(['default', 'classic', 'nebula', 'pulse', 'phantom', 'starlight']),
|
|
97
97
|
name: z.string().min(1).optional(),
|
|
98
98
|
set_as_active: z.boolean().optional(),
|
|
99
99
|
},
|
package/src/server.test.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { describe, expect, test } from 'bun:test';
|
|
2
|
-
import { createThemeToolCatalog, executeThemeTool } from './server.mjs';
|
|
3
|
-
|
|
4
|
-
describe('shoppex theme mcp server', () => {
|
|
5
|
-
test('registers the expected theme tools', () => {
|
|
6
|
-
const tools = createThemeToolCatalog().map((tool) => tool.name);
|
|
7
|
-
|
|
8
|
-
expect(tools).toContain('theme.inspect');
|
|
9
|
-
expect(tools).toContain('theme.apply');
|
|
10
|
-
expect(tools).toContain('theme.create');
|
|
11
|
-
expect(tools).toContain('theme.settings_update');
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
test('maps theme.apply to the control plane client', async () => {
|
|
15
|
-
const client = {
|
|
16
|
-
applyThemeChanges: async (themeId, body) => ({ themeId, body }),
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const result = await executeThemeTool('theme.apply', {
|
|
20
|
-
theme_id: 'theme_1',
|
|
21
|
-
changes: [
|
|
22
|
-
{
|
|
23
|
-
path: 'src/pages/Home.tsx',
|
|
24
|
-
content: 'export default function Home() { return <div>Updated</div>; }',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
run_typecheck: true,
|
|
28
|
-
verification_strategy: 'full',
|
|
29
|
-
}, client);
|
|
30
|
-
|
|
31
|
-
expect(result).toEqual({
|
|
32
|
-
themeId: 'theme_1',
|
|
33
|
-
body: {
|
|
34
|
-
changes: [
|
|
35
|
-
{
|
|
36
|
-
path: 'src/pages/Home.tsx',
|
|
37
|
-
content: 'export default function Home() { return <div>Updated</div>; }',
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
runTypecheck: true,
|
|
41
|
-
verificationStrategy: 'full',
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
});
|