← Alle Verbindungen

Mit GitHub Copilot CLI verbinden

GitHub Copilot CLI — copilot in the terminal, with MCP via command or file.

Erstellen Sie vorab Ihr kostenloses Konto.Konto erstellen

Dieser Inhalt ist auf Englisch verfügbar.

Welchen MCP möchten Sie verbinden? Die Befehle unten passen sich Ihrer Auswahl an.

  1. 1

    Install the Copilot CLI

    Requires Node.js 22 or later. Via npm, on any system:

    npm install -g @github/copilot

    Erwartet: On Windows there's also winget install GitHub.Copilot; on macOS and Linux, brew install --cask copilot-cli.

  2. 2

    Open it and sign in

    Run copilot in the terminal. On the first run, use /login to sign in with your GitHub account.

    copilot
  3. 3

    Generate your API key

    Sign in to app.newalgorithm.io with your account, open Keys & apps and generate a key. It is shown only once: copy it and store it somewhere safe.

    Key format
    na_live_xxxxxxxxxxxxxxxxx
  4. 4

    Add NewAlgorithm

    Straight from the terminal, without entering the interactive session, replacing YOUR_API_KEY with the key you generated:

    copilot mcp add --transport http --header "Authorization: Bearer YOUR_API_KEY" NewAlgorithm-TOTVS https://totvs.mcp.newalgorithm.io/mcp

    Erwartet: The server is saved to your user configuration, in ~/.copilot/mcp-config.json, and works in any folder.

  5. 5

    Or write the configuration directly

    Same result, useful for reviewing or versioning per project (.mcp.json or .github/mcp.json at the repository root):

    ~/.copilot/mcp-config.json
    {
      "mcpServers": {
        "NewAlgorithm-TOTVS": {
          "type": "http",
          "url": "https://totvs.mcp.newalgorithm.io/mcp",
          "headers": {
            "Authorization": "Bearer na_live_xxxxxxxxxxxxxxxxx"
          },
          "tools": ["*"]
        }
      }
    }
  6. 6

    Confirm

    From the terminal, listing every configuration source:

    copilot mcp list

    Erwartet: NewAlgorithm-TOTVS http https://totvs.mcp.newalgorithm.io/mcp

  7. 7

    Or inside the session

    In the interactive session, /mcp show lists the servers and the state of each one; /mcp add opens the form to register another one without leaving the terminal.

    /mcp show

The user-level mcp-config.json lives outside the repository — it's the right place for the key. If you choose the project's .mcp.json, it's versioned along with the code: never leave the Bearer token there in plain text.

Details zu Authentifizierung und Tools in der Dokumentation.