{
  "markdown": "# mcp-magento-cloud\n\nMCP (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.\n\n**No PHP CLI required** — uses the REST API and SSH directly.\n\n## Versions\n\n| Version | Description | Requirements |\n|---------|-------------|--------------|\n| **v2.x** (latest) | REST API + SSH directly. Browser login or API token. | Node.js 20+, `ssh` binary |\n| **v1.x** | Wraps the `magento-cloud` PHP CLI. | Node.js 20+, `magento-cloud` CLI installed |\n\n### Using a specific version\n\n```bash\n# Latest (v2.x)\nnpx -y mcp-magento-cloud\n\n# v1.x (requires magento-cloud CLI)\nnpx -y mcp-magento-cloud@1.0.1\n```\n\n## Prerequisites (v2.x)\n\n- **Node.js 20+**\n- **`ssh` binary** — Available by default on Linux/macOS\n\n## Quick Start\n\n### Authentication\n\n#### Automatic browser login (recommended)\n\nNo 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.\n\nYou can also login manually:\n\n```bash\nnpx -y -p mcp-magento-cloud mcp-magento-cloud-login\n```\n\n#### API token (alternative)\n\nIf 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.\n\n> **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.\n\n### Configure your MCP client\n\n#### Kilo\n\nIn `~/.config/kilo/kilo.json`:\n\n```json\n{\n  \"mcp\": {\n    \"magento-cloud\": {\n      \"type\": \"local\",\n      \"command\": [\"npx\", \"-y\", \"mcp-magento-cloud\"]\n    }\n  }\n}\n```\n\nIf using an API token instead of browser login, add the `environment` key:\n\n```json\n{\n  \"mcp\": {\n    \"magento-cloud\": {\n      \"type\": \"local\",\n      \"command\": [\"npx\", \"-y\", \"mcp-magento-cloud\"],\n      \"environment\": {\n        \"MAGENTO_CLOUD_CLI_TOKEN\": \"your-api-token-here\"\n      }\n    }\n  }\n}\n```\n\n#### Claude Desktop\n\nIn `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"magento-cloud\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-magento-cloud\"]\n    }\n  }\n}\n```\n\n#### Gemini CLI\n\nIn `~/.gemini/settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"magento-cloud\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"mcp-magento-cloud\"]\n    }\n  }\n}\n```\n\n## Available Tools\n\n### REST API Tools\n\n| Tool | Description |\n|------|-------------|\n| `list_projects` | List all projects available to the current user |\n| `list_environments` | List all environments for a project |\n| `get_environment_info` | Get detailed info about an environment |\n| `get_environment_urls` | Get the public URLs of an environment |\n| `list_activities` | List recent activities with filters |\n| `get_activity_log` | Display the full log for an activity |\n| `list_variables` | List project or environment variables |\n| `list_services` | List services with versions and disk allocation |\n\n### SSH Tools\n\n| Tool | Description |\n|------|-------------|\n| `execute_sql` | Execute a read-only SQL query on the remote database |\n| `get_environment_logs` | Read server logs (deploy, error, cron, etc.) |\n| `get_environment_relationships` | Get service connection details (host, port, credentials) |\n| `list_log_types` | List available log types |\n\n### Write Tools\n\n| Tool | Description |\n|------|-------------|\n| `set_cloud_config` | Set a Magento config value via `bin/magento config:set` over SSH (supports scope/scope_code and encrypted values). Blocked on the `production` environment. |\n| `create_branch` | Create a new environment branch cloned from integration |\n| `push_branch` | Push a local git branch to the project using SSH certificate auth |\n\n## Security\n\n- **SQL queries are validated** — only SELECT, SHOW, DESCRIBE, and EXPLAIN are allowed\n- SQL comments are stripped and multiple statements are blocked to prevent injection\n- **Production is protected** — `set_cloud_config` refuses to run against the `production` environment; such changes must be made manually\n- SSH authentication uses temporary Ed25519 certificates signed by the Magento Cloud API\n- Browser login stores refresh tokens locally with `0600` permissions\n- API tokens should be treated as sensitive secrets — they grant full access to all projects\n\n## Testing with MCP Inspector\n\n```bash\n# Browser login will open automatically on first tool use\nnpx @modelcontextprotocol/inspector node dist/main.js\n\n# Or with API token\nMAGENTO_CLOUD_CLI_TOKEN=your-token npx @modelcontextprotocol/inspector node dist/main.js\n```\n\n## Development\n\n```bash\ngit clone https://github.com/juan-cinto-infracommerce/mcp-magento-cloud.git\ncd mcp-magento-cloud\nnpm install\nnpm run build\nnpm start\n```\n\n## License\n\nMIT\n",
  "bytes": 4984,
  "sha": "773d1d1bd4af4071f51be0c39d596083d2d79fe42bc4a90b439c25d7ae909d47",
  "repo_slug": "juan-cinto-infracommerce/mcp-magento-cloud",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_juan_cinto_infracommerce_magen_940d7ddc/readme"
}