npm · legion-mcp
MCP_TRANSPORT (required) — Run the installed package over MCP stdio (the binary defaults to HTTP).
DEFAULT_BASE_URL — Default OpenAI Responses-compatible API root for model files that omit baseUrl.
DEFAULT_API_KEY · secret — Default provider or gateway key for model files that omit apiKey.
ALLOW_NO_MODELS (required) — Boot without any config/models/*.json. The package ships only key-free examples, which the scanner ignores, so this must stay true until a real model file exists beside the working directory.
OPENAI_API_KEY · secret — Optional. A model file's apiKey may be "env:VAR" to read the key from an environment variable named VAR at startup; name those variables here as needed. The bundled gpt example reads this one.
MAX_ROUNDS — Maximum discussion rounds accepted by a council run.
TOKEN_BUDGET — Optional soft cumulative token budget for a council run.
DYNAMIC_ROLES — Allow callers to define ad-hoc council roles inline.
LOG_LEVEL — Logging verbosity. Logs are written to stderr for stdio safety.
ASYNC_TOOLS — Run councils in the background: council tools return a job handle and poll/cancel tools are exposed. Jobs live in process memory only.
TRUST_PROXY_AUTH — Bind async jobs to the caller named by X-MS-CLIENT-PRINCIPAL-* headers. Only safe behind an ingress that strips client-supplied copies.