# cloudpin

> cloudpin is an open-source MCP server for cloud and infrastructure. Read-only checks that cloud CLI commands run on the accounts a project pins. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, macOS, Windows, Linux
- **Repository:** https://github.com/paureis/cloudpin
- **MCP Registry name:** io.github.paureis/cloudpin
- **Categories:** [cloud and infrastructure](https://ai-powered.com/categories/cloud-and-infrastructure), [security](https://ai-powered.com/categories/security), [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-23

## About

The CLI behind this server solves a simple but costly mistake: az, aws, gcloud, vercel, gh, kubectl, helm, supabase and wrangler act on whichever account or cluster you used last. A project commits a .cloudpin.yml naming the Azure subscription, AWS account, Google project, Vercel team, GitHub user, Kubernetes server, Supabase project or Cloudflare account it should use. Before a guarded command runs, cloudpin works out which account that command would use, taking its flags and environment variables into account, and compares it with the file.

The MCP server is described in the registry as read-only checks, so an agent can ask whether a command would hit the pinned account without running it. Beyond MCP, the tool installs hooks for Claude Code, Codex, Cursor, Copilot, Gemini and others, adds shell functions for bash, zsh and PowerShell, and ships a GitHub Action that checks accounts before a deploy job. Commands include init, check, switch, status, explain, doctor and exec.

It needs Node.js 22 or later and runs on Windows, macOS and Linux. The README lists install routes through pnpm, npm, Homebrew, Scoop and winget.

## Features

- **Account pinning file:** A committed .cloudpin.yml lists the accounts each CLI should use.
- **Command-level resolution:** Works out the account a specific command would hit, honouring flags and environment.
- **Agent hooks:** Installs guards for Claude Code, Codex, Cursor, Copilot, Gemini and others.
- **Explain and doctor:** Shows why a command is blocked and checks the whole setup.
- **Switch to pinned account:** Plans and runs each CLI's own switch commands, then rechecks.
- **CI action:** A GitHub Action checks accounts before a deploy job.

## Good for

- Stop an agent deploying to a personal account instead of a work one
- Verify the active cloud accounts before a CI deploy
- Share the same account guardrails across a team repo
- Understand why a command was blocked
- Protect a terminal from running kubectl on the wrong cluster

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add cloudpin -- npx -y cloudpin
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add cloudpin -- npx -y cloudpin
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.cloudpin]
command = "npx"
args = ["-y", "cloudpin"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user cloudpin npx -- -y cloudpin

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "cloudpin": {
      "command": "npx",
      "args": [
        "-y",
        "cloudpin"
      ]
    }
  }
}
```

## FAQ

### Which CLIs are covered?

az, aws, gcloud, vercel, gh, kubectl, helm, supabase and wrangler.

### What does the MCP server do?

The registry describes it as read-only checks that cloud CLI commands run on the pinned accounts.

### What does cloudpin need?

Node.js 22 or later, on Windows, macOS or Linux.

### How do I try cloudpin without installing?

Run npx cloudpin --help.

### Can I undo cloudpin?

Yes, with uninstall-hook, removing the shell-init line and deleting .cloudpin.yml.

### Is cloudpin free?

Yes. cloudpin is open source, so you can use and self-host it for free.

### How do I add cloudpin to Claude Code?

Run this command in your terminal: claude mcp add cloudpin -- npx -y cloudpin

### What are the best alternatives to cloudpin?

The closest alternatives to cloudpin are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.

## Where this comes from

- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/cloudpin
