## Install Lightsage MCP in Claude Code

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

### 1. 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`:

```shell
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.

### 2. Add the Lightsage MCP server

Add Lightsage as a remote HTTP MCP server:

```shell
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
{
  "mcpServers": {
    "lightsage": {
      "type": "http",
      "url": "https://mcp.lightsage.com/mcp",
      "headers": {
        "X-Lightsage-Api-Key": "${LIGHTSAGE_API_KEY}"
      }
    }
  }
}
```

### 3. Verify Claude Code sees Lightsage

Check that Claude Code can load the server:

```shell
claude mcp list
```

Then run a read-only prompt:

```text
Use the Lightsage MCP server to check my Lightsage auth status.
```

See the [Claude Code MCP docs](https://docs.anthropic.com/en/docs/claude-code/mcp) for scopes, approval, and OAuth behavior.
