NestDaddy

Legion

io.github.faulkj/legion ยท v0.8.0

MCP-native LLM councils for debates, juries, blind panels, refinement, and custom deliberation.

Connect Runs on your machine

Terminal
claude mcp add legion -e MCP_TRANSPORT=<MCP_TRANSPORT> -e DEFAULT_BASE_URL=<DEFAULT_BASE_URL> -e DEFAULT_API_KEY=<DEFAULT_API_KEY> -e ALLOW_NO_MODELS=<ALLOW_NO_MODELS> -e OPENAI_API_KEY=<OPENAI_API_KEY> -e MAX_ROUNDS=<MAX_ROUNDS> -e TOKEN_BUDGET=<TOKEN_BUDGET> -e DYNAMIC_ROLES=<DYNAMIC_ROLES> -e LOG_LEVEL=<LOG_LEVEL> -e ASYNC_TOOLS=<ASYNC_TOOLS> -e TRUST_PROXY_AUTH=<TRUST_PROXY_AUTH> -- npx -y [email protected]
claude_desktop_config.json
{
  "mcpServers": {
    "legion": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MCP_TRANSPORT": "<MCP_TRANSPORT>",
        "DEFAULT_BASE_URL": "<DEFAULT_BASE_URL>",
        "DEFAULT_API_KEY": "<DEFAULT_API_KEY>",
        "ALLOW_NO_MODELS": "<ALLOW_NO_MODELS>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "MAX_ROUNDS": "<MAX_ROUNDS>",
        "TOKEN_BUDGET": "<TOKEN_BUDGET>",
        "DYNAMIC_ROLES": "<DYNAMIC_ROLES>",
        "LOG_LEVEL": "<LOG_LEVEL>",
        "ASYNC_TOOLS": "<ASYNC_TOOLS>",
        "TRUST_PROXY_AUTH": "<TRUST_PROXY_AUTH>"
      }
    }
  }
}
~/.cursor/mcp.json
{
  "mcpServers": {
    "legion": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MCP_TRANSPORT": "<MCP_TRANSPORT>",
        "DEFAULT_BASE_URL": "<DEFAULT_BASE_URL>",
        "DEFAULT_API_KEY": "<DEFAULT_API_KEY>",
        "ALLOW_NO_MODELS": "<ALLOW_NO_MODELS>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "MAX_ROUNDS": "<MAX_ROUNDS>",
        "TOKEN_BUDGET": "<TOKEN_BUDGET>",
        "DYNAMIC_ROLES": "<DYNAMIC_ROLES>",
        "LOG_LEVEL": "<LOG_LEVEL>",
        "ASYNC_TOOLS": "<ASYNC_TOOLS>",
        "TRUST_PROXY_AUTH": "<TRUST_PROXY_AUTH>"
      }
    }
  }
}
.vscode/mcp.json
{
  "servers": {
    "legion": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MCP_TRANSPORT": "<MCP_TRANSPORT>",
        "DEFAULT_BASE_URL": "<DEFAULT_BASE_URL>",
        "DEFAULT_API_KEY": "<DEFAULT_API_KEY>",
        "ALLOW_NO_MODELS": "<ALLOW_NO_MODELS>",
        "OPENAI_API_KEY": "<OPENAI_API_KEY>",
        "MAX_ROUNDS": "<MAX_ROUNDS>",
        "TOKEN_BUDGET": "<TOKEN_BUDGET>",
        "DYNAMIC_ROLES": "<DYNAMIC_ROLES>",
        "LOG_LEVEL": "<LOG_LEVEL>",
        "ASYNC_TOOLS": "<ASYNC_TOOLS>",
        "TRUST_PROXY_AUTH": "<TRUST_PROXY_AUTH>"
      }
    }
  }
}

Replace the values in angle brackets with your own. Keys stay on your machine; we never see them.

Tools

This server runs locally, so its tools are listed by your MCP client once it starts.

Environment variables

NameDescription
MCP_TRANSPORT
Required
Run the installed package over MCP stdio (the binary defaults to HTTP).
DEFAULT_BASE_URL
Optional
Default OpenAI Responses-compatible API root for model files that omit baseUrl.
DEFAULT_API_KEY
Optional, 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
Optional, 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
Optional
Maximum discussion rounds accepted by a council run.
TOKEN_BUDGET
Optional
Optional soft cumulative token budget for a council run.
DYNAMIC_ROLES
Optional
Allow callers to define ad-hoc council roles inline.
LOG_LEVEL
Optional
Logging verbosity. Logs are written to stderr for stdio safety.
ASYNC_TOOLS
Optional
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
Optional
Bind async jobs to the caller named by X-MS-CLIENT-PRINCIPAL-* headers. Only safe behind an ingress that strips client-supplied copies.

Details

Package[email protected] (NPM, stdio)
First published6 Oct 2026
Last updated6 Oct 2026
Registry nameio.github.faulkj/legion

More ai and media servers See all

Listing data from the official MCP registry. Status and tools from NestDaddy's daily check. Browse all MCP servers.