@anton.andrusenko/shopify-mcp-admin 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.
Files changed (3) hide show
  1. package/README.md +243 -43
  2. package/dist/index.js +84 -42
  3. package/package.json +4 -6
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @anton.andrusenko/shopify-mcp-admin
2
2
 
3
- > 🛍️ **MCP Server for Shopify Admin API** — Enable AI agents to manage Shopify stores with 81 powerful tools
3
+ > 🛍️ **MCP Server for Shopify Admin API** — Enable AI agents to manage Shopify stores with 79 powerful tools
4
4
 
5
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)
@@ -11,8 +11,8 @@
11
11
 
12
12
  ## ✨ Features
13
13
 
14
- - 🛠️ **81 MCP Tools** — Complete store management: products, inventory, collections, pages, blogs, redirects, metafields, markets, locales & translations
15
- - 📦 **Modular Architecture** — 7 modules with lazy loading for optimal AI performance (see [Tool Modules](#-tool-modules))
14
+ - 🛠️ **79 MCP Tools** — Complete store management: products, inventory, collections, pages, blogs, redirects, metafields, markets, locales & translations
15
+ - 📦 **Modular Architecture** — 7 modules with optional lazy loading for optimal AI performance (see [Tool Modules](#-tool-modules))
16
16
  - 🤖 **AI-Optimized** — Tool descriptions and error messages designed for LLM comprehension
17
17
  - 🔌 **Dual Transport** — STDIO for Claude Desktop, HTTP for ChatGPT/OpenAI
18
18
  - ⚡ **Rate Limiting** — Automatic retry with exponential backoff for Shopify API limits
@@ -191,6 +191,198 @@ Quit and reopen Claude Desktop. You should see "shopify" in the MCP servers list
191
191
 
192
192
  ---
193
193
 
194
+ ## 💬 LibreChat Integration
195
+
196
+ [LibreChat](https://www.librechat.ai/) is an open-source AI chat interface that supports MCP servers natively. This section provides a complete guide to set up LibreChat with the Shopify MCP server.
197
+
198
+ ### Prerequisites
199
+
200
+ - **Docker Desktop** — [Download](https://www.docker.com/products/docker-desktop) and ensure it's running
201
+ - **Git** — For cloning repositories
202
+ - **LLM API Key** — OpenAI or Anthropic API key for the chat functionality
203
+
204
+ ### Quick Setup (Recommended)
205
+
206
+ Use the included setup script for automated installation:
207
+
208
+ ```bash
209
+ # Clone this repo (if you haven't already)
210
+ git clone https://github.com/AntonAndrusenko/shopify-mcp-admin.git
211
+ cd shopify-mcp-admin
212
+
213
+ # Run the setup script
214
+ ./scripts/setup-librechat.sh
215
+ ```
216
+
217
+ The script will:
218
+ 1. Check Docker is installed and running
219
+ 2. Clone LibreChat to `~/LibreChat`
220
+ 3. Prompt for your Shopify credentials (store URL, access token or OAuth)
221
+ 4. Create `librechat.yaml` with MCP server configuration
222
+ 5. Create `docker-compose.override.yml` to mount the config
223
+ 6. Pull Docker images and start all containers
224
+ 7. Verify the Shopify MCP server loads successfully
225
+
226
+ **Script Options:**
227
+ ```bash
228
+ # Install to a custom directory
229
+ ./scripts/setup-librechat.sh --install-dir /path/to/librechat
230
+
231
+ # Use local development build instead of npm package
232
+ ./scripts/setup-librechat.sh --use-local
233
+
234
+ # Show help
235
+ ./scripts/setup-librechat.sh --help
236
+ ```
237
+
238
+ ### Manual Setup
239
+
240
+ <details>
241
+ <summary>Click to expand manual installation steps</summary>
242
+
243
+ #### Step 1: Clone and Configure LibreChat
244
+
245
+ ```bash
246
+ # Clone LibreChat
247
+ git clone https://github.com/danny-avila/LibreChat.git
248
+ cd LibreChat
249
+
250
+ # Create environment file
251
+ cp .env.example .env
252
+ ```
253
+
254
+ #### Step 2: Create MCP Server Configuration
255
+
256
+ Create `librechat.yaml` in the LibreChat directory:
257
+
258
+ ```yaml
259
+ version: 1.2.1
260
+
261
+ mcpServers:
262
+ shopify:
263
+ type: stdio
264
+ command: npx
265
+ args:
266
+ - -y
267
+ - "@anton.andrusenko/shopify-mcp-admin"
268
+ env:
269
+ SHOPIFY_STORE_URL: "your-store.myshopify.com"
270
+ # Option 1: Access Token
271
+ SHOPIFY_ACCESS_TOKEN: "shpat_xxxxx"
272
+ # Option 2: OAuth (comment out ACCESS_TOKEN, uncomment these)
273
+ # SHOPIFY_CLIENT_ID: "your_client_id"
274
+ # SHOPIFY_CLIENT_SECRET: "your_client_secret"
275
+ LOG_LEVEL: "info"
276
+ serverInstructions: true
277
+ timeout: 30000
278
+ initTimeout: 15000
279
+ ```
280
+
281
+ #### Step 3: Mount Configuration in Docker
282
+
283
+ Create `docker-compose.override.yml`:
284
+
285
+ ```yaml
286
+ services:
287
+ api:
288
+ volumes:
289
+ - type: bind
290
+ source: ./librechat.yaml
291
+ target: /app/librechat.yaml
292
+ ```
293
+
294
+ #### Step 4: Start LibreChat
295
+
296
+ ```bash
297
+ # Pull the latest images
298
+ docker compose pull
299
+
300
+ # Start all services
301
+ docker compose up -d
302
+
303
+ # Verify containers are running
304
+ docker compose ps
305
+ ```
306
+
307
+ #### Step 5: Verify MCP Server Loaded
308
+
309
+ ```bash
310
+ # Check logs for MCP initialization
311
+ docker compose logs api | grep -i "mcp"
312
+
313
+ # You should see:
314
+ # [MCP][shopify] Initialized in: XXXXms
315
+ # MCP servers initialized successfully. Added 79 MCP tools.
316
+ ```
317
+
318
+ </details>
319
+
320
+ ### After Installation: Enable MCP in LibreChat
321
+
322
+ Once LibreChat is running, follow these steps to use the Shopify MCP server:
323
+
324
+ #### 1. Create an Account
325
+ - Open http://localhost:3080 in your browser
326
+ - Click "Sign up" and create an account
327
+ - Log in with your new credentials
328
+
329
+ #### 2. Add an LLM API Key
330
+ - Click your **profile avatar** (bottom-left)
331
+ - Select **Settings**
332
+ - Go to **User Provider Keys**
333
+ - Add your API key:
334
+ - **OpenAI**: Paste your `sk-...` key
335
+ - **Anthropic**: Paste your `sk-ant-...` key
336
+ - Click **Save**
337
+
338
+ #### 3. Select the Shopify MCP Server
339
+ - Start a **New Chat**
340
+ - Look for the **MCP Servers** dropdown in the chat input area (shows a plug icon)
341
+ - Click it and select **"shopify"**
342
+ - You should see a "shopify" badge appear, indicating the MCP server is active
343
+
344
+ #### 4. Test the Integration
345
+ Try these prompts to verify everything works:
346
+
347
+ ```
348
+ "What's my store name and what plan am I on?"
349
+ "List my products"
350
+ "Show me products with low inventory"
351
+ ```
352
+
353
+ ### Troubleshooting
354
+
355
+ | Issue | Solution |
356
+ |-------|----------|
357
+ | MCP server not appearing | Check logs: `docker compose logs api \| grep -i mcp` |
358
+ | "shopify" badge not visible | Refresh the page, or restart: `docker compose restart` |
359
+ | Tools not working | Verify Shopify credentials in `librechat.yaml` |
360
+ | Docker won't start | Ensure Docker Desktop is running |
361
+ | Permission denied on script | Run: `chmod +x ./scripts/setup-librechat.sh` |
362
+
363
+ ### Useful Commands
364
+
365
+ ```bash
366
+ # View LibreChat logs
367
+ cd ~/LibreChat && docker compose logs api -f
368
+
369
+ # View only MCP-related logs
370
+ cd ~/LibreChat && docker compose logs api | grep -i "mcp\|shopify"
371
+
372
+ # Restart LibreChat (after config changes)
373
+ cd ~/LibreChat && docker compose restart
374
+
375
+ # Stop LibreChat
376
+ cd ~/LibreChat && docker compose down
377
+
378
+ # Update LibreChat
379
+ cd ~/LibreChat && git pull && docker compose pull && docker compose up -d
380
+ ```
381
+
382
+ > 📄 **Advanced Configuration:** See `librechat.yaml.example` for multi-store setups, role presets, and HTTP/SSE transport modes.
383
+
384
+ ---
385
+
194
386
  ## 🌐 OpenAI/ChatGPT Integration
195
387
 
196
388
  For OpenAI function calling or ChatGPT plugins, use HTTP transport mode.
@@ -264,7 +456,7 @@ Role presets automatically load appropriate tool modules at startup, optimizing
264
456
  | `content-manager` | core, content | 37 | Pages, blogs, and content marketing |
265
457
  | `seo-specialist` | core, collections, product-extensions, advanced-redirects | 38 | SEO optimization and URL management |
266
458
  | `international-manager` | core, store-context, international, collections | 46 | Multi-market and translation management |
267
- | `full-access` | All 7 modules | 81 | Full store administration |
459
+ | `full-access` | All 7 modules | 81 | Full store administration (includes meta-tools) |
268
460
 
269
461
  ### Using Role Presets
270
462
 
@@ -293,19 +485,21 @@ Or in Claude Desktop config:
293
485
  }
294
486
  ```
295
487
 
296
- ### Module Discovery
488
+ ### Module Discovery (Lazy Loading Mode)
297
489
 
298
- If no role is set, the server starts with core tools only (15 tools). AI agents can discover and load additional modules dynamically:
490
+ When lazy loading is enabled (`SHOPIFY_MCP_LAZY_LOADING=true`) and no role is set, the server starts with core tools only (15 tools). AI agents can discover and load additional modules dynamically:
299
491
 
300
492
  1. **Discover modules**: Use `list-modules` to see available modules
301
493
  2. **Load modules**: Use `load-module` with the module name to enable tools
302
494
  3. **Suggestions**: Tool responses include suggestions for relevant modules to load
303
495
 
496
+ > **Note:** When lazy loading is disabled (default), all 79 tools are available immediately and module discovery is not needed.
497
+
304
498
  ---
305
499
 
306
500
  ## 🛠️ Available Tools
307
501
 
308
- @anton.andrusenko/shopify-mcp-admin provides **81 tools** (79 domain tools + 2 meta-tools) organized into 16 categories:
502
+ @anton.andrusenko/shopify-mcp-admin provides **79 domain tools** organized into 16 categories (plus 2 meta-tools when lazy loading is enabled):
309
503
 
310
504
  <details>
311
505
  <summary><strong>🏪 Store Info (9 tools)</strong></summary>
@@ -556,13 +750,15 @@ If no role is set, the server starts with core tools only (15 tools). AI agents
556
750
 
557
751
  ## 📦 Tool Modules
558
752
 
559
- shopify-mcp-admin uses a modular architecture to optimize AI agent performance. Instead of loading all 81 tools at startup (which can degrade AI performance by up to 85%), tools are organized into 7 modules that can be loaded on demand.
753
+ shopify-mcp-admin uses a modular architecture to optimize AI agent performance. Instead of loading all 79 tools at startup (which can degrade AI performance by up to 85%), tools can be organized into 7 modules that load on demand when lazy loading is enabled.
560
754
 
561
- ### How Module Loading Works
755
+ ### How Module Loading Works (when `SHOPIFY_MCP_LAZY_LOADING=true`)
562
756
 
563
- 1. **At startup:** Only the **Core Module** (15 tools) is loaded by default
757
+ 1. **At startup:** Only the **Core Module** (15 tools including meta-tools) is loaded
564
758
  2. **Discovery:** AI agents use `list-modules` to see available modules
565
759
  3. **Loading:** AI agents use `load-module` to enable additional tools
760
+
761
+ > **Default behavior:** When lazy loading is disabled (default), all 79 domain tools are available immediately without module loading.
566
762
  4. **Suggestions:** Tool responses include hints about which modules to load next
567
763
 
568
764
  ### Module Dependency Diagram
@@ -570,9 +766,10 @@ shopify-mcp-admin uses a modular architecture to optimize AI agent performance.
570
766
  ```
571
767
  ┌─────────────────────────────────────────────────────────────────┐
572
768
  │ CORE MODULE │
573
- (Always Loaded - 15 tools)
574
- │ Products (7) • Inventory (4) • Store Info (2) • Meta (2)
769
+ (Always Loaded - 13 domain + 2 meta* tools)
770
+ │ Products (7) • Inventory (4) • Store Info (2) • Meta* (2)
575
771
  └─────────────────────────────────────────────────────────────────┘
772
+ *Meta tools only available when lazy loading is enabled
576
773
 
577
774
  ├──────────────────────────────────────────────────────────┐
578
775
  │ │
@@ -593,7 +790,7 @@ shopify-mcp-admin uses a modular architecture to optimize AI agent performance.
593
790
  └───────────────────┘ └───────────────────┘ └───────────────────┘
594
791
  ```
595
792
 
596
- ### Module: Core (15 tools) — Always Loaded
793
+ ### Module: Core (13-15 tools) — Always Loaded
597
794
 
598
795
  **Description:** Essential product and inventory management tools that form the foundation for most Shopify operations. Always loaded at startup.
599
796
 
@@ -606,7 +803,9 @@ shopify-mcp-admin uses a modular architecture to optimize AI agent performance.
606
803
  | Products (7) | `create-product`, `get-product`, `update-product`, `delete-product`, `list-products`, `update-product-variant`, `add-product-image` |
607
804
  | Inventory (4) | `get-inventory`, `update-inventory`, `list-low-inventory`, `get-bulk-inventory` |
608
805
  | Store Info (2) | `get-store-info`, `get-store-limits` |
609
- | Meta Tools (2) | `list-modules`, `load-module` |
806
+ | Meta Tools (2)* | `list-modules`, `load-module` |
807
+
808
+ > *Meta tools are only included when lazy loading is enabled (`SHOPIFY_MCP_LAZY_LOADING=true`). When disabled (default), core has 13 domain tools.
610
809
 
611
810
  **Use Case:** Basic product catalog management, inventory tracking, and store information queries.
612
811
 
@@ -750,31 +949,32 @@ shopify-mcp-admin uses a modular architecture to optimize AI agent performance.
750
949
 
751
950
  ### What's New in v0.8.0+: Modular Tool Loading
752
951
 
753
- Starting with v0.8.0, shopify-mcp-admin uses **lazy loading** to optimize AI agent performance. Research shows that presenting more than 30 tools to an AI agent can degrade performance by up to 85%.
952
+ Starting with v0.8.0, shopify-mcp-admin supports **modular lazy loading** to optimize AI agent performance. Research shows that presenting more than 30 tools to an AI agent can degrade performance by up to 85%.
754
953
 
755
- **Default Behavior (Lazy Loading Enabled):**
756
- - Only 15 core tools are loaded at startup
954
+ **Default Behavior (All Tools Loaded):**
955
+ - All 79 domain tools are loaded at startup for maximum compatibility
956
+ - Works with Claude Desktop and all MCP clients
957
+ - Server instructions describe all tools as immediately available
958
+ - Module meta-tools (`list-modules`, `load-module`) are NOT registered (not needed)
959
+
960
+ **Optional: Enable Lazy Loading:**
961
+ - Only 15 core tools are loaded at startup (13 domain + 2 meta-tools)
757
962
  - Additional tools are loaded on-demand via `load-module`
758
963
  - AI agents discover available modules using `list-modules`
759
964
  - Token usage reduced by up to 81% compared to loading all tools
965
+ - Server instructions explain module discovery and loading
760
966
 
761
- ### Breaking Changes
762
-
763
- | Previous Behavior | New Behavior (v0.8.0+) |
764
- |-------------------|------------------------|
765
- | All 79+ tools loaded at startup | 15 core tools loaded at startup |
766
- | No module concept | 7 modules with lazy loading |
767
- | N/A | `list-modules` and `load-module` meta-tools added |
967
+ > **Note:** Claude Desktop doesn't support dynamic tool list refresh, so lazy loading is disabled by default. Enable it for MCP clients that support `notifications/tools/list_changed`.
768
968
 
769
- ### Legacy Mode: Restore Previous Behavior
969
+ ### Enabling Lazy Loading
770
970
 
771
- If you prefer all tools loaded at startup (not recommended for optimal AI performance):
971
+ For MCP clients that support dynamic tool refresh:
772
972
 
773
973
  ```bash
774
974
  # Option 1: Environment variable
775
- export SHOPIFY_MCP_LAZY_LOADING=false
975
+ export SHOPIFY_MCP_LAZY_LOADING=true
776
976
 
777
- # Option 2: In Claude Desktop config
977
+ # Option 2: In MCP client config
778
978
  {
779
979
  "mcpServers": {
780
980
  "shopify": {
@@ -783,54 +983,54 @@ export SHOPIFY_MCP_LAZY_LOADING=false
783
983
  "env": {
784
984
  "SHOPIFY_STORE_URL": "your-store.myshopify.com",
785
985
  "SHOPIFY_ACCESS_TOKEN": "shpat_xxxxx",
786
- "SHOPIFY_MCP_LAZY_LOADING": "false"
986
+ "SHOPIFY_MCP_LAZY_LOADING": "true"
787
987
  }
788
988
  }
789
989
  }
790
990
  }
791
991
  ```
792
992
 
793
- ### Migration Steps
993
+ ### Configuration Options
794
994
 
795
- 1. **Review your use case** — Do you need all 81 tools? Most workflows only need a subset.
995
+ 1. **Default (all tools)** — All 79 domain tools available immediately. Best for Claude Desktop and MCP clients without dynamic tool refresh.
796
996
 
797
- 2. **Choose a role preset** (recommended) Set `SHOPIFY_MCP_ROLE` for pre-configured modules:
997
+ 2. **Role Preset** — Pre-configured module sets for specific workflows:
798
998
  ```bash
799
999
  export SHOPIFY_MCP_ROLE=product-manager
800
1000
  ```
801
1001
 
802
- 3. **Or use on-demand loading** — Let AI agents discover and load modules as needed:
1002
+ 3. **Lazy Loading** — Enable for MCP clients that support `notifications/tools/list_changed`:
1003
+ ```bash
1004
+ export SHOPIFY_MCP_LAZY_LOADING=true
1005
+ ```
803
1006
  - AI uses `list-modules` to see available modules
804
1007
  - AI uses `load-module` with module name to enable tools
805
1008
  - Tool responses suggest relevant modules automatically
806
1009
 
807
- 4. **Or disable lazy loading** — Set `SHOPIFY_MCP_LAZY_LOADING=false` for legacy behavior
808
-
809
1010
  ### When to Use Each Mode
810
1011
 
811
1012
  | Mode | Tools | Best For |
812
1013
  |------|-------|----------|
813
- | **Lazy Loading (default)** | 15 at startup | New projects, optimal AI performance |
1014
+ | **Default (all tools)** | 79 | Claude Desktop, maximum compatibility |
814
1015
  | **Role Preset** | 15-81 based on role | Specific workflows (e.g., content manager) |
815
- | **Legacy Mode** | All 81 | Backward compatibility, full store admin |
1016
+ | **Lazy Loading** | 15 at startup | MCP clients with dynamic tool refresh |
816
1017
 
817
1018
  ### Performance Comparison
818
1019
 
819
1020
  | Mode | Tools at Startup | Est. Token Usage | AI Performance |
820
1021
  |------|------------------|------------------|----------------|
821
- | Lazy Loading (default) | 15 | ~4,500 | ⭐⭐⭐ Optimal |
1022
+ | Lazy Loading | 15 | ~4,500 | ⭐⭐⭐ Optimal |
822
1023
  | inventory-manager | 15 | ~4,500 | ⭐⭐⭐ Optimal |
823
1024
  | content-manager | 37 | ~11,100 | ⭐⭐ Good |
824
1025
  | product-manager | 41 | ~12,300 | ⭐⭐ Good |
825
1026
  | international-manager | 46 | ~13,800 | ⭐⭐ Good |
826
- | full-access | 81 | ~24,000 | ⭐ May degrade |
827
- | Legacy Mode | 81 | ~24,000 | ⭐ May degrade |
1027
+ | full-access / Default | 79-81 | ~24,000 | ⭐ May degrade |
828
1028
 
829
1029
  ### Troubleshooting Module Loading
830
1030
 
831
1031
  | Issue | Solution |
832
1032
  |-------|----------|
833
- | Tool not found after upgrade | Load the appropriate module: `load-module(module: "collections")` |
1033
+ | Tool not found with lazy loading | Load the appropriate module: `load-module(module: "collections")` |
834
1034
  | "Module not found" error | Use `list-modules` to see valid module names |
835
1035
  | Want modular lazy loading | Set `SHOPIFY_MCP_LAZY_LOADING=true` (requires MCP client that supports tool list refresh) |
836
1036
  | AI agent loading too many modules | Use a role preset instead of on-demand loading |
@@ -881,8 +1081,8 @@ npm run inspect:config
881
1081
 
882
1082
  MCP Inspector opens a web UI at `http://localhost:6274` where you can:
883
1083
 
884
- - 📋 Browse registered tools with schemas (15 core tools by default, up to 81 with modules)
885
- - 📦 Test module loading via `list-modules` and `load-module`
1084
+ - 📋 Browse registered tools with schemas (79 tools by default, or 15 core tools with lazy loading)
1085
+ - 📦 Test module loading via `list-modules` and `load-module` (when lazy loading is enabled)
886
1086
  - 📊 Access 9 MCP resources for store context
887
1087
  - ▶️ Execute tools interactively and view results
888
1088
  - 🔍 Inspect JSON-RPC protocol messages
package/dist/index.js CHANGED
@@ -1326,38 +1326,7 @@ async function getStoreInfo() {
1326
1326
  var require2 = createRequire(import.meta.url);
1327
1327
  var packageJson = require2("../package.json");
1328
1328
  var SERVER_NAME = "shopify-mcp-admin";
1329
- var SERVER_INSTRUCTIONS = `This MCP server provides access to a Shopify store's Admin API.
1330
-
1331
- ## TOOL MODULES (Modular Architecture)
1332
-
1333
- Tools are organized into modules for optimal AI performance. Start with core tools and load additional modules as needed.
1334
-
1335
- **Discovery & Loading:**
1336
- - Use "list-modules" to see all available modules and their loading status
1337
- - Use "load-module" with module name to enable additional tools
1338
- - Tool responses may include suggestions for relevant modules to load
1339
-
1340
- **Available Modules:**
1341
- | Module | Description | Tools |
1342
- |--------|-------------|-------|
1343
- | core | Products, inventory, store info (always loaded) | 15 |
1344
- | store-context | Extended store configuration (features, currencies, shipping) | 7 |
1345
- | collections | Collection management and metafields | 10 |
1346
- | product-extensions | Product metafields, images, and URL redirects | 9 |
1347
- | content | Pages, blogs, and articles management | 22 |
1348
- | international | Markets, web presence, and translations | 14 |
1349
- | advanced-redirects | Bulk redirect operations | 4 |
1350
-
1351
- **Role Presets (SHOPIFY_MCP_ROLE):**
1352
- Pre-configured module sets for common workflows:
1353
- - inventory-manager: Core only (15 tools) - stock management
1354
- - product-manager: Core + store-context + collections + product-extensions (41 tools)
1355
- - content-manager: Core + content (37 tools) - pages and blogs
1356
- - seo-specialist: Core + collections + product-extensions + advanced-redirects (38 tools)
1357
- - international-manager: Core + store-context + international + collections (46 tools)
1358
- - full-access: All modules (81 tools) - full store administration
1359
-
1360
- ## KEY CONCEPTS
1329
+ var COMMON_INSTRUCTIONS = `## KEY CONCEPTS
1361
1330
 
1362
1331
  - **Products & Variants**: Products contain variants; each variant has its own price, SKU, and inventory
1363
1332
  - **Multi-location Inventory**: Inventory is tracked per variant AND per location
@@ -1395,12 +1364,82 @@ Pre-configured module sets for common workflows:
1395
1364
  ## WORKFLOW HINTS
1396
1365
 
1397
1366
  - Tool descriptions include **Prerequisites:** and **Follow-ups:** for multi-step operations
1398
- - Check tool category and relationships for semantic grouping
1367
+ - Check tool category and relationships for semantic grouping`;
1368
+ var LAZY_LOADING_INSTRUCTIONS = `This MCP server provides access to a Shopify store's Admin API.
1369
+
1370
+ ## TOOL MODULES (Modular Architecture)
1371
+
1372
+ Tools are organized into modules for optimal AI performance. Start with core tools and load additional modules as needed.
1373
+
1374
+ **Discovery & Loading:**
1375
+ - Use "list-modules" to see all available modules and their loading status
1376
+ - Use "load-module" with module name to enable additional tools
1377
+ - Tool responses may include suggestions for relevant modules to load
1378
+
1379
+ **Available Modules:**
1380
+ | Module | Description | Tools |
1381
+ |--------|-------------|-------|
1382
+ | core | Products, inventory, store info (always loaded) | 15 |
1383
+ | store-context | Extended store configuration (features, currencies, shipping) | 7 |
1384
+ | collections | Collection management and metafields | 10 |
1385
+ | product-extensions | Product metafields, images, and URL redirects | 9 |
1386
+ | content | Pages, blogs, and articles management | 22 |
1387
+ | international | Markets, web presence, and translations | 14 |
1388
+ | advanced-redirects | Bulk redirect operations | 4 |
1389
+
1390
+ **Role Presets (SHOPIFY_MCP_ROLE):**
1391
+ Pre-configured module sets for common workflows:
1392
+ - inventory-manager: Core only (15 tools) - stock management
1393
+ - product-manager: Core + store-context + collections + product-extensions (41 tools)
1394
+ - content-manager: Core + content (37 tools) - pages and blogs
1395
+ - seo-specialist: Core + collections + product-extensions + advanced-redirects (38 tools)
1396
+ - international-manager: Core + store-context + international + collections (46 tools)
1397
+ - full-access: All modules (81 tools) - full store administration
1398
+
1399
+ ${COMMON_INSTRUCTIONS}
1399
1400
  - After successful operations, note any module suggestions in the response`;
1401
+ var FULL_ACCESS_INSTRUCTIONS = `This MCP server provides access to a Shopify store's Admin API.
1402
+
1403
+ ## AVAILABLE TOOLS
1404
+
1405
+ All tools are available immediately. This server provides comprehensive Shopify Admin API coverage:
1406
+
1407
+ **Core Operations:**
1408
+ - Products: list, get, create, update, delete products and variants
1409
+ - Inventory: multi-location stock management, bulk queries, low inventory alerts
1410
+ - Store Info: basic info, limits, features, currencies, shipping, taxes, policies
1411
+
1412
+ **Content Management:**
1413
+ - Pages: create, update, delete store pages
1414
+ - Blogs & Articles: manage blog content with SEO optimization
1415
+
1416
+ **Collections:**
1417
+ - Create, update, delete collections
1418
+ - Manage product-collection relationships
1419
+ - Collection metafields for custom data
1420
+
1421
+ **SEO & Redirects:**
1422
+ - URL redirects for SEO preservation
1423
+ - Bulk redirect operations for migrations
1424
+ - Product metafields for SEO data
1425
+
1426
+ **International:**
1427
+ - Markets: manage selling regions
1428
+ - Translations: localize product content
1429
+ - Web presence configuration
1430
+
1431
+ ${COMMON_INSTRUCTIONS}`;
1432
+ function getServerInstructions(config) {
1433
+ if (config && isLazyLoadingEnabled(config)) {
1434
+ return LAZY_LOADING_INSTRUCTIONS;
1435
+ }
1436
+ return FULL_ACCESS_INSTRUCTIONS;
1437
+ }
1400
1438
  function getServerVersion() {
1401
1439
  return packageJson.version;
1402
1440
  }
1403
- function createServer() {
1441
+ function createServer(config) {
1442
+ const instructions = getServerInstructions(config);
1404
1443
  const server = new McpServer(
1405
1444
  // Server info (sent to clients in initialize response)
1406
1445
  {
@@ -1417,8 +1456,8 @@ function createServer() {
1417
1456
  logging: {}
1418
1457
  // Enable logging capability (AC-9.5.1.2)
1419
1458
  },
1420
- instructions: SERVER_INSTRUCTIONS,
1421
- // Provide Shopify context to AI agents (AC-9.5.1.1)
1459
+ instructions,
1460
+ // Provide mode-aware Shopify context to AI agents (AC-9.5.1.1)
1422
1461
  // Epic 12: Notification debouncing for module loading (AC-12.1.6)
1423
1462
  // When multiple tools are enabled in rapid succession (e.g., loading a module),
1424
1463
  // coalesce into a single notifications/tools/list_changed notification
@@ -14409,11 +14448,14 @@ function registerAllTools(server) {
14409
14448
  registerGetStoreTaxesTool();
14410
14449
  registerGetStorePoliciesTool();
14411
14450
  registerGetStoreAlertsTool();
14412
- registerListModulesTool();
14413
- registerLoadModuleTool();
14414
- const totalToolCount = getToolNames().length;
14415
14451
  const config = getConfig();
14416
- if (isLazyLoadingEnabled(config)) {
14452
+ const lazyLoadingEnabled = isLazyLoadingEnabled(config);
14453
+ if (lazyLoadingEnabled) {
14454
+ registerListModulesTool();
14455
+ registerLoadModuleTool();
14456
+ }
14457
+ const totalToolCount = getToolNames().length;
14458
+ if (lazyLoadingEnabled) {
14417
14459
  applyLazyLoading();
14418
14460
  const roleResult = applyRolePreset(config);
14419
14461
  const enabledCount = getRegisteredTools().length;
@@ -14430,7 +14472,7 @@ function registerAllTools(server) {
14430
14472
  `Enabled tools: ${getRegisteredTools().map((t) => t.name).join(", ")}`
14431
14473
  );
14432
14474
  } else {
14433
- log.info(`Lazy loading disabled (legacy mode): ${totalToolCount} tools registered`);
14475
+ log.info(`Lazy loading disabled: ${totalToolCount} tools registered (all tools available)`);
14434
14476
  log.debug(`All tools: ${getToolNames().join(", ")}`);
14435
14477
  }
14436
14478
  }
@@ -14680,7 +14722,7 @@ if (args.includes("--version") || args.includes("-v")) {
14680
14722
  async function main() {
14681
14723
  try {
14682
14724
  const config = getConfig();
14683
- const server = createServer();
14725
+ const server = createServer(config);
14684
14726
  registerResources(server);
14685
14727
  registerAllTools(server);
14686
14728
  const transportType = config.TRANSPORT;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anton.andrusenko/shopify-mcp-admin",
3
- "version": "1.1.0",
4
- "description": "MCP server for Shopify Admin API - enables AI agents to manage Shopify stores with 71 tools for products, inventory, collections, content, SEO, metafields, markets & translations",
3
+ "version": "1.1.2",
4
+ "description": "MCP server for Shopify Admin API - enables AI agents to manage Shopify stores with 79 tools for products, inventory, collections, content, SEO, metafields, markets & translations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -24,10 +24,8 @@
24
24
  "inspect": "npx @modelcontextprotocol/inspector node dist/index.js",
25
25
  "inspect:dev": "npx @modelcontextprotocol/inspector npx tsx src/index.ts",
26
26
  "inspect:config": "npx @modelcontextprotocol/inspector --config mcp-inspector.json",
27
- "fast-agent": "fast-agent",
28
- "fast-agent:check": "fast-agent check",
29
- "fast-agent:chat": "fast-agent go --servers shopify-mcp-admin",
30
- "fast-agent:dev": "fast-agent go --servers shopify-mcp-admin-dev",
27
+ "librechat:setup": "./scripts/setup-librechat.sh",
28
+ "librechat:setup:local": "./scripts/setup-librechat.sh --use-local",
31
29
  "ci": "npm run lint && npm run typecheck && npm run test && npm run build",
32
30
  "version:patch": "npm version patch --no-git-tag-version",
33
31
  "version:minor": "npm version minor --no-git-tag-version",