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

# Claude Code

> Use the LightOn MCP server directly from Claude Code.

## Prerequisites

* [Claude Code](https://claude.ai/code) installed
* A LightOn API key from the [LightOn Console](https://console.lighton.ai)

## Configuration

Run this command once to register the LightOn server globally; Claude Code will store your API key and send it as a Bearer token on every request.

```bash theme={null}
claude mcp add lighton https://api.lighton.ai/mcp \
  --transport http --scope user \
  --header "Authorization: Bearer $LIGHTON_API_KEY"
```

<Note>
  `$LIGHTON_API_KEY` is interpolated by your shell when you run the command and the value is stored in Claude Code's config. Make sure it is set, you can grab your key from the [LightOn Console](https://console.lighton.ai). Omit `--scope user` to register the server for the current project only.
</Note>

## Verification

1. Confirm the server is registered:

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

2. Use the `/mcp` command inside a Claude Code session to view available tools and server status.

3. Test the connection with a prompt like:

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

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

## References

* [Claude Code docs: Model Context Protocol](https://docs.anthropic.com/en/docs/claude-code/mcp)
