@anton.andrusenko/shopify-mcp-admin 0.1.0 → 0.3.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.
Files changed (3) hide show
  1. package/README.md +102 -11
  2. package/dist/index.js +1456 -769
  3. package/package.json +12 -2
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
- # shopify-mcp-admin
1
+ # @anton.andrusenko/shopify-mcp-admin
2
2
 
3
3
  > 🛍️ **MCP Server for Shopify Admin API** — Enable AI agents to manage Shopify stores with 40 powerful tools
4
4
 
5
- [![npm version](https://badge.fury.io/js/shopify-mcp-admin.svg)](https://badge.fury.io/js/shopify-mcp-admin)
5
+ [![npm version](https://badge.fury.io/js/@anton.andrusenko%2Fshopify-mcp-admin.svg)](https://www.npmjs.com/package/@anton.andrusenko/shopify-mcp-admin)
6
6
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
7
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org/)
8
+ [![codecov](https://codecov.io/gh/AntonAndrusenko/shopify-mcp-admin/graph/badge.svg)](https://codecov.io/gh/AntonAndrusenko/shopify-mcp-admin)
8
9
 
9
10
  ---
10
11
 
@@ -32,10 +33,10 @@
32
33
 
33
34
  ```bash
34
35
  # Run directly with npx (recommended)
35
- npx shopify-mcp-admin
36
+ npx @anton.andrusenko/shopify-mcp-admin
36
37
 
37
38
  # Or install globally
38
- npm install -g shopify-mcp-admin
39
+ npm install -g @anton.andrusenko/shopify-mcp-admin
39
40
  ```
40
41
 
41
42
  ### Configuration
@@ -57,18 +58,58 @@ The AI will use the `list-products` tool to fetch your catalog.
57
58
 
58
59
  ---
59
60
 
61
+ ## 🔐 Authentication Methods
62
+
63
+ shopify-mcp-admin supports two authentication methods:
64
+
65
+ ### Option 1: Legacy Custom App Token (Recommended for existing apps)
66
+
67
+ If you have a Custom App with a static access token:
68
+
69
+ ```bash
70
+ SHOPIFY_STORE_URL=mystore.myshopify.com
71
+ SHOPIFY_ACCESS_TOKEN=shpat_xxxxx
72
+ ```
73
+
74
+ ### Option 2: Dev Dashboard (OAuth 2.0)
75
+
76
+ If you're using Shopify's new Dev Dashboard with client credentials:
77
+
78
+ ```bash
79
+ SHOPIFY_STORE_URL=mystore.myshopify.com
80
+ SHOPIFY_CLIENT_ID=xxxxx
81
+ SHOPIFY_CLIENT_SECRET=xxxxx
82
+ ```
83
+
84
+ Tokens are automatically refreshed every 24 hours.
85
+
86
+ ### Which Should I Use?
87
+
88
+ | Scenario | Method |
89
+ |----------|--------|
90
+ | Existing Custom App with static token | Legacy (Option 1) |
91
+ | New Dev Dashboard app | Client Credentials (Option 2) |
92
+ | Development/Partner store | Either works |
93
+ | Production store (after Jan 2026) | Client Credentials required |
94
+
95
+ ---
96
+
60
97
  ## ⚙️ Configuration Reference
61
98
 
62
99
  | Variable | Required | Default | Description |
63
100
  |----------|----------|---------|-------------|
64
101
  | `SHOPIFY_STORE_URL` | ✅ Yes | — | Your Shopify store domain (e.g., `your-store.myshopify.com`) |
65
- | `SHOPIFY_ACCESS_TOKEN` | Yes | — | Admin API access token from your Custom App |
102
+ | `SHOPIFY_ACCESS_TOKEN` | See below | — | Admin API access token from your Custom App |
103
+ | `SHOPIFY_CLIENT_ID` | ⚡ See below | — | Client ID from Dev Dashboard app |
104
+ | `SHOPIFY_CLIENT_SECRET` | ⚡ See below | — | Client Secret from Dev Dashboard app |
66
105
  | `SHOPIFY_API_VERSION` | No | `2025-10` | Shopify API version |
67
106
  | `TRANSPORT` | No | `stdio` | Transport mode: `stdio` or `http` |
68
107
  | `PORT` | No | `3000` | HTTP server port (when `TRANSPORT=http`) |
69
108
  | `DEBUG` | No | — | Enable debug logging (`1` or `true`) |
70
109
  | `LOG_LEVEL` | No | `info` | Log level: `debug`, `info`, `warn`, `error` |
71
110
 
111
+ **⚡ Authentication:** Provide EITHER `SHOPIFY_ACCESS_TOKEN` (legacy) OR both `SHOPIFY_CLIENT_ID` and `SHOPIFY_CLIENT_SECRET` (Dev Dashboard).
112
+
72
113
  ### Required Shopify Scopes
73
114
 
74
115
  Configure these scopes when creating your Custom App:
@@ -95,12 +136,14 @@ Edit your Claude Desktop configuration file:
95
136
 
96
137
  ### Step 2: Add the MCP Server
97
138
 
139
+ **Option 1: Legacy Token Authentication**
140
+
98
141
  ```json
99
142
  {
100
143
  "mcpServers": {
101
144
  "shopify": {
102
145
  "command": "npx",
103
- "args": ["shopify-mcp-admin"],
146
+ "args": ["@anton.andrusenko/shopify-mcp-admin"],
104
147
  "env": {
105
148
  "SHOPIFY_STORE_URL": "your-store.myshopify.com",
106
149
  "SHOPIFY_ACCESS_TOKEN": "shpat_xxxxx"
@@ -110,6 +153,24 @@ Edit your Claude Desktop configuration file:
110
153
  }
111
154
  ```
112
155
 
156
+ **Option 2: Dev Dashboard (OAuth 2.0)**
157
+
158
+ ```json
159
+ {
160
+ "mcpServers": {
161
+ "shopify": {
162
+ "command": "npx",
163
+ "args": ["@anton.andrusenko/shopify-mcp-admin"],
164
+ "env": {
165
+ "SHOPIFY_STORE_URL": "your-store.myshopify.com",
166
+ "SHOPIFY_CLIENT_ID": "xxxxx",
167
+ "SHOPIFY_CLIENT_SECRET": "xxxxx"
168
+ }
169
+ }
170
+ }
171
+ }
172
+ ```
173
+
113
174
  ### Step 3: Restart Claude Desktop
114
175
 
115
176
  Quit and reopen Claude Desktop. You should see "shopify" in the MCP servers list.
@@ -135,7 +196,7 @@ TRANSPORT=http \
135
196
  PORT=3000 \
136
197
  SHOPIFY_STORE_URL=your-store.myshopify.com \
137
198
  SHOPIFY_ACCESS_TOKEN=shpat_xxxxx \
138
- npx shopify-mcp-admin
199
+ npx @anton.andrusenko/shopify-mcp-admin
139
200
  ```
140
201
 
141
202
  ### Step 2: Test the Connection
@@ -186,7 +247,7 @@ Each tool can be converted to OpenAI function format:
186
247
 
187
248
  ## 🛠️ Available Tools
188
249
 
189
- shopify-mcp-admin provides **40 tools** organized into 7 categories:
250
+ @anton.andrusenko/shopify-mcp-admin provides **40 tools** organized into 7 categories:
190
251
 
191
252
  <details>
192
253
  <summary><strong>📦 Product Management (7 tools)</strong></summary>
@@ -303,7 +364,7 @@ shopify-mcp-admin provides **40 tools** organized into 7 categories:
303
364
  | `401 Unauthorized` | Invalid access token | Regenerate token in Shopify Admin |
304
365
  | `403 Forbidden` | Missing API scopes | Add required scopes to Custom App |
305
366
  | `429 Too Many Requests` | Rate limited | Wait; shopify-mcp-admin auto-retries |
306
- | `ECONNREFUSED` | Server not running | Start server with `npx shopify-mcp-admin` |
367
+ | `ECONNREFUSED` | Server not running | Start server with `npx @anton.andrusenko/shopify-mcp-admin` |
307
368
  | `Invalid store URL` | Wrong URL format | Use `store.myshopify.com` format |
308
369
 
309
370
  ### Debug Mode
@@ -312,12 +373,39 @@ Enable verbose logging to diagnose issues:
312
373
 
313
374
  ```bash
314
375
  # Option 1: DEBUG flag
315
- DEBUG=1 npx shopify-mcp-admin
376
+ DEBUG=1 npx @anton.andrusenko/shopify-mcp-admin
316
377
 
317
378
  # Option 2: LOG_LEVEL
318
- LOG_LEVEL=debug npx shopify-mcp-admin
379
+ LOG_LEVEL=debug npx @anton.andrusenko/shopify-mcp-admin
319
380
  ```
320
381
 
382
+ ### MCP Inspector
383
+
384
+ Use [MCP Inspector](https://github.com/modelcontextprotocol/inspector) to visually test and debug the server:
385
+
386
+ ```bash
387
+ # Test production build
388
+ npm run build
389
+ npm run inspect
390
+
391
+ # Development mode (no build needed)
392
+ npm run inspect:dev
393
+
394
+ # With saved configuration
395
+ cp mcp-inspector.example.json mcp-inspector.json
396
+ # Edit mcp-inspector.json with your credentials
397
+ npm run inspect:config
398
+ ```
399
+
400
+ MCP Inspector opens a web UI at `http://localhost:6274` where you can:
401
+
402
+ - 📋 Browse all 40 registered tools with schemas
403
+ - ▶️ Execute tools interactively and view results
404
+ - 🔍 Inspect JSON-RPC protocol messages
405
+ - 📊 Monitor server events in real-time
406
+
407
+ > **Tip:** Use `npm run inspect:dev` during development for instant feedback without rebuilding.
408
+
321
409
  ### FAQ
322
410
 
323
411
  **Q: Can I connect to multiple stores?**
@@ -416,8 +504,11 @@ npm run dev
416
504
  | `npm run dev` | Start development server with hot reload |
417
505
  | `npm run build` | Build for production |
418
506
  | `npm run test` | Run unit tests |
507
+ | `npm run test:coverage` | Run tests with coverage report |
419
508
  | `npm run lint` | Run Biome linter |
420
509
  | `npm run lint:fix` | Auto-fix linting issues |
510
+ | `npm run inspect` | Open MCP Inspector with production build |
511
+ | `npm run inspect:dev` | Open MCP Inspector in development mode |
421
512
 
422
513
  ### Pull Request Guidelines
423
514