# Copilot CLI

GitHub Copilot CLI reads MCP servers from a JSON config file in your home directory.

## Add the server

Create a token in the app under **Agent connection**, then add this to `~/.copilot/mcp-config.json`, replacing `<TOKEN>`:

```json
{
  "mcpServers": {
    "blink-artifact": {
      "type": "http",
      "url": "https://artifact.blinkbrosai.com/mcp",
      "headers": { "Authorization": "Bearer <TOKEN>" },
      "tools": ["*"]
    }
  }
}
```

`"tools": ["*"]` enables every blink artifacts tool. If the file already has other servers, add `blink-artifact` next to them inside `mcpServers`. A running session picks up the change; if the tools do not show up, start a new Copilot CLI session.

## The artifact link under the prompt

Copilot CLI can show a clickable `⧉ <title>` under the prompt: the artifact the agent worked on last. Click it to open that artifact in your browser.

It runs a small script that needs Node.js 18 or newer. Download it and save your token where the script can read it, replacing `<TOKEN>`:

```bash
mkdir -p ~/.blink
curl -fsSL https://artifact.blinkbrosai.com/statusline.mjs -o ~/.blink/statusline.mjs
(umask 077; printf '%s\n' '<TOKEN>' > ~/.blink-artifact-token)
```

The script can also read the token from the `BLINK_ARTIFACT_TOKEN` environment variable instead of the file.

Then add this to `~/.copilot/settings.json`:

```json
{
  "statusLine": {
    "type": "command",
    "command": "node ~/.blink/statusline.mjs",
    "refreshInterval": 10
  }
}
```

If the file already has other settings, add `statusLine` next to them. Start a new Copilot CLI session so it shows the line.

## Listening for questions

For the `copilot` harness the listener follows the stream in a background terminal and writes questions to an inbox file; the agent reads unread questions at the start of each turn. Ask Copilot to listen for questions and it gets the commands from `get_listener`. See [Listener & asks_wait](/docs/listener).

## Plugins

Copilot CLI also has plugins (`copilot plugin install`), but it passes a plugin's remote MCP values through literally, without environment-variable expansion. The token would have to sit inside the plugin, so add the server to `~/.copilot/mcp-config.json` as above instead.
