> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getunleash.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server.

# Integrate Unleash with GitHub Copilot

> Configure the Unleash MCP server to automate feature flag management in GitHub Copilot across VS Code, JetBrains, Visual Studio, Neovim, and Copilot CLI.

The [Unleash MCP server](/integrate/mcp) connects [GitHub Copilot](https://github.com/features/copilot) to your Unleash instance, enabling AI-assisted feature flag management directly in your IDE. This page covers how to install and configure the server for Copilot. To learn what the server can do, see [Unleash MCP server](/integrate/mcp).

GitHub Copilot supports MCP in several environments:

* [Visual Studio Code](https://code.visualstudio.com/) with full MCP support available in versions 1.102+.
* [JetBrains IDEs](https://www.jetbrains.com/) with IntelliJ IDEA, PyCharm, WebStorm, and others AI Assistant.
* [Visual Studio](https://visualstudio.microsoft.com/) with the GitHub Copilot extension.
* [Neovim](https://neovim.io/) with community plugins like [mcphub.nvim](https://github.com/ravitemer/mcphub.nvim).
* [Copilot CLI](https://github.com/features/copilot/cli), a command-line interface.
* On [GitHub.com](https://github.com/features/copilot), a web-based Copilot (no MCP support).

## Prerequisites

Before you begin, make sure you have the following:

* Node.js 24 or later: the MCP server is distributed as an npm package.
* A supported IDE, see environment-specific requirements [here](#configure-your-ide).
* An Unleash instance: cloud or self-hosted, with API access enabled.
* A [personal access token](/concepts/api-tokens-and-client-keys#personal-access-tokens) (PAT) with permissions to create and manage feature flags.

## Install the MCP server

The Unleash MCP server runs as a local stdio process. Configuration differs by environment, but all IDEs use the same npm package and credentials.

First, create a shared credentials file that works across all environments:

**`~/.unleash/mcp.env`**

```bash title="~/.unleash/mcp.env"
UNLEASH_BASE_URL={{UNLEASH_BASE_URL}}
UNLEASH_PAT={{UNLEASH_PAT}}
# Optional: set to true or false to opt in to or out of feedback reports without a consent prompt
# UNLEASH_MCP_SEND_FEEDBACK=false
```

### Configure your IDE

#### Visual Studio Code

**Requirements:** Visual Studio Code 1.102 or later with GitHub Copilot extension.

#### Create the configuration file

Create a file at `.vscode/mcp.json` in your project root:

**`.vscode/mcp.json`**

```json title=".vscode/mcp.json"
{
  "servers": {
    "unleash-mcp": {
      "name": "Unleash MCP",
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@unleash/mcp@latest"],
      "envFile": "~/.unleash/mcp.env"
    }
  }
}
```

#### Reload VS Code

After saving the file, reload Visual Studio Code by running **Developer: Reload window** from the Command Palette. The MCP server starts automatically when you open the project.

#### Verify the installation

1. Open the Chat view (`Cmd+Shift+I` on Mac, `Ctrl+Alt+I` on Windows/Linux).
2. Click the **Tools** icon in the chat toolbar.
3. Select the Unleash MCP tools in the list.

> **Tip**
>
> If the tools don't appear, run **MCP: List Servers** from the Command Palette and select **Show Output** to view server logs.

**Global configuration:** To use the MCP server across all projects, run **MCP: Add Server** from the Command Palette and choose **Global**.

**Remote development:** For Dev Containers, WSL, or SSH, define the server in the remote `.vscode/mcp.json` or in the `customizations.vscode.mcp` section of `devcontainer.json`.

#### JetBrains IDEs

**Requirements:** IntelliJ IDEA, PyCharm, WebStorm, or another JetBrains IDE with AI Assistant plugin.

> **Info**
>
> JetBrains AI Assistant MCP support is evolving. Check the [JetBrains AI Assistant documentation](https://www.jetbrains.com/help/idea/ai-assistant.html) for the latest capabilities.

#### Go to AI Assistant settings

Go to **Settings > Tools > AI Assistant > MCP Servers**.

#### Add the Unleash MCP server

Click **Add** and configure:

* **Name:** `Unleash MCP`
* **Command:** `npx`
* **Arguments:** `-y @unleash/mcp@latest`
* **Environment variables:**
  * `UNLEASH_BASE_URL`: Your Unleash API URL
  * `UNLEASH_PAT`: Your personal access token

#### Enable the server

Ensure the server is enabled and restart the IDE if prompted.

> **Note**
>
> JetBrains does not currently support `envFile`. You must configure environment variables directly in the settings or use system environment variables.

#### Visual Studio

**Requirements:** Visual Studio 2022 or later with GitHub Copilot extension.

> **Info**
>
> Visual Studio MCP support is currently in preview. Check the [Visual Studio Copilot documentation](https://learn.microsoft.com/en-us/visualstudio/ide/visual-studio-github-copilot-extension) for the latest capabilities.

#### Open Copilot settings

Go to **Tools** → **Options** → **GitHub Copilot** → **MCP Servers**.

#### Add the Unleash MCP server

Click **Add** and configure:

* **Name:** `Unleash MCP`
* **Command:** `npx -y @unleash/mcp@latest`
* **Working directory:** Your project root
* **Environment variables:** Configure `UNLEASH_BASE_URL`, `UNLEASH_PAT`,

#### Restart Visual Studio

Restart Visual Studio to activate the MCP server.

#### Neovim

**Requirements:** Neovim 0.9+ with a Copilot plugin and MCP support.

> **Info**
>
> The official copilot.vim plugin does not support MCP. Use community plugins like [mcphub.nvim](https://github.com/ravitemer/mcphub.nvim) for MCP integration.

#### Install mcphub.nvim

Add mcphub.nvim to your plugin manager. For example, with lazy.nvim:

**`init.lua`**

```lua title="init.lua"
{
  "ravitemer/mcphub.nvim",
  dependencies = { "nvim-lua/plenary.nvim" },
  config = function()
    require("mcphub").setup({
      servers = {
        ["unleash-mcp"] = {
          command = "npx",
          args = { "-y", "@unleash/mcp@latest" },
          env = {
            UNLEASH_BASE_URL = os.getenv("UNLEASH_BASE_URL"),
            UNLEASH_PAT = os.getenv("UNLEASH_PAT")
          }
        }
      }
    })
  end
}
```

#### Set environment variables

Export the required variables in your shell configuration:

**`~/.zshrc or ~/.bashrc`**

```bash title="~/.zshrc or ~/.bashrc"
export UNLEASH_BASE_URL="https://your-instance.getunleash.io"
export UNLEASH_PAT="your-personal-access-token"
```

#### Restart Neovim

Restart Neovim and verify the MCP server is available.

#### Copilot CLI

**Requirements:** [GitHub Copilot CLI](https://github.com/github/copilot-cli) installed and authenticated.

GitHub Copilot CLI is a terminal-native interface to GitHub Copilot's coding agent. It supports custom MCP servers via the `/mcp add` slash command, which means you can use the Unleash MCP server directly from your terminal.

> **Warning**
>
> Copilot CLI is in public preview. The configuration interface may change. Check the [official Copilot CLI documentation](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/use-copilot-cli#add-an-mcp-server) for the latest instructions.

#### Install Copilot CLI

Choose your preferred installation method:

#### macOS/Linux (Homebrew)

```bash
brew install copilot-cli
```

#### Windows (WinGet)

```bash
winget install GitHub.Copilot
```

#### npm (cross-platform)

```bash
npm install -g @github/copilot
```

#### Start Copilot CLI

Navigate to your project directory and launch the CLI:

```bash
cd /path/to/your/project
copilot
```

If prompted, trust the current directory and authenticate with `/login`.

#### Add the Unleash MCP server

Use the `/mcp add` slash command:

```text
/mcp add
```

Fill in the following details (use Tab to move between fields):

| Field       | Value                        |
| ----------- | ---------------------------- |
| **Name**    | `unleash-mcp`                |
| **Type**    | `local`                      |
| **Command** | `npx -y @unleash/mcp@latest` |
| **Tools**   | `*`                          |

For environment variables, add:

* `UNLEASH_BASE_URL`: `https://your-instance.getunleash.io`
* `UNLEASH_PAT`: Your personal access token

Press `Ctrl+S` to save the configuration.

You will see a confirmation message such as "MCP configuration saved successfully! Changes will take effect immediately."

#### Verify the installation

Run the `/mcp show` command to confirm the server is configured:

```text
/mcp show
```

You should see `unleash-mcp` listed with its tools. Alternatively, ask Copilot to evaluate a change or create a feature flag to confirm the tools are working. If Copilot cannot see the Unleash MCP server, check the `~/.copilot/mcp-config.json` file and verify if the environment variables have been configured correctly.

> **Note**
>
> Configuration is stored in `~/.copilot/mcp-config.json`. You can also edit this file directly using the [MCP JSON structure](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/extend-coding-agent-with-mcp#writing-a-json-configuration-for-mcp-servers).

#### GitHub.com

**Status:** No MCP support

GitHub Copilot on github.com is designed for code review, issue triage, and pull request descriptions. It does not currently support custom MCP servers for feature flag management.

**Recommended workflow:**

* Use your IDE to manage feature flags with the MCP server.
* Use github.com Copilot for reviewing flag-related pull requests.

## Verify the installation

After configuring your IDE, verify that the Unleash MCP tools are available. Try one of the following prompts:

```
1. Show me the available tools of the Unleash MCP server.
2. Use the Unleash MCP server to list my Unleash projects.
```

## Tools and workflows

Once the server is connected, Copilot can use every tool the Unleash MCP server exposes. To learn what the server can do and see step-by-step [workflows](/integrate/mcp#workflows), read [Unleash MCP server](/integrate/mcp). For the current list of tools, see the [README on GitHub](https://github.com/Unleash/unleash-mcp#tools).

### Feedback reports

In VS Code and JetBrains IDEs, Copilot shows a consent prompt in the chat the first time the assistant tries to send a [feedback report](/integrate/mcp#send-feedback). The MCP server saves whether you opted in or out, so you see the prompt only once.

To opt in or out in Visual Studio, Eclipse, or Xcode, or to skip the prompt, add `UNLEASH_MCP_SEND_FEEDBACK=true` or `UNLEASH_MCP_SEND_FEEDBACK=false` to `~/.unleash/mcp.env`. In IDEs that don't support `envFile`, set the variable with your other Unleash variables. To learn what a report contains, see [What is recorded](/integrate/mcp#what-is-recorded).

## Troubleshooting

#### MCP tools not showing up

#### VS Code

* Check that `.vscode/mcp.json` is in the project root.
* Verify the env file path is correct and the file exists.
* Confirm Node.js and npm are available in your terminal.
* Check that your Unleash PAT has the required permissions.

Run **MCP: List Servers** from the Command Palette and select **Show Output** to view server logs.

#### JetBrains

* Verify the AI Assistant plugin is installed and enabled.
* Check that the MCP server is listed in **Settings > Tools > AI Assistant > MCP Servers**.
* Confirm environment variables are set correctly.
* Restart the IDE after making changes.

#### Neovim

* Verify mcphub.nvim or your MCP plugin is installed correctly.
* Check that environment variables are exported in your shell.
* Run `:checkhealth` to verify plugin status.
* Check plugin logs for connection errors.

#### Copilot CLI

* Verify the server was saved after running `/mcp add`.
* Check `~/.copilot/mcp-config.json` for syntax errors.
* Confirm environment variables are set in the server configuration.
* Restart the Copilot CLI session after adding a new server.
* Check that Node.js and npm are available in your PATH.

#### Authentication failed

* Confirm your Unleash PAT is valid and has permissions to create and manage feature flags.
* Check that `UNLEASH_BASE_URL` does not include `/api` at the end.
* For GitHub Enterprise plans, ensure the "MCP servers in Copilot" policy is enabled.

#### Too many tools in the tool picker

Visual Studio Code limits a single chat session to 128 tools. If you have many MCP servers installed:

* Create a tool set with only the Unleash tools you need.
* Deselect tools from other MCP servers you're not actively using.

#### Server not starting in remote containers

When using Dev Containers, WSL, or SSH remote development:

* Define the server in the remote `.vscode/mcp.json` or in the `customizations.vscode.mcp` section of `devcontainer.json`.
* Ensure Node.js is available in the container.

#### envFile not supported

Some IDEs (JetBrains, Visual Studio) do not support the `envFile` property. In these cases:

* Set environment variables directly in the IDE's MCP configuration.
* Use system-level environment variables in your shell profile.
* For CI/CD, use secrets management to inject variables.

#### Feedback is disabled

`send_feedback` returns this message if you declined the consent prompt, if your IDE couldn't show it, or if `UNLEASH_MCP_SEND_FEEDBACK` is set to `false`. To opt in, add `UNLEASH_MCP_SEND_FEEDBACK=true` to `~/.unleash/mcp.env` and restart the server. In IDEs that don't support `envFile`, add the variable to the IDE's MCP `env` configuration instead. To see the consent prompt again, delete `feedback_consent.json` from the [configuration directory](/integrate/mcp#consent). Feedback settings don't affect flag operations.

## Related resources

* [Unleash MCP server on GitHub](https://github.com/Unleash/unleash-mcp)
* [GitHub Copilot meets progressive delivery](https://getunleash.io/blog/github-copilot-meets-progressive-delivery)
* [How to automate feature flags in GitHub Copilot](https://getunleash.io/blog/automate-feature-flags-github-copilot)
* [Impact Metrics](/concepts/impact-metrics)
* [Unleash architecture overview](/get-started/unleash-overview)
* [Visual Studio Code MCP server documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers)