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

# Configuration

> Connect popular MCP clients to Variable.

Before you start, confirm MCP is enabled for your account — check the **MCP URL** row in [Company settings](https://app.variable.global/company). Clients will connect even without it, but every tool call fails with an `MCP access is not enabled for this account…` error pointing at the EnableMcp flag.

The MCP endpoint is:

```
https://app.variable.global/mcp
```

## Chat clients

### Claude Desktop

Claude Desktop supports remote MCP servers with OAuth out of the box.

1. Open **Settings -> Connectors -> Add custom connector**.
2. Give it a name (e.g. `Variable`) and paste `https://app.variable.global/mcp` as the **URL**.
3. Claude Desktop opens a browser to Variable, you sign in, pick an account, and click **Allow**.

That's it. Claude Desktop refreshes the token automatically; you'll only see the consent screen again if you revoke access or sign out.

### ChatGPT

ChatGPT supports remote MCP servers as Connectors. Under **Settings -> Connectors -> Create**, paste `https://app.variable.global/mcp`, complete the OAuth flow in the popup, and the Variable tools become available in any conversation where Connectors are enabled.

### Microsoft Copilot Studio

Copilot Studio supports remote MCP servers as tools that can be added to an agent. In the agent's **Tools** section, add a new Model Context Protocol tool, paste `https://app.variable.global/mcp` as the server URL, and complete the OAuth sign-in for your Variable account. The Variable tools then become available to anyone using that agent.

See Microsoft's [Copilot Studio MCP docs](https://learn.microsoft.com/en-us/microsoft-copilot-studio/agent-extend-action-mcp) for the latest setup steps and admin requirements.

## Coding clients

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

## Verifying the connection

Once you're connected, try asking your client *"list my Variable accounts"*. It will reply with the accounts you belong to, whether MCP is turned on for each one, and which one is currently active.

If MCP isn't turned on for the account you want, [email us](mailto:hello@variable.co?subject=MCP%20Access) and we'll enable it. To work in a different account right now, ask your client to switch — e.g. *"switch my Variable account to ACME Furniture"*. Your choice is remembered for that client, so future sessions start in the same place.

## Troubleshooting

| Symptom                                                                | Likely cause                                                                                                                                                                              |
| ---------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `MCP access is not enabled for this account…` error on every tool call | The active account doesn't have the MCP flag enabled. Ask your client to list your Variable accounts to find one that does, or [email us](mailto:hello@variable.co?subject=MCP%20Access). |
| `401 Unauthorized` immediately after connecting                        | OAuth token expired or was revoked. Reconnect from your client's MCP settings to re-run the consent flow.                                                                                 |
| `403` with `code -32000`                                               | MCP flag is off for the active account (same as the first row).                                                                                                                           |
| Stuck on the consent screen                                            | Make sure you're signed in to [app.variable.global](https://app.variable.global) in the same browser. Consent is bound to your Variable session.                                          |
| Client connects but no tools appear                                    | Most clients require an explicit "Authenticate" step before they load the tool list. Trigger it from the client's MCP UI.                                                                 |
