mcp-magento-cms 1.0.2 → 1.0.4

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 (2) hide show
  1. package/README.md +46 -9
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -27,21 +27,37 @@ You do **not** need to clone this repo or create a `.env` file. Cursor runs the
27
27
 
28
28
  ### 1. Magento Integration Access Token
29
29
 
30
- In Magento Admin:
30
+ No clone or `tools/` folder is needed. Create the token in Magento Admin:
31
31
 
32
32
  1. **System → Extensions → Integrations → Add New Integration**
33
- 2. Name it (e.g. `MCP CMS`)
34
- 3. **API** tab: allow **CMS → Pages**, **CMS → Blocks**, and **Content → Design** (`save_design`) as needed
35
- 4. **Save → Activate** → copy the **Access Token**
33
+ 2. Name it (e.g. `MCP CMS`) and set your admin password when prompted
34
+ 3. Open the **API** tab → set **Resource Access** to **Custom**
35
+ 4. Under **Content → Elements**, select:
36
36
 
37
- Magento **2.4.4+** blocks integration tokens as Bearer by default. Enable once on the Magento server:
37
+ | Select | Notes |
38
+ |--------|--------|
39
+ | **Pages** | Required (parent) |
40
+ | → **Save Page** | Create / update pages |
41
+ | → **Edit Page Design** | Page Builder / design fields |
42
+ | → **Delete Page** | Optional (MCP does not delete today) |
43
+ | **Blocks** | Required (create / update blocks) |
44
+
45
+ Leave everything else unchecked (Staging, Widgets, Media Gallery, Amasty, Blog, Design Themes, etc.).
46
+
47
+ 5. **Save → Activate** → copy the **Access Token** into `mcp.json` (step 3)
48
+
49
+ Magento **2.4.4+** blocks integration tokens as Bearer by default. Enable once (either way):
50
+
51
+ **Admin UI:** **Stores → Configuration → Services → OAuth → Consumer Settings** → set **Allow OAuth Access Tokens to be used as standalone Bearer tokens** to **Yes** → Save Config.
52
+
53
+ **CLI:**
38
54
 
39
55
  ```bash
40
56
  bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
41
57
  bin/magento cache:flush config
42
58
  ```
43
59
 
44
- (With ddev: prefix with `ddev exec`.)
60
+ (With ddev: prefix CLI with `ddev exec`.)
45
61
 
46
62
  ### 2. Magento base URL
47
63
 
@@ -69,13 +85,33 @@ Use your storefront base URL **without** a trailing slash, for example:
69
85
  }
70
86
  ```
71
87
 
72
- **Local ddev / mkcert only** — Node may not trust the local TLS cert. Add:
88
+ **Local ddev / self-signed HTTPS** — Node often rejects the local TLS cert and MCP calls fail with `fetch failed`. Add:
73
89
 
74
90
  ```json
75
- "NODE_EXTRA_CA_CERTS": "/absolute/path/to/mkcert/rootCA.pem"
91
+ "NODE_TLS_REJECT_UNAUTHORIZED": "0"
92
+ ```
93
+
94
+ Example for a ddev store:
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "magento-cms": {
100
+ "command": "npx",
101
+ "args": ["-y", "mcp-magento-cms"],
102
+ "env": {
103
+ "MAGENTO_BASE_URL": "https://your-project.ddev.site",
104
+ "MAGENTO_ACCESS_TOKEN": "YOUR_INTEGRATION_ACCESS_TOKEN",
105
+ "NODE_TLS_REJECT_UNAUTHORIZED": "0"
106
+ }
107
+ }
108
+ }
109
+ }
76
110
  ```
77
111
 
78
- Typical Linux path: `$HOME/.local/share/mkcert/rootCA.pem`
112
+ Use this **only for local/dev**. Prefer a trusted public HTTPS cert in production (omit this variable).
113
+
114
+ Optional alternative (if mkcert CA is installed): set `NODE_EXTRA_CA_CERTS` to your mkcert root CA path instead (e.g. `$HOME/.local/share/mkcert/rootCA.pem`).
79
115
 
80
116
  Optional env vars:
81
117
 
@@ -83,6 +119,7 @@ Optional env vars:
83
119
  |----------|---------|---------|
84
120
  | `MAGENTO_STORE_CODE` | (empty) | REST store code |
85
121
  | `MAGENTO_ADMIN_PATH` | `admin` | Admin path used in edit links |
122
+ | `NODE_TLS_REJECT_UNAUTHORIZED` | (unset) | Set `"0"` for local ddev / self-signed SSL |
86
123
 
87
124
  ### 4. Restart MCP
88
125
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-magento-cms",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Cursor MCP: Magento CMS pages/blocks with Page Builder Row→Text (zero npm deps)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",