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

# Environment Variables

> Configuration reference for the Leeroopedia MCP server

All configuration is done via environment variables, typically set in the env block of your MCP config.

## Variables

| Variable                     | Required | Default                                                    | Description                           |
| ---------------------------- | -------- | ---------------------------------------------------------- | ------------------------------------- |
| LEEROOPEDIA\_API\_KEY        | Yes      | --                                                         | Your Leeroopedia API key              |
| LEEROOPEDIA\_API\_URL        | No       | [https://api.leeroopedia.com](https://api.leeroopedia.com) | API endpoint URL                      |
| LEEROOPEDIA\_POLL\_MAX\_WAIT | No       | 300                                                        | Max seconds to wait for a search task |
| LEEROOPEDIA\_POLL\_INTERVAL  | No       | 0.5                                                        | Initial poll interval in seconds      |

## API Key

Get your API key at [app.leeroopedia.com](https://app.leeroopedia.com):

1. Create an account or log in
2. Navigate to **Dashboard > API Keys**
3. Copy your key (format: kpsk\_...)

## Poll Settings

The MCP client uses an async task pattern with exponential backoff:

* **LEEROOPEDIA\_POLL\_MAX\_WAIT** -- Increase if searches frequently time out
* **LEEROOPEDIA\_POLL\_INTERVAL** -- The initial poll interval. Grows by 1.5x, capped at 5s

<Warning>
  Setting LEEROOPEDIA\_POLL\_MAX\_WAIT too low may cause timeouts on complex queries. The default of 300 seconds works well for most use cases.
</Warning>

## Custom API URL

For self-hosted or staging environments, override the API URL by setting LEEROOPEDIA\_API\_URL in your MCP config env block.
