epicmerch-mcp 1.0.0 → 1.1.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/.claude-plugin/plugin.json +23 -0
- package/.mcp.json +8 -0
- package/hooks/check-auth.js +37 -0
- package/hooks/hooks.json +16 -0
- package/manifest.json +17 -17
- package/package.json +5 -2
- package/skills/epicmerch-auth.md +78 -78
- package/skills/epicmerch-merchant-agent.md +74 -74
- package/skills/epicmerch-merchant.md +46 -46
- package/skills/epicmerch-migrate.md +62 -62
- package/skills/epicmerch-orders.md +153 -153
- package/skills/epicmerch-products.md +95 -95
- package/skills/epicmerch-setup.md +92 -0
- package/skills/epicmerch-stripe.md +64 -64
- package/smithery.yaml +6 -6
- package/src/adapters/openapi.js +138 -18
- package/src/auth.js +118 -118
- package/src/client.js +81 -81
- package/src/index.js +83 -67
- package/src/install.js +413 -269
- package/src/login.js +149 -149
- package/src/logout.js +30 -30
- package/src/refresh.js +73 -73
- package/src/status.js +22 -22
- package/src/token-store.js +52 -52
- package/src/tools/_examples.js +352 -352
- package/src/tools/merchant.js +15 -10
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "epicmerch",
|
|
3
|
+
"description": "Run your EpicMerch store from chat — products, orders, analytics, Shopify migration, Stripe setup. Auto-installs the MCP + slash commands + browser OAuth.",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Aditya Patel",
|
|
7
|
+
"email": "aditya141312@gmail.com",
|
|
8
|
+
"url": "https://epicmerch.in"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://epicmerch.in",
|
|
11
|
+
"repository": "https://github.com/MTAV-media/Epicmerch-Platform",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"epicmerch",
|
|
15
|
+
"ecommerce",
|
|
16
|
+
"shopify",
|
|
17
|
+
"stripe",
|
|
18
|
+
"merchant",
|
|
19
|
+
"mcp",
|
|
20
|
+
"storefront",
|
|
21
|
+
"skills"
|
|
22
|
+
]
|
|
23
|
+
}
|
package/.mcp.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Plugin hook — runs on Claude Code session startup.
|
|
3
|
+
// If the merchant hasn't logged in (no ~/.epicmerch/token.json), prints a
|
|
4
|
+
// one-line nudge so the assistant knows to suggest `/epicmerch-setup` if
|
|
5
|
+
// the merchant asks for store operations.
|
|
6
|
+
// Stays silent if already authenticated — no startup noise for happy paths.
|
|
7
|
+
|
|
8
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { join } from 'node:path';
|
|
11
|
+
|
|
12
|
+
const tokenPath = join(homedir(), '.epicmerch', 'token.json');
|
|
13
|
+
|
|
14
|
+
if (!existsSync(tokenPath)) {
|
|
15
|
+
// No token file at all — not logged in. Hint to the assistant.
|
|
16
|
+
console.error('[epicmerch] Not yet authenticated. The merchant can connect with /epicmerch-setup or by running `npx epicmerch-mcp setup`.');
|
|
17
|
+
process.exit(0);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
try {
|
|
21
|
+
const data = JSON.parse(readFileSync(tokenPath, 'utf-8'));
|
|
22
|
+
const entry = data?.stores?.[data?.defaultStore];
|
|
23
|
+
if (!entry) {
|
|
24
|
+
console.error('[epicmerch] Token file exists but has no default store. Run `npx epicmerch-mcp login` to fix.');
|
|
25
|
+
process.exit(0);
|
|
26
|
+
}
|
|
27
|
+
const refreshExpiry = new Date(entry.refreshTokenExpiresAt);
|
|
28
|
+
if (refreshExpiry < new Date()) {
|
|
29
|
+
console.error('[epicmerch] Refresh token expired. Merchant should run `npx epicmerch-mcp login` to re-authenticate.');
|
|
30
|
+
}
|
|
31
|
+
// Happy path: stay silent.
|
|
32
|
+
} catch (_) {
|
|
33
|
+
// Malformed token file — silent. The MCP tools themselves will surface
|
|
34
|
+
// a clearer error if they're invoked.
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
process.exit(0);
|
package/hooks/hooks.json
ADDED
package/manifest.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
{
|
|
2
|
-
"dxt_version": "0.1",
|
|
3
|
-
"name": "epicmerch-mcp",
|
|
4
|
-
"display_name": "EpicMerch",
|
|
5
|
-
"version": "{{VERSION}}",
|
|
6
|
-
"description": "Run and manage your EpicMerch store from Claude — onboarding, products, orders, analytics, Stripe setup, Shopify migration.",
|
|
7
|
-
"long_description": "EpicMerch lets you create and manage an entire e-commerce storefront from chat. Once connected, Claude can scaffold new stores, manage products and orders, set up Stripe or Razorpay payments, run analytics, and migrate Shopify stores conversationally. Authentication is OAuth-based — no API keys to copy-paste.",
|
|
8
|
-
"author": { "name": "EpicMerch", "url": "https://epicmerch.in" },
|
|
9
|
-
"homepage": "https://epicmerch.in",
|
|
10
|
-
"documentation": "https://github.com/MTAV-media/Epicmerch-Platform/tree/main/packages/epicmerch-mcp#readme",
|
|
11
|
-
"support": "https://github.com/MTAV-media/Epicmerch-Platform/issues",
|
|
12
|
-
"server": {
|
|
13
|
-
"type": "node",
|
|
14
|
-
"entry_point": "server/src/index.js"
|
|
15
|
-
},
|
|
16
|
-
"user_config": []
|
|
17
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"dxt_version": "0.1",
|
|
3
|
+
"name": "epicmerch-mcp",
|
|
4
|
+
"display_name": "EpicMerch",
|
|
5
|
+
"version": "{{VERSION}}",
|
|
6
|
+
"description": "Run and manage your EpicMerch store from Claude — onboarding, products, orders, analytics, Stripe setup, Shopify migration.",
|
|
7
|
+
"long_description": "EpicMerch lets you create and manage an entire e-commerce storefront from chat. Once connected, Claude can scaffold new stores, manage products and orders, set up Stripe or Razorpay payments, run analytics, and migrate Shopify stores conversationally. Authentication is OAuth-based — no API keys to copy-paste.",
|
|
8
|
+
"author": { "name": "EpicMerch", "url": "https://epicmerch.in" },
|
|
9
|
+
"homepage": "https://epicmerch.in",
|
|
10
|
+
"documentation": "https://github.com/MTAV-media/Epicmerch-Platform/tree/main/packages/epicmerch-mcp#readme",
|
|
11
|
+
"support": "https://github.com/MTAV-media/Epicmerch-Platform/issues",
|
|
12
|
+
"server": {
|
|
13
|
+
"type": "node",
|
|
14
|
+
"entry_point": "server/src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"user_config": []
|
|
17
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "epicmerch-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "MCP server for EpicMerch — integrates e-commerce into Claude and ChatGPT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"shopify-migration",
|
|
44
44
|
"stripe"
|
|
45
45
|
],
|
|
46
|
-
"author": "
|
|
46
|
+
"author": "Aditya Patel <aditya141312@gmail.com>",
|
|
47
47
|
"license": "MIT",
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
"files": [
|
|
55
55
|
"src/",
|
|
56
56
|
"skills/",
|
|
57
|
+
"hooks/",
|
|
58
|
+
".claude-plugin/",
|
|
59
|
+
".mcp.json",
|
|
57
60
|
"README.md",
|
|
58
61
|
"manifest.json",
|
|
59
62
|
"smithery.yaml"
|
package/skills/epicmerch-auth.md
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: epicmerch-auth
|
|
3
|
-
description: Add EpicMerch OTP authentication to the current project.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# EpicMerch Auth Integration (OTP)
|
|
7
|
-
|
|
8
|
-
**Idempotency rule:** Before writing any file, check if it already exists. If it does, SKIP that file and tell the user "X already exists — keeping it". Never overwrite existing files.
|
|
9
|
-
|
|
10
|
-
## Step 1: Install SDK
|
|
11
|
-
|
|
12
|
-
Check `package.json`. If `"epicmerch"` is already in `dependencies`, skip. Otherwise run: `npm install epicmerch`.
|
|
13
|
-
|
|
14
|
-
## Step 2: SDK initializer
|
|
15
|
-
|
|
16
|
-
If `src/lib/epicmerch.js` already exists, skip and tell the user "src/lib/epicmerch.js already exists — keeping it". Otherwise write:
|
|
17
|
-
|
|
18
|
-
```js
|
|
19
|
-
import EpicMerch from 'epicmerch';
|
|
20
|
-
|
|
21
|
-
export const store = new EpicMerch({
|
|
22
|
-
apiKey: import.meta.env.VITE_API_KEY,
|
|
23
|
-
...(import.meta.env.VITE_API_URL && { baseUrl: import.meta.env.VITE_API_URL }),
|
|
24
|
-
});
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
(For Next.js projects use `process.env.NEXT_PUBLIC_API_KEY` / `NEXT_PUBLIC_API_URL` instead.)
|
|
28
|
-
|
|
29
|
-
## Step 3: Login component
|
|
30
|
-
|
|
31
|
-
If `src/components/Login.jsx` already exists, skip and tell the user "Login.jsx already exists — keeping it". Otherwise write:
|
|
32
|
-
|
|
33
|
-
```jsx
|
|
34
|
-
import { useState } from 'react';
|
|
35
|
-
import { store } from '../lib/epicmerch';
|
|
36
|
-
|
|
37
|
-
export default function Login({ onLogin }) {
|
|
38
|
-
const [phone, setPhone] = useState('');
|
|
39
|
-
const [otp, setOtp] = useState('');
|
|
40
|
-
const [step, setStep] = useState('phone');
|
|
41
|
-
|
|
42
|
-
const sendOtp = async () => {
|
|
43
|
-
await store.auth.sendOtp(phone, 'phone');
|
|
44
|
-
setStep('otp');
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
const verify = async () => {
|
|
48
|
-
const result = await store.auth.verifyOtp(phone, otp, {});
|
|
49
|
-
if (result.token) {
|
|
50
|
-
store.setCustomerToken(result.token);
|
|
51
|
-
localStorage.setItem('customerInfo', JSON.stringify(result));
|
|
52
|
-
onLogin(result);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
return (
|
|
57
|
-
<div>
|
|
58
|
-
{step === 'phone' ? (
|
|
59
|
-
<>
|
|
60
|
-
<input value={phone} onChange={e => setPhone(e.target.value)} placeholder="+919876543210" />
|
|
61
|
-
<button onClick={sendOtp}>Send OTP</button>
|
|
62
|
-
</>
|
|
63
|
-
) : (
|
|
64
|
-
<>
|
|
65
|
-
<input value={otp} onChange={e => setOtp(e.target.value)} placeholder="Enter OTP" />
|
|
66
|
-
<button onClick={verify}>Verify</button>
|
|
67
|
-
</>
|
|
68
|
-
)}
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
## Step 4: Tell the user what's next
|
|
75
|
-
|
|
76
|
-
List the files you CREATED in this run (skip the ones already present). Then:
|
|
77
|
-
|
|
78
|
-
> "Auth integrated. Your API key goes in `.env` as `VITE_API_KEY`. If you don't have one yet, ask me to generate one — I'll create it via the MCP. Import `<Login />` into your app and pass an `onLogin` callback."
|
|
1
|
+
---
|
|
2
|
+
name: epicmerch-auth
|
|
3
|
+
description: Add EpicMerch OTP authentication to the current project.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# EpicMerch Auth Integration (OTP)
|
|
7
|
+
|
|
8
|
+
**Idempotency rule:** Before writing any file, check if it already exists. If it does, SKIP that file and tell the user "X already exists — keeping it". Never overwrite existing files.
|
|
9
|
+
|
|
10
|
+
## Step 1: Install SDK
|
|
11
|
+
|
|
12
|
+
Check `package.json`. If `"epicmerch"` is already in `dependencies`, skip. Otherwise run: `npm install epicmerch`.
|
|
13
|
+
|
|
14
|
+
## Step 2: SDK initializer
|
|
15
|
+
|
|
16
|
+
If `src/lib/epicmerch.js` already exists, skip and tell the user "src/lib/epicmerch.js already exists — keeping it". Otherwise write:
|
|
17
|
+
|
|
18
|
+
```js
|
|
19
|
+
import EpicMerch from 'epicmerch';
|
|
20
|
+
|
|
21
|
+
export const store = new EpicMerch({
|
|
22
|
+
apiKey: import.meta.env.VITE_API_KEY,
|
|
23
|
+
...(import.meta.env.VITE_API_URL && { baseUrl: import.meta.env.VITE_API_URL }),
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
(For Next.js projects use `process.env.NEXT_PUBLIC_API_KEY` / `NEXT_PUBLIC_API_URL` instead.)
|
|
28
|
+
|
|
29
|
+
## Step 3: Login component
|
|
30
|
+
|
|
31
|
+
If `src/components/Login.jsx` already exists, skip and tell the user "Login.jsx already exists — keeping it". Otherwise write:
|
|
32
|
+
|
|
33
|
+
```jsx
|
|
34
|
+
import { useState } from 'react';
|
|
35
|
+
import { store } from '../lib/epicmerch';
|
|
36
|
+
|
|
37
|
+
export default function Login({ onLogin }) {
|
|
38
|
+
const [phone, setPhone] = useState('');
|
|
39
|
+
const [otp, setOtp] = useState('');
|
|
40
|
+
const [step, setStep] = useState('phone');
|
|
41
|
+
|
|
42
|
+
const sendOtp = async () => {
|
|
43
|
+
await store.auth.sendOtp(phone, 'phone');
|
|
44
|
+
setStep('otp');
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const verify = async () => {
|
|
48
|
+
const result = await store.auth.verifyOtp(phone, otp, {});
|
|
49
|
+
if (result.token) {
|
|
50
|
+
store.setCustomerToken(result.token);
|
|
51
|
+
localStorage.setItem('customerInfo', JSON.stringify(result));
|
|
52
|
+
onLogin(result);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<div>
|
|
58
|
+
{step === 'phone' ? (
|
|
59
|
+
<>
|
|
60
|
+
<input value={phone} onChange={e => setPhone(e.target.value)} placeholder="+919876543210" />
|
|
61
|
+
<button onClick={sendOtp}>Send OTP</button>
|
|
62
|
+
</>
|
|
63
|
+
) : (
|
|
64
|
+
<>
|
|
65
|
+
<input value={otp} onChange={e => setOtp(e.target.value)} placeholder="Enter OTP" />
|
|
66
|
+
<button onClick={verify}>Verify</button>
|
|
67
|
+
</>
|
|
68
|
+
)}
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Step 4: Tell the user what's next
|
|
75
|
+
|
|
76
|
+
List the files you CREATED in this run (skip the ones already present). Then:
|
|
77
|
+
|
|
78
|
+
> "Auth integrated. Your API key goes in `.env` as `VITE_API_KEY`. If you don't have one yet, ask me to generate one — I'll create it via the MCP. Import `<Login />` into your app and pass an `onLogin` callback."
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: epicmerch-merchant-agent
|
|
3
|
-
description: A shopkeeper-style assistant that runs your EpicMerch store from chat — onboarding, products, orders, analytics, and Shopify migration.
|
|
4
|
-
tools:
|
|
5
|
-
- merchant_quick_setup
|
|
6
|
-
- merchant_diagnose
|
|
7
|
-
- merchant_list_products
|
|
8
|
-
- merchant_get_product
|
|
9
|
-
- merchant_create_product
|
|
10
|
-
- merchant_update_product
|
|
11
|
-
- merchant_delete_product
|
|
12
|
-
- merchant_list_categories
|
|
13
|
-
- merchant_create_category
|
|
14
|
-
- merchant_list_orders
|
|
15
|
-
- merchant_get_order
|
|
16
|
-
- merchant_update_order_status
|
|
17
|
-
- merchant_update_payment_status
|
|
18
|
-
- merchant_list_customers
|
|
19
|
-
- merchant_get_analytics_stats
|
|
20
|
-
- merchant_get_sales_trend
|
|
21
|
-
- merchant_get_top_products
|
|
22
|
-
- merchant_get_cart_abandonment
|
|
23
|
-
- merchant_send_notification
|
|
24
|
-
- merchant_get_abandoned_carts
|
|
25
|
-
- merchant_get_settings
|
|
26
|
-
- merchant_update_currency
|
|
27
|
-
- merchant_get_checkout_settings
|
|
28
|
-
- merchant_shopify_migrate
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
# EpicMerch Shopkeeper Assistant
|
|
32
|
-
|
|
33
|
-
You are an EpicMerch shopkeeper assistant. Help merchants run their store via chat.
|
|
34
|
-
|
|
35
|
-
## Intent → tool routing
|
|
36
|
-
|
|
37
|
-
- "log in", "connect my account", "I already have an EpicMerch store" → tell them to run `npx epicmerch-mcp login` in a terminal (browser OAuth, no chat-credentials). Wait for confirmation, then call `merchant_get_settings` to verify the session is live.
|
|
38
|
-
- "set up a store", "I want to sell online", "create my store" → `merchant_quick_setup`
|
|
39
|
-
- "what's missing", "am I ready", "store health", "is my store ready" → `merchant_diagnose`
|
|
40
|
-
- "sales", "revenue", "best sellers", "today's numbers" → `merchant_get_analytics_stats`
|
|
41
|
-
- "trend", "chart over time" → `merchant_get_sales_trend`
|
|
42
|
-
- "top products", "best sellers" → `merchant_get_top_products`
|
|
43
|
-
- "show products", "list products" → `merchant_list_products`
|
|
44
|
-
- "add product", "create product" → `merchant_create_product`
|
|
45
|
-
- "update price", "change stock" → `merchant_update_product`
|
|
46
|
-
- "orders", "show orders", "what's pending" → `merchant_list_orders`
|
|
47
|
-
- "mark shipped", "cancel order" → `merchant_update_order_status`
|
|
48
|
-
- "mark paid", "payment status" → `merchant_update_payment_status`
|
|
49
|
-
- "abandoned carts" → `merchant_get_abandoned_carts`
|
|
50
|
-
- "send email", "notify customers" → `merchant_send_notification`
|
|
51
|
-
- "migrate from Shopify", "import my Shopify store" → `merchant_shopify_migrate`
|
|
52
|
-
|
|
53
|
-
## Style
|
|
54
|
-
|
|
55
|
-
- Lead with numbers, not paragraphs. "You have 42 products and $5,231 in revenue this week." beats "Let me tell you about your store..."
|
|
56
|
-
- After any setup or migration action, immediately call `merchant_diagnose` and read off the top item from `nextSteps`.
|
|
57
|
-
- When the user asks an open-ended "how's my store?" question, call `merchant_diagnose` and `merchant_get_analytics_stats` in parallel and synthesise both.
|
|
58
|
-
- Never invent data. If a tool returns an error, say what failed and what the merchant can do about it.
|
|
59
|
-
|
|
60
|
-
## Setup fallback
|
|
61
|
-
|
|
62
|
-
If the EpicMerch MCP server isn't connected, tell the user:
|
|
63
|
-
|
|
64
|
-
> "Run `npx epicmerch-mcp setup` — that installs the MCP config for all detected AI clients AND walks you through browser login in one shot."
|
|
65
|
-
|
|
66
|
-
## Authentication
|
|
67
|
-
|
|
68
|
-
Never ask for the merchant's password in chat. If any tool call returns 401 / "Not authenticated", say:
|
|
69
|
-
|
|
70
|
-
> "Your session has expired. Run `npx epicmerch-mcp login` in a terminal, then ask me again."
|
|
71
|
-
|
|
72
|
-
## Installation
|
|
73
|
-
|
|
74
|
-
This skill is installed automatically by `npx epicmerch-mcp setup` / `install`. No manual file copying is needed.
|
|
1
|
+
---
|
|
2
|
+
name: epicmerch-merchant-agent
|
|
3
|
+
description: A shopkeeper-style assistant that runs your EpicMerch store from chat — onboarding, products, orders, analytics, and Shopify migration.
|
|
4
|
+
tools:
|
|
5
|
+
- merchant_quick_setup
|
|
6
|
+
- merchant_diagnose
|
|
7
|
+
- merchant_list_products
|
|
8
|
+
- merchant_get_product
|
|
9
|
+
- merchant_create_product
|
|
10
|
+
- merchant_update_product
|
|
11
|
+
- merchant_delete_product
|
|
12
|
+
- merchant_list_categories
|
|
13
|
+
- merchant_create_category
|
|
14
|
+
- merchant_list_orders
|
|
15
|
+
- merchant_get_order
|
|
16
|
+
- merchant_update_order_status
|
|
17
|
+
- merchant_update_payment_status
|
|
18
|
+
- merchant_list_customers
|
|
19
|
+
- merchant_get_analytics_stats
|
|
20
|
+
- merchant_get_sales_trend
|
|
21
|
+
- merchant_get_top_products
|
|
22
|
+
- merchant_get_cart_abandonment
|
|
23
|
+
- merchant_send_notification
|
|
24
|
+
- merchant_get_abandoned_carts
|
|
25
|
+
- merchant_get_settings
|
|
26
|
+
- merchant_update_currency
|
|
27
|
+
- merchant_get_checkout_settings
|
|
28
|
+
- merchant_shopify_migrate
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
# EpicMerch Shopkeeper Assistant
|
|
32
|
+
|
|
33
|
+
You are an EpicMerch shopkeeper assistant. Help merchants run their store via chat.
|
|
34
|
+
|
|
35
|
+
## Intent → tool routing
|
|
36
|
+
|
|
37
|
+
- "log in", "connect my account", "I already have an EpicMerch store" → tell them to run `npx epicmerch-mcp login` in a terminal (browser OAuth, no chat-credentials). Wait for confirmation, then call `merchant_get_settings` to verify the session is live.
|
|
38
|
+
- "set up a store", "I want to sell online", "create my store" → `merchant_quick_setup`
|
|
39
|
+
- "what's missing", "am I ready", "store health", "is my store ready" → `merchant_diagnose`
|
|
40
|
+
- "sales", "revenue", "best sellers", "today's numbers" → `merchant_get_analytics_stats`
|
|
41
|
+
- "trend", "chart over time" → `merchant_get_sales_trend`
|
|
42
|
+
- "top products", "best sellers" → `merchant_get_top_products`
|
|
43
|
+
- "show products", "list products" → `merchant_list_products`
|
|
44
|
+
- "add product", "create product" → `merchant_create_product`
|
|
45
|
+
- "update price", "change stock" → `merchant_update_product`
|
|
46
|
+
- "orders", "show orders", "what's pending" → `merchant_list_orders`
|
|
47
|
+
- "mark shipped", "cancel order" → `merchant_update_order_status`
|
|
48
|
+
- "mark paid", "payment status" → `merchant_update_payment_status`
|
|
49
|
+
- "abandoned carts" → `merchant_get_abandoned_carts`
|
|
50
|
+
- "send email", "notify customers" → `merchant_send_notification`
|
|
51
|
+
- "migrate from Shopify", "import my Shopify store" → `merchant_shopify_migrate`
|
|
52
|
+
|
|
53
|
+
## Style
|
|
54
|
+
|
|
55
|
+
- Lead with numbers, not paragraphs. "You have 42 products and $5,231 in revenue this week." beats "Let me tell you about your store..."
|
|
56
|
+
- After any setup or migration action, immediately call `merchant_diagnose` and read off the top item from `nextSteps`.
|
|
57
|
+
- When the user asks an open-ended "how's my store?" question, call `merchant_diagnose` and `merchant_get_analytics_stats` in parallel and synthesise both.
|
|
58
|
+
- Never invent data. If a tool returns an error, say what failed and what the merchant can do about it.
|
|
59
|
+
|
|
60
|
+
## Setup fallback
|
|
61
|
+
|
|
62
|
+
If the EpicMerch MCP server isn't connected, tell the user:
|
|
63
|
+
|
|
64
|
+
> "Run `npx epicmerch-mcp setup` — that installs the MCP config for all detected AI clients AND walks you through browser login in one shot."
|
|
65
|
+
|
|
66
|
+
## Authentication
|
|
67
|
+
|
|
68
|
+
Never ask for the merchant's password in chat. If any tool call returns 401 / "Not authenticated", say:
|
|
69
|
+
|
|
70
|
+
> "Your session has expired. Run `npx epicmerch-mcp login` in a terminal, then ask me again."
|
|
71
|
+
|
|
72
|
+
## Installation
|
|
73
|
+
|
|
74
|
+
This skill is installed automatically by `npx epicmerch-mcp setup` / `install`. No manual file copying is needed.
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: epicmerch-merchant
|
|
3
|
-
description: Set up EpicMerch merchant tools in Claude — login, manage products, orders, and analytics.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# EpicMerch Merchant Setup
|
|
7
|
-
|
|
8
|
-
Help the merchant connect their account **via the browser OAuth flow** — never collect email/password in chat.
|
|
9
|
-
|
|
10
|
-
## Step 1: Check if they're already authenticated
|
|
11
|
-
|
|
12
|
-
Call `merchant_get_settings` (or any other merchant_* tool that requires auth). If it returns settings data, skip straight to Step 3 and tell them: "You're already logged in."
|
|
13
|
-
|
|
14
|
-
## Step 2: Send them to the OAuth login
|
|
15
|
-
|
|
16
|
-
If the call fails with an auth error, tell the merchant:
|
|
17
|
-
|
|
18
|
-
> "I'll open the EpicMerch login in your browser — it's safer than typing credentials in chat. In a terminal, run:
|
|
19
|
-
>
|
|
20
|
-
> ```
|
|
21
|
-
> npx epicmerch-mcp login
|
|
22
|
-
> ```
|
|
23
|
-
>
|
|
24
|
-
> That'll pop up a browser window. Log in with your merchant account, click 'Allow', and the CLI will save a token automatically. Then come back here and ask me anything."
|
|
25
|
-
|
|
26
|
-
Wait for the merchant to say they've completed it. Then retry `merchant_get_settings` to confirm.
|
|
27
|
-
|
|
28
|
-
**If they don't have an account yet,** tell them: "Sign up first at https://epicmerch.in/signup, then run the command above."
|
|
29
|
-
|
|
30
|
-
## Step 3: Show their store summary
|
|
31
|
-
|
|
32
|
-
Once authenticated, call `merchant_get_analytics_stats` and summarise their store in one sentence — products, revenue this week, orders pending. Then say:
|
|
33
|
-
|
|
34
|
-
> "You're connected to [store name]. I can now help with products, orders, analytics, notifications, settings, or migrate your Shopify store. What would you like to do?"
|
|
35
|
-
|
|
36
|
-
## Routing notes
|
|
37
|
-
|
|
38
|
-
- If the merchant asks about migrating from Shopify, hand off to the `/epicmerch-migrate` skill.
|
|
39
|
-
- If they ask about Stripe / payments, hand off to `/epicmerch-stripe`.
|
|
40
|
-
- If they want a frontend storefront in their codebase, hand off to `/epicmerch`.
|
|
41
|
-
|
|
42
|
-
## MCP not connected
|
|
43
|
-
|
|
44
|
-
If the epicmerch MCP server isn't connected at all (no merchant_* tools available), tell the user:
|
|
45
|
-
|
|
46
|
-
> "First install the EpicMerch MCP: run `npx epicmerch-mcp setup`. That'll log you in AND wire up the MCP config for Claude Desktop / Cursor / VS Code in one shot."
|
|
1
|
+
---
|
|
2
|
+
name: epicmerch-merchant
|
|
3
|
+
description: Set up EpicMerch merchant tools in Claude — login, manage products, orders, and analytics.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# EpicMerch Merchant Setup
|
|
7
|
+
|
|
8
|
+
Help the merchant connect their account **via the browser OAuth flow** — never collect email/password in chat.
|
|
9
|
+
|
|
10
|
+
## Step 1: Check if they're already authenticated
|
|
11
|
+
|
|
12
|
+
Call `merchant_get_settings` (or any other merchant_* tool that requires auth). If it returns settings data, skip straight to Step 3 and tell them: "You're already logged in."
|
|
13
|
+
|
|
14
|
+
## Step 2: Send them to the OAuth login
|
|
15
|
+
|
|
16
|
+
If the call fails with an auth error, tell the merchant:
|
|
17
|
+
|
|
18
|
+
> "I'll open the EpicMerch login in your browser — it's safer than typing credentials in chat. In a terminal, run:
|
|
19
|
+
>
|
|
20
|
+
> ```
|
|
21
|
+
> npx epicmerch-mcp login
|
|
22
|
+
> ```
|
|
23
|
+
>
|
|
24
|
+
> That'll pop up a browser window. Log in with your merchant account, click 'Allow', and the CLI will save a token automatically. Then come back here and ask me anything."
|
|
25
|
+
|
|
26
|
+
Wait for the merchant to say they've completed it. Then retry `merchant_get_settings` to confirm.
|
|
27
|
+
|
|
28
|
+
**If they don't have an account yet,** tell them: "Sign up first at https://epicmerch.in/signup, then run the command above."
|
|
29
|
+
|
|
30
|
+
## Step 3: Show their store summary
|
|
31
|
+
|
|
32
|
+
Once authenticated, call `merchant_get_analytics_stats` and summarise their store in one sentence — products, revenue this week, orders pending. Then say:
|
|
33
|
+
|
|
34
|
+
> "You're connected to [store name]. I can now help with products, orders, analytics, notifications, settings, or migrate your Shopify store. What would you like to do?"
|
|
35
|
+
|
|
36
|
+
## Routing notes
|
|
37
|
+
|
|
38
|
+
- If the merchant asks about migrating from Shopify, hand off to the `/epicmerch-migrate` skill.
|
|
39
|
+
- If they ask about Stripe / payments, hand off to `/epicmerch-stripe`.
|
|
40
|
+
- If they want a frontend storefront in their codebase, hand off to `/epicmerch`.
|
|
41
|
+
|
|
42
|
+
## MCP not connected
|
|
43
|
+
|
|
44
|
+
If the epicmerch MCP server isn't connected at all (no merchant_* tools available), tell the user:
|
|
45
|
+
|
|
46
|
+
> "First install the EpicMerch MCP: run `npx epicmerch-mcp setup`. That'll log you in AND wire up the MCP config for Claude Desktop / Cursor / VS Code in one shot."
|