> ## Documentation Index
> Fetch the complete documentation index at: https://docs.controlplane.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code

> Connect Claude Code to Control Plane to deploy and operate your infrastructure through natural-language conversations.

<Tip>
  We recommend the [Control Plane AI Plugin](/ai/plugin) for Claude Code. The plugin bundles the MCP server.
</Tip>

## Prerequisites

<CardGroup cols={2}>
  <Card title="Claude Code" icon="https://mintcdn.com/controlplanecorporation/rFQpIcXts1y-5L7u/icons/claude.svg?fit=max&auto=format&n=rFQpIcXts1y-5L7u&q=85&s=8b0f9fcceff42ac846ff975af5126fb4" width="248" height="248" data-path="icons/claude.svg">
    Download [Claude Code](https://claude.com/product/claude-code)
  </Card>

  <Card title="Control Plane account" icon="user">
    Sign up at [console.cpln.io](https://console.cpln.io) if you don't have an account yet
  </Card>
</CardGroup>

## Add the MCP server

<Steps>
  <Step title="Register the server">
    Use the `claude mcp add` command:

    ```bash theme={null}
    claude mcp add --transport http cpln "https://mcp.cpln.io/mcp?toolsets=full" --scope user
    ```

    The **user** scope makes the server available across all your projects. Use `--scope project` to add it for the current directory only.

    <Note>
      `?toolsets=full` serves the complete tool catalog — what the plugin configures for every client. Claude Code loads tool schemas on demand, so the full catalog costs nothing up front (see [toolset profiles](/ai/mcp#toolset-profiles)).
    </Note>

    <Tip>
      See the [Claude Code MCP installation scopes](https://code.claude.com/docs/en/mcp#mcp-installation-scopes) for the full set of scope options.
    </Tip>
  </Step>

  <Step title="Sign in">
    Launch Claude Code. It detects the new server and reports that authentication is required. Run `/mcp`, navigate to **cpln**, and choose **Authenticate** — your browser opens:

    1. Sign in to Control Plane (Google, GitHub, Microsoft, or SAML).
    2. Select the orgs you want this Claude Code install to access.
    3. Click **Authorize**.

    Your browser shows a success page — close the tab and return to Claude Code.
  </Step>

  <Step title="Verify">
    In Claude Code, ask: "list GVCs in org `<your-org>`" (using one of the orgs you authorized). You should see the GVCs in that org.
  </Step>
</Steps>

## Example conversation

<Steps>
  <Step title="Set Context">
    ```
    Use org "my-org" and gvc "my-gvc" for context.
    ```
  </Step>

  <Step title="Deploy a Workload">
    ```
    Create a publicly accessible workload called "my-api" using nginx:latest on port 80.
    ```
  </Step>

  <Step title="Get the Endpoint">
    ```
    Monitor the readiness of my-api and give me the public endpoint once it's ready.
    ```
  </Step>
</Steps>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Browser didn't open for sign-in">
    Some terminal setups can't launch a browser. Claude Code prints a fallback URL — copy it into a browser on the same machine and complete sign-in there.
  </Accordion>

  <Accordion title="Need to change which orgs are authorized">
    In Claude Code, run `/mcp`, select **cpln**, and choose **Re-authenticate**. Sign in again and adjust your org selections on the consent screen.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Usage Examples" icon="lightbulb" href="/ai/examples">
    Practical prompts for common Control Plane workflows
  </Card>

  <Card title="AI Plugin" icon="puzzle-piece" href="/ai/plugin">
    Layer skills, agents, slash commands, and guardrails on top of the MCP server
  </Card>
</CardGroup>
