> ## 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.

# Visual Studio Code

> Connect Visual Studio Code to Control Plane using GitHub Copilot's MCP support to manage your infrastructure from your editor.

<Note>
  For background on MCP servers in VS Code, see the official [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
</Note>

## Prerequisites

<CardGroup cols={2}>
  <Card title="VS Code + GitHub Copilot" icon="https://mintcdn.com/controlplanecorporation/rFQpIcXts1y-5L7u/icons/vscode.svg?fit=max&auto=format&n=rFQpIcXts1y-5L7u&q=85&s=68f269932eab223833a1c4f78d6be90a" width="100" height="100" data-path="icons/vscode.svg">
    Download [VS Code](https://code.visualstudio.com) and install the [GitHub Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) extension
  </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="Run MCP: Add Server">
    Open the Command Palette (`Cmd/Ctrl + Shift + P`) and run **MCP: Add Server**.
  </Step>

  <Step title="Configure">
    Follow the prompts:

    | Prompt      | Value                     |
    | ----------- | ------------------------- |
    | Server type | **HTTP**                  |
    | URL         | `https://mcp.cpln.io/mcp` |
    | Name        | `cpln`                    |
    | Scope       | **Global**                |

    <Note>
      Connecting to the bare URL uses the default **`core`** toolset profile — a focused set that already covers the whole build-and-operate workflow (it can read and delete any resource kind generically, and reach anything else through the raw-API tool), which is the right fit for this client. Append `?toolsets=mk8s` to add BYOK Kubernetes tools, or `?toolsets=full` for everything. See [toolset profiles](/ai/mcp#toolset-profiles).
    </Note>
  </Step>

  <Step title="Allow authentication">
    VS Code shows a permission prompt to authenticate the new server. Click **Allow** — your browser opens.

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

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

  <Step title="Use it">
    Open GitHub Copilot Chat and ask "list GVCs in org `<your-org>`" (using one of the orgs you authorized) to confirm.
  </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="Need to change which orgs are authorized">
    Open the Command Palette → **MCP: List Servers** → select **cpln** → **Sign Out**. Then open **MCP: List Servers** again, select **cpln**, and choose **Start Server** — VS Code prompts you to 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="Template Catalog" icon="grid" href="/template-catalog/overview">
    30+ production-ready templates your AI can deploy on request
  </Card>
</CardGroup>
