# mcloud-auth

mcloud-auth — a skill for Medusa Cloud CLI authentication and context commands: login, logout, status checks, switching organizations and projects.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 429 installs · ★ 237 repo stars
- Author: medusajs
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/medusajs/medusa-agent-skills/tree/HEAD/plugins/medusa-cloud/skills/mcloud-auth/SKILL.md
- Updated: 2026-10-21
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/mcloud-auth

## What it does

Executes `mcloud login`, `logout`, `whoami`, `use`, `version`, and `signup` via terminal. Checks whether the user is authenticated, which organization and project are active, switches context between environments. Before any operation the skill calls `mcloud whoami --json | jq -e '.auth.kind != "none"'` to verify authentication.

Interactive commands (`mcloud login` without flags, `mcloud use` without arguments) require a TTY and fail in CI, Docker, or piped input. For non-interactive login the skill uses `MCLOUD_TOKEN` or the `--token` flag. When the `MCLOUD_TOKEN` environment variable is set, file-based credentials are ignored — to switch accounts unset it.

The skill relies on `jq` to parse JSON responses and build context-checking scripts. Without `jq` installed status verification scripts will not run.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-auth -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/mcloud-auth/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/mcloud-auth/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-auth -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/mcloud-auth/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-auth -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/mcloud-auth/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install medusajs/medusa-agent-skills plugins/medusa-cloud/skills/mcloud-auth
```

2. **Manually: put the files in place**
- File: `.github/skills/mcloud-auth/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-auth -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/medusajs/medusa-agent-skills --path plugins/medusa-cloud/skills/mcloud-auth
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/mcloud-auth/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add medusajs/medusa-agent-skills --skill mcloud-auth -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/medusajs/medusa-agent-skills/tree/HEAD/plugins/medusa-cloud/skills/mcloud-auth/SKILL.md

## When to use it
- verify Medusa Cloud authentication status before running commands
- switch active organization, project or environment in the CLI
- log in via token in CI or Docker without opening a browser
- retrieve CLI version and platform metadata
- clear saved context and log out of the account

## Example prompts
- Check if I'm logged into Medusa Cloud
- Switch context to organization `org_123`, project `my-store`, environment `production`
- Log out of Medusa Cloud

## Similar
- [Faable — Deploy & Auth](https://affpapa.org/en/nevibecode/mcp/faable-deploy-auth.md) — MCP server · ★ 1 repo stars
- [Anythink all-in-one backend: data, auth, files, workflows, payments, APIs](https://affpapa.org/en/nevibecode/mcp/anythink-all-in-one-backend-data-auth-files-workflows-payments-apis.md) — MCP server · ★ 6 repo stars
- [auth-wechat-miniprogram](https://affpapa.org/en/nevibecode/skills/auth-wechat-miniprogram.md) — skill · 2200 installs
- [auth-tool-cloudbase](https://affpapa.org/en/nevibecode/skills/auth-tool-cloudbase.md) — skill · 1000 installs
- [Phase Two Keycloak](https://affpapa.org/en/nevibecode/mcp/phase-two-keycloak.md) — MCP server · ★ 5 repo stars
- [mixpanel-auth](https://affpapa.org/en/nevibecode/skills/mixpanel-auth.md) — skill · ★ 8052 repo stars

From the same set: [medusajs/medusa-agent-skills](https://affpapa.org/en/nevibecode/by/medusajs/medusa-agent-skills.md) — 17 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
