---
title: Configuration
slug: litmus-mcp-server/configuration
docTags: 
createdAt: 2026-05-11T21:40:52.308Z
---

The Litmus MCP server is configured at two layers:

1. **Per-connection credentials** - passed as HTTP headers (SSE) or environment variables (STDIO). The server is stateless; every tool call reads these on demand.
2. **Server-side persistent state** - stored in `/app/.env` and managed via the Web UI. Things like registered Litmus Edge instances, the active one, the preferred LLM provider and model.

## Pages

| Page                     | Layer          | What it covers                                                                                         |
| ------------------------ | -------------- | ------------------------------------------------------------------------------------------------------ |
| [Headers Reference](#)   | Per-connection | The full list of headers the server recognizes, grouped by backend (Litmus Edge, NATS, InfluxDB, LEM). |
| [Multi-Instance Edge](#) | Persistent     | Registering and switching between multiple Litmus Edge devices from one MCP server.                    |
| [LLM Providers](#)       | Persistent     | API keys and model selection for the Web UI's chat.                                                    |

## Where each setting lives

| Setting                                                    | Source                    | Notes                                                        |
| ---------------------------------------------------------- | ------------------------- | ------------------------------------------------------------ |
| `EDGE_URL`, `EDGE_API_CLIENT_ID`, `EDGE_API_CLIENT_SECRET` | Per-request headers       | Mirror of the active instance (see Multi-Instance Edge).     |
| `NATS_*`                                                   | Per-request headers       | Token credentials from Litmus Edge System -> Access Control. |
| `INFLUX_*`                                                 | Per-request headers       | DataHub credentials. Firewall must permit port 8086.         |
| `EDGE_MANAGER_URL`, `EDGE_API_TOKEN`, etc.                 | Per-request headers       | LEM tenant credentials.                                      |
| `EDGE_INSTANCE_{i}_*`, `ACTIVE_EDGE_INSTANCE`              | `.env`                    | Managed by Web UI.                                           |
| `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`    | `.env` (or container env) | Read by the Web UI; not used by the MCP server itself.       |
| `PREFERRED_MODEL`, `PREFERRED_MODEL_ID`                    | `.env`                    | Web UI model selection.                                      |

## Persistent settings survive container replacement only with a volume mount

By default `.env` is inside the container. See [Persistent Configuration](#) for the host-side mount that keeps it.
