npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-magento-cms

v1.0.4

Published

Cursor MCP: Magento CMS pages/blocks with Page Builder Row→Text (zero npm deps)

Downloads

787

Readme

Magento CMS MCP (Cursor)

Create/update Magento CMS Pages / Blocks with Page Builder Row → Text from Cursor chat.

  • AI: Cursor plans the content
  • This server: Magento REST via an Integration Access Token
  • Install: npx (no local clone, no tools/ folder, no .env file required)

Requires Node.js 18+ and Cursor.

Package: npmjs.com/package/mcp-magento-cms

Tools

| Tool | Purpose | |------|---------| | magento_health | Test base URL + token | | get_cms_page | Load by page_id | | create_cms_page | Create from title + content | | update_cms_page | Update by page_id | | get_cms_block / create_cms_block / update_cms_block | Blocks | | list_section_types | Supported layouts (MVP: simple_text) |

Setup (any machine)

You do not need to clone this repo or create a .env file. Cursor runs the package with npx and reads credentials from mcp.json.

1. Magento Integration Access Token

No clone or tools/ folder is needed. Create the token in Magento Admin:

  1. System → Extensions → Integrations → Add New Integration
  2. Name it (e.g. MCP CMS) and set your admin password when prompted
  3. Open the API tab → set Resource Access to Custom
  4. Under Content → Elements, select:

| Select | Notes | |--------|--------| | Pages | Required (parent) | | → Save Page | Create / update pages | | → Edit Page Design | Page Builder / design fields | | → Delete Page | Optional (MCP does not delete today) | | Blocks | Required (create / update blocks) |

Leave everything else unchecked (Staging, Widgets, Media Gallery, Amasty, Blog, Design Themes, etc.).

  1. Save → Activate → copy the Access Token into mcp.json (step 3)

Magento 2.4.4+ blocks integration tokens as Bearer by default. Enable once (either way):

Admin UI: Stores → Configuration → Services → OAuth → Consumer Settings → set Allow OAuth Access Tokens to be used as standalone Bearer tokens to Yes → Save Config.

CLI:

bin/magento config:set oauth/consumer/enable_integration_as_bearer 1
bin/magento cache:flush config

(With ddev: prefix CLI with ddev exec.)

2. Magento base URL

Use your storefront base URL without a trailing slash, for example:

  • Production: https://www.example.com
  • Local ddev: https://your-project.ddev.site (ddev describe shows the URL)

3. Add the MCP in Cursor

Cursor → Settings → MCP → Edit Config, or create .cursor/mcp.json in your project:

{
  "mcpServers": {
    "magento-cms": {
      "command": "npx",
      "args": ["-y", "mcp-magento-cms"],
      "env": {
        "MAGENTO_BASE_URL": "https://www.example.com",
        "MAGENTO_ACCESS_TOKEN": "YOUR_INTEGRATION_ACCESS_TOKEN"
      }
    }
  }
}

Local ddev / self-signed HTTPS — Node often rejects the local TLS cert and MCP calls fail with fetch failed. Add:

"NODE_TLS_REJECT_UNAUTHORIZED": "0"

Example for a ddev store:

{
  "mcpServers": {
    "magento-cms": {
      "command": "npx",
      "args": ["-y", "mcp-magento-cms"],
      "env": {
        "MAGENTO_BASE_URL": "https://your-project.ddev.site",
        "MAGENTO_ACCESS_TOKEN": "YOUR_INTEGRATION_ACCESS_TOKEN",
        "NODE_TLS_REJECT_UNAUTHORIZED": "0"
      }
    }
  }
}

Use this only for local/dev. Prefer a trusted public HTTPS cert in production (omit this variable).

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).

Optional env vars:

| Variable | Default | Purpose | |----------|---------|---------| | MAGENTO_STORE_CODE | (empty) | REST store code | | MAGENTO_ADMIN_PATH | admin | Admin path used in edit links | | NODE_TLS_REJECT_UNAUTHORIZED | (unset) | Set "0" for local ddev / self-signed SSL |

4. Restart MCP

In Cursor MCP settings, refresh/restart the magento-cms server until it shows connected.

5. Verify

In Cursor chat:

Use magento_health to verify Magento.

Then try:

Create a CMS page titled "MCP Demo" with this content:
First paragraph.
Second paragraph.
Update CMS page_id 8 with content: Updated body for page 8.

Security

  • Put tokens only in mcp.json / Cursor env (do not commit them)
  • Give the Magento integration CMS-only permissions

Requirements

  • Node.js 18+ on the machine running Cursor
  • Magento 2 with REST and an Integration token
  • Network access from that machine to MAGENTO_BASE_URL

For package maintainers

Clone this repo to develop or republish. Bump version in package.json, then:

npm publish --access public