# GitHub Copilot CLI

GitHub Copilot CLI can read your fivebar stats over MCP, and answer questions about them.

Ask it about your sites in your own words, such as why traffic jumped on Tuesday, and it answers from your figures, following fivebar’s rules about what they mean. Working in your site’s code, it can also [add fivebar to it](https://fiveb.ar/docs/coding-assistants.md) and check it’s working. Connecting is adding fivebar’s address, signing in and choosing Allow, with no key to copy.

## Before you start

Version 0.0.389 or later, which added signing in to MCP servers.

## Add fivebar

Run:

```
copilot mcp add --transport http fivebar https://fiveb.ar/api/mcp
```

Or, in a session, run `/mcp add`. Either way it’s kept in `~/.copilot/mcp-config.json`:

```
{
  "mcpServers": {
    "fivebar": {
      "type": "http",
      "url": "https://fiveb.ar/api/mcp",
      "tools": [
        "*"
      ]
    }
  }
}
```

## Sign in

Until you sign in, fivebar shows as needing it. In a session, run `/mcp auth fivebar`, and your browser opens.

fivebar opens in your browser. Sign in if you need to, check that the page names GitHub Copilot CLI, and choose Allow. GitHub Copilot CLI can then [read the stats](https://fiveb.ar/docs/mcp.md#what-an-app-can-read) of every site on your Sites page, and changes nothing of yours unless you also tick the box to let it [change settings](https://fiveb.ar/docs/mcp.md#changing-settings).

## Try it

Ask GitHub Copilot CLI about your sites in your own words, such as:

- Which pages did best last week, and where did their visitors come from?
- How does this month compare with last month so far?
- How many people are on my site right now?

## Removing it

Delete fivebar from `~/.copilot/mcp-config.json`.

To stop GitHub Copilot CLI reading your stats from fivebar’s side, disconnect it in [Settings](https://fiveb.ar/settings).

More in [GitHub Copilot CLI’s own documentation](https://docs.github.com/en/copilot/reference/copilot-cli-reference/cli-command-reference).
