> ## 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 Claude Code

> Connect Claude Code to Lightsage MCP with a remote HTTP server and the X-Lightsage-Api-Key header.

Claude Code supports remote HTTP MCP servers and custom authentication headers. Use this guide to connect Claude Code to the hosted Lightsage MCP endpoint.

<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 the Lightsage MCP server">
    Add Lightsage as a remote HTTP MCP server:

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

    You can also use a shared `.mcp.json` with environment variable expansion:

    ```json theme={null}
    {
      "mcpServers": {
        "lightsage": {
          "type": "http",
          "url": "https://mcp.lightsage.com/mcp",
          "headers": {
            "X-Lightsage-Api-Key": "${LIGHTSAGE_API_KEY}"
          }
        }
      }
    }
    ```
  </Step>

  <Step title="Verify Claude Code sees Lightsage">
    Check that Claude Code can load the server:

    ```bash theme={null}
    claude 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 [Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp) for scopes, approval, and OAuth behavior.
