> ## 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 Cursor

> Connect Cursor to Lightsage MCP with a global or project MCP JSON config.

Cursor can connect to remote MCP servers from a global MCP config or a project-level MCP config. Use this guide to connect Cursor 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 Lightsage MCP to Cursor">
    Add Lightsage MCP with the Cursor CLI:

    ```bash theme={null}
    cursor --add-mcp '{"name":"lightsage","url":"https://mcp.lightsage.com/mcp","headers":{"X-Lightsage-Api-Key":"${env:LIGHTSAGE_API_KEY}"}}'
    ```

    You can also add Lightsage MCP to `~/.cursor/mcp.json` for global access, or `.cursor/mcp.json` inside one project:

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

    The CLI stores the same server under Cursor user settings.
  </Step>

  <Step title="Enable the server">
    Open **Cursor Settings → Tools & Integrations → MCP tools** and verify that `lightsage` is enabled.

    If you use Cursor Agent CLI in a headless environment, enable and verify the server from the project directory:

    ```bash theme={null}
    agent mcp enable lightsage
    agent mcp list
    agent mcp list-tools lightsage
    ```

    Then run a read-only prompt:

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

See the [Cursor MCP docs](https://cursor.com/docs/mcp) for config locations and remote server authentication.
