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 列出项目、环境、环境详情与公开 URL、活动及其日志、变量,以及带版本和磁盘分配的服务。对远程环境数据库执行只读 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 集成