Magento Cloud MCP Server

io.github.juan-cinto-infracommerce由 GitHub 帳號 juan-cinto-infracommerce 發布v2.4.0更新於 Oct 24, 2026

MCP server for Adobe Commerce Cloud — REST API + SSH, no PHP CLI required

發布方自己的服務:magento.watch

概覽

AI 產生的概覽

本機 MCP 伺服器,讓 AI 助理透過 REST API 與 SSH 檢視和管理 Adobe Commerce Cloud 專案,不需 PHP CLI。

可以做什麼
透過 REST API 列出專案、環境、環境詳細資訊與公開網址、活動及其日誌、變數,以及含版本與磁碟配置的服務。對遠端環境資料庫執行唯讀 SQL 查詢。讀取伺服器日誌並列出可用日誌類型。取得服務連線資訊,例如主機、連接埠與憑證。透過 SSH 設定 Magento 設定值、建立環境分支並推送本機 git 分支。
適用情境
適用於使用 Adobe Commerce Cloud 專案的情境:希望助理檢視環境、讀取日誌與活動、執行唯讀資料庫查詢,或進行限定範圍的設定與分支變更,而不想安裝 Magento Cloud PHP CLI。
執行需求
以 npm 套件形式透過 npx 在本機執行;需要 Node.js 20+ 與 ssh 執行檔(Linux 與 macOS 預設提供)。驗證方式為使用 Adobe/Magento 帳號的瀏覽器 OAuth2 登入,或透過環境變數 MAGENTO_CLOUD_CLI_TOKEN 提供 API 權杖。僅支援桌面用戶端。
安裝前請注意
API 權杖可完整存取該帳號能觸及的所有專案,應視為敏感機密;權杖外洩須立即撤銷。瀏覽器登入會在本機儲存更新權杖。寫入類工具會變更遠端狀態:set_cloud_config 修改 Magento 設定(正式環境會被阻擋),create_branch 建立環境,push_branch 推送 git 分支。服務連線資訊輸出可能暴露資料庫憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Magento Cloud MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-magento-cloud

MCP (Model Context Protocol) server for Adobe Commerce Cloud. Allows AI agents to interact with Magento Cloud projects — query databases, read logs, list environments, inspect activities, and more.

No PHP CLI required — uses the REST API and SSH directly.

Versions

VersionDescriptionRequirements
v2.x (latest)REST API + SSH directly. Browser login or API token.Node.js 20+, ssh binary
v1.xWraps the magento-cloud PHP CLI.Node.js 20+, magento-cloud CLI installed

Using a specific version

bash
# Latest (v2.x)npx -y mcp-magento-cloud
# v1.x (requires magento-cloud CLI)npx -y [email protected]

Prerequisites (v2.x)

  • Node.js 20+
  • ssh binary — Available by default on Linux/macOS

Quick Start

Authentication

Automatic browser login (recommended)

No setup required. The first time you use any tool, a browser window will open automatically for OAuth2 login via your Adobe/Magento account. Credentials are stored locally in ~/.config/mcp-magento-cloud/credentials.json and refreshed automatically.

You can also login manually:

bash
npx -y -p mcp-magento-cloud mcp-magento-cloud-login
API token (alternative)

If you prefer using an API token (e.g. for CI/CD), create one at https://accounts.magento.cloud/user/api-tokens and pass it as an environment variable (MAGENTO_CLOUD_CLI_TOKEN). When a token is set, browser login is skipped.

Security note: API tokens grant full access to all projects your account has access to. Treat them as sensitive secrets. If a token is compromised, revoke it immediately at the URL above.

Configure your MCP client

Kilo

In ~/.config/kilo/kilo.json:

json
{  "mcp": {    "magento-cloud": {      "type": "local",      "command": ["npx", "-y", "mcp-magento-cloud"]    }  }}

If using an API token instead of browser login, add the environment key:

json
{  "mcp": {    "magento-cloud": {      "type": "local",      "command": ["npx", "-y", "mcp-magento-cloud"],      "environment": {        "MAGENTO_CLOUD_CLI_TOKEN": "your-api-token-here"      }    }  }}
Claude Desktop

In claude_desktop_config.json:

json
{  "mcpServers": {    "magento-cloud": {      "command": "npx",      "args": ["-y", "mcp-magento-cloud"]    }  }}
Gemini CLI

In ~/.gemini/settings.json:

json
{  "mcpServers": {    "magento-cloud": {      "command": "npx",      "args": ["-y", "mcp-magento-cloud"]    }  }}

Available Tools

REST API Tools

ToolDescription
list_projectsList all projects available to the current user
list_environmentsList all environments for a project
get_environment_infoGet detailed info about an environment
get_environment_urlsGet the public URLs of an environment
list_activitiesList recent activities with filters
get_activity_logDisplay the full log for an activity
list_variablesList project or environment variables
list_servicesList services with versions and disk allocation

SSH Tools

ToolDescription
execute_sqlExecute a read-only SQL query on the remote database
get_environment_logsRead server logs (deploy, error, cron, etc.)
get_environment_relationshipsGet service connection details (host, port, credentials)
list_log_typesList available log types

Write Tools

ToolDescription
set_cloud_configSet a Magento config value via bin/magento config:set over SSH (supports scope/scope_code and encrypted values). Blocked on the production environment.
create_branchCreate a new environment branch cloned from integration
push_branchPush a local git branch to the project using SSH certificate auth

Security

  • SQL queries are validated — only SELECT, SHOW, DESCRIBE, and EXPLAIN are allowed
  • SQL comments are stripped and multiple statements are blocked to prevent injection
  • Production is protected — set_cloud_config refuses to run against the production environment; such changes must be made manually
  • SSH authentication uses temporary Ed25519 certificates signed by the Magento Cloud API
  • Browser login stores refresh tokens locally with 0600 permissions
  • API tokens should be treated as sensitive secrets — they grant full access to all projects

Testing with MCP Inspector

bash
# Browser login will open automatically on first tool usenpx @modelcontextprotocol/inspector node dist/main.js
# Or with API tokenMAGENTO_CLOUD_CLI_TOKEN=your-token npx @modelcontextprotocol/inspector node dist/main.js

Development

bash
git clone https://github.com/juan-cinto-infracommerce/mcp-magento-cloud.gitcd mcp-magento-cloudnpm installnpm run buildnpm start

License

MIT

來源:README.md,提交 edd5c9d

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Magento 整合