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

# Coding clients

> Connect Claude Code, Cursor, and GitHub Copilot in VS Code to Variable.

Coding clients add Variable from a config file or command. Each one opens a browser to Variable the first time it connects: sign in, pick an account, and select **Allow**. Tokens refresh automatically after that.

Before you start, check MCP is enabled for your account: the **MCP URL** row in [Company settings](https://app.variable.global/company) should show **Enabled**.

## Claude Code

Claude Code (CLI and VS Code extension) supports remote MCP servers via `claude mcp add`:

```bash theme={"system"}
claude mcp add --transport http variable https://app.variable.global/mcp
```

Then run `/mcp` inside Claude Code and select **Authenticate** for the `variable` server. A browser opens for the OAuth consent step. Tokens persist across sessions.

To share the server with your team via version control, commit a `.mcp.json` file at your project root:

```json theme={"system"}
{
  "mcpServers": {
    "variable": {
      "type": "http",
      "url": "https://app.variable.global/mcp"
    }
  }
}
```

Everyone on the team gets the same config when they open the project in Claude Code.

## Cursor

Cursor supports remote MCP servers via `mcp.json`:

```json theme={"system"}
{
  "mcpServers": {
    "variable": {
      "url": "https://app.variable.global/mcp"
    }
  }
}
```

Save the file (or use **Cursor Settings -> MCP -> Add new MCP server**) and Cursor will prompt for OAuth on first use.

## GitHub Copilot (VS Code)

GitHub Copilot in VS Code supports remote MCP servers via `.vscode/mcp.json` (workspace) or the global user configuration (**MCP: Open User Configuration**):

```json theme={"system"}
{
  "servers": {
    "variable": {
      "type": "http",
      "url": "https://app.variable.global/mcp"
    }
  }
}
```

VS Code prompts for OAuth on first use. See VS Code's [MCP servers docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) for the latest details.

If something goes wrong, see the [troubleshooting table](https://docs.variable.global/mcp/configuration#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.