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

# Cursor

> Use the LightOn MCP server directly from Cursor.

## Prerequisites

* [Cursor](https://cursor.com) installed
* A LightOn API key from the [LightOn Console](https://console.lighton.ai)

## Configuration

Cursor configures MCP servers via a JSON file. Add the following to `~/.cursor/mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "lighton": {
      "url": "https://api.lighton.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${env:LIGHTON_API_KEY}"
      }
    }
  }
}
```

<Note>
  `${env:LIGHTON_API_KEY}` is Cursor's syntax for reading an environment variable at runtime. The key is never stored in the config file. Make sure `LIGHTON_API_KEY` is set in your shell environment, you can grab your key from the [LightOn Console](https://console.lighton.ai). To scope the server to a single project instead, place the same snippet in `.cursor/mcp.json` at the root of your project.
</Note>

## Verification

1. Open **Settings → Features → Model Context Protocol** and confirm `lighton` appears in the list.

2. Check the connection logs via **Output** panel (`Cmd+Shift+U`) and select **MCP Logs** from the dropdown.

3. Test the connection with a prompt like:

   ```
   Search my LightOn workspaces for documents about [topic]
   ```

You're all set. From any Cursor session you can now ask it to search or ingest documents in your LightOn workspaces directly.

## References

* [Cursor docs: Model Context Protocol](https://cursor.com/docs/mcp)
