Skip to navigation

Integrate Unleash with GitHub Copilot

View as Markdown

The Unleash MCP server connects GitHub 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.

GitHub Copilot supports MCP in several environments:

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.
  • An Unleash instance: cloud or self-hosted, with API access enabled.
  • A personal access token (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
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

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

1

Create the configuration file

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

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

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.

3

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.

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.

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, read Unleash MCP server. For the current list of tools, see the README on GitHub.

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

Troubleshooting

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

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

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.

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.

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.

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. Feedback settings don’t affect flag operations.