> ## Documentation Index
> Fetch the complete documentation index at: https://lightsage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Install Lightsage MCP in GitHub Copilot

> Connect GitHub Copilot to Lightsage MCP from VS Code or Copilot CLI.

Use this guide for GitHub Copilot in VS Code and GitHub Copilot CLI. Both can connect to remote HTTP MCP servers.

<Steps>
  <Step title="Get your Lightsage API key">
    Open the [Lightsage dashboard](https://app.lightsage.com/settings/api), copy your API key, and store it as `LIGHTSAGE_API_KEY`:

    ```bash theme={null}
    export LIGHTSAGE_API_KEY="ls_cli_your_api_key"
    ```

    Do not put your API key in shared project config, screenshots, issue reports, or public repositories.
  </Step>

  <Step title="Add Lightsage MCP to GitHub Copilot in VS Code">
    Open the command palette and run **MCP: Open User Configuration**. Add Lightsage to your user `mcp.json`:

    ```json theme={null}
    {
      "inputs": [
        {
          "id": "lightsage-api-key",
          "type": "promptString",
          "description": "Lightsage API key",
          "password": true
        }
      ],
      "servers": {
        "lightsage": {
          "type": "http",
          "url": "https://mcp.lightsage.com/mcp",
          "headers": {
            "X-Lightsage-Api-Key": "${input:lightsage-api-key}"
          }
        }
      }
    }
    ```

    Keep this in user configuration unless your team has a shared secret-management pattern for workspace MCP config.
  </Step>

  <Step title="Optional: add Lightsage MCP to Copilot CLI">
    For Copilot CLI, add Lightsage with the MCP command:

    ```bash theme={null}
    copilot mcp add --transport http \
      --header "X-Lightsage-Api-Key: ${LIGHTSAGE_API_KEY}" \
      lightsage https://mcp.lightsage.com/mcp
    ```

    You can also add Lightsage to `~/.copilot/mcp-config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "lightsage": {
          "type": "http",
          "url": "https://mcp.lightsage.com/mcp",
          "headers": {
            "X-Lightsage-Api-Key": "ls_cli_your_api_key"
          },
          "tools": ["*"]
        }
      }
    }
    ```

    Use this only for private user config. Do not commit static API keys.
  </Step>

  <Step title="Verify GitHub Copilot tools">
    In VS Code, run **MCP: List Servers** and start the `lightsage` server if it is not already running.

    In Copilot CLI, run:

    ```bash theme={null}
    copilot mcp list
    ```

    Then run a read-only prompt:

    ```text theme={null}
    Use the Lightsage MCP server to check my Lightsage auth status.
    ```
  </Step>
</Steps>

See the [VS Code MCP configuration reference](https://code.visualstudio.com/docs/agents/reference/mcp-configuration) and [GitHub Copilot CLI MCP docs](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers).
