Claude Code

Last updated:

This guide connects Claude Code — Anthropic's agentic coding tool — to American Cloud. Claude Code is the most powerful pairing for the MCP server: it can manage your infrastructure and run commands in your terminal, so it can provision a server and deploy to it in the same session. The hosted server needs one command and a sign-in. The local server runs on your machine with an API token.

Hosted server

Connect

Add the server, then sign in:

sh
claude mcp add --transport http americancloud https://mcp.americancloud.com/mcp

Start Claude Code and run /mcp. Choose americancloud and follow the sign-in in your browser: sign in to American Cloud, then click Connect on the consent page. Claude Code holds the connection from then on.

By default this configures the server for the current project only. To make it available in every project, add --scope user:

sh
claude mcp add --transport http --scope user americancloud https://mcp.americancloud.com/mcp

You receive an email that confirms the connection. If you did not connect Claude Code, open Connected apps and revoke it.

Claude Code starts with full access. Claude Code is a known app, so the connection begins with Full access as you, within your own American Cloud role: it can list, create, change and delete the resources of each service. To limit it, open Connected apps and choose Read-only or Custom. The change applies to Claude Code's next request; you do not need to sign in again.

Verify

Inside a Claude Code session, run /mcp to see the server's connection status and tools, or just ask:

What regions can I deploy to on American Cloud?

Sharing with your team

To check the server into a repository so teammates get it automatically, use --scope project, which writes a .mcp.json file at the project root. The hosted server needs no secret in the file, so it is safe to commit:

json
{
  "mcpServers": {
    "americancloud": {
      "type": "http",
      "url": "https://mcp.americancloud.com/mcp"
    }
  }
}

Each teammate signs in once with their own American Cloud account and gets their own row in Connected apps, capped by their own role.

Permissions

The app starts with Full access as you, within your own American Cloud role (see the note above). Claude Code asks permission before each tool call (configurable per tool), and destructive operations are explicitly flagged. To limit the app to read-only, or to revoke it, open Connected apps. The overview explains the permission model.

Troubleshooting

  • /mcp shows the server as failed or needs authentication — choose the server in /mcp and sign in again. This happens after a revoke, or when a sign-in expires.
  • A tool answers that the app lacks a permission — choose the permission on Connected apps and ask again. Every tool is visible from the start, and a permission change applies to the next request.
  • "This app was disconnected in Connected apps." — someone revoked the app. Wait a few minutes, then sign in again from /mcp.

Local server

Prerequisites

Configure

Add the server with one command:

sh
claude mcp add americancloud \
  --env AMERICANCLOUD_API_TOKEN=your-api-token \
  -- npx -y @americancloud/mcp

By default this configures the server for the current project only. To make it available in every project, add --scope user:

sh
claude mcp add americancloud --scope user \
  --env AMERICANCLOUD_API_TOKEN=your-api-token \
  -- npx -y @americancloud/mcp

An API key from before tokens existed (a client ID and secret) still works: pass --env AMERICANCLOUD_API_CLIENT_ID=… and --env AMERICANCLOUD_API_CLIENT_SECRET=… instead of the token.

Verify

Inside a Claude Code session, run /mcp to see the server's connection status and tools, or just ask:

What regions can I deploy to on American Cloud?

Sharing with your team

To check the local server into a repository, use --scope project, which writes a .mcp.json file at the project root. Reference environment variables instead of hardcoding secrets:

json
{
  "mcpServers": {
    "americancloud": {
      "command": "npx",
      "args": ["-y", "@americancloud/mcp"],
      "env": {
        "AMERICANCLOUD_API_TOKEN": "${AMERICANCLOUD_API_TOKEN}"
      }
    }
  }
}

Each teammate sets the variable in their own shell environment, with their own token.

Never commit a real token. The ${VAR} form is expanded by Claude Code from each user's environment at launch.

Enable resource management (optional)

By default the local server is read-only. To let Claude Code create and manage resources, use a token with Full access and add --allow-writes after the package name:

sh
claude mcp add americancloud \
  --env AMERICANCLOUD_API_TOKEN=your-api-token \
  -- npx -y @americancloud/mcp --allow-writes

Claude Code asks permission before each tool call (configurable per tool), and destructive operations are explicitly flagged.

The build-and-deploy workflow

Where this setup shines: Claude Code combines American Cloud tools with your terminal. A single session can:

  1. Write or modify your application code
  2. Create a VM with your SSH key, configure firewall rules, and point DNS at it — via the MCP server
  3. Deploy and verify over SSH — via your shell

Register your SSH key first. Before the first VM, ask the agent to register your machine's public key, for example ~/.ssh/id_ed25519.pub, with American Cloud, then to create the VM with that key. Your machine then logs in with the key it already has, and no VM password is needed. The server's own instructions tell the agent to do this; the ask makes sure.

Try:

Create a small Ubuntu VM in us-west with my SSH key, open ports 22 and 80, wait for it to come up, then install nginx over SSH and confirm it serves the default page.

[ claude code · provision and deploy ]
Provision a server and deploy to it in one session — cost shown first, you approve the writes.

Or for Kubernetes:

Fetch the kubeconfig for my production cluster and check whether all deployments are healthy.

Next steps

  • Things to try — more prompt ideas
  • Overview — the permission model, service groups, --services scoping, and safety details
Contact us