Legion logo

Legion

Route OpenAI Responses-compatible models into MCP tools for debates, juries, panels, and custom deliberation.

Install Legion

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "legion": {
      "command": "npx",
      "args": [
        "-y",
        "legion-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The legion MCP server exposes configured language models as individual MCP tools and coordinates them into multi-model councils. It sends requests through the OpenAI Responses API format, connecting directly to OpenAI or Azure, or through compatible gateways such as LiteLLM. Use it when an agent needs debates, juries, blind panels, refinement workflows, workshops, or other configured deliberation patterns. Models, roles, presets, prompts, and other settings live in JSON and Markdown configuration files.

Use cases

  • Run a multi-model debate over a question
  • Assign models to jury or review roles
  • Compare independent answers through a blind panel
  • Create a reusable deliberation preset
  • Route non-OpenAI models through a compatible gateway

Key features

  • Individual MCP tools for configured models
  • Multi-model quorum orchestration
  • Preset-based councils
  • Hot-reloadable roles and configuration
  • OpenAI Responses API-compatible routing
  • Stateless calls with structured metadata

Tools4

What Legion lets your agent do. Expand a tool for its parameters.

Self-reported~7 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

9/9 checks healthy over the last 46d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 4d ago via OSV.dev · legion-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads483Package downloads in the last 30 days.
Last commit21d agoMost recent push to the default branch.
Tools exposed4Callable tools this server registers over MCP.

How Legion works

What legion MCP server does

The legion MCP server turns configured language models into MCP tools. Each model file produces a separate tool named from its filename, allowing the calling model to choose among available models based on their descriptions. A model call can include a prompt and optional context, role, system instructions, temperature, and token limits.

The quorum tool sends one request to multiple selected models. It supports assigned roles, parallel or multi-round discussion, visibility settings, and synthesis, returning the individual answers separately. Configured presets provide named councils for workflows such as debates, courtroom-style judgments, code review, and other custom arrangements. Each preset is exposed as its own tool.

How it works

All model requests use the OpenAI Responses API wire format. OpenAI and Azure endpoints can be used directly; other providers need an endpoint or gateway that accepts this format, such as LiteLLM. Legion does not include provider-specific adapters or a built-in model catalog.

Calls are stateless and use store: false. The server does not maintain a database or conversation history. Model identity and telemetry are returned in structured content rather than added to the answer text, while logs are written to stderr for stdio safety.

Setup and configuration

Running the legion MCP server requires Node.js 24 or newer and at least one OpenAI Responses-compatible endpoint. The npm setup can be started with npx legion-mcp; a source checkout uses npm install and a local .env file.

At least one real model file must exist under config/models/. npm's bundled example files contain no keys and are ignored by the model scanner, so an npm installation needs a user-provided model file. Each file specifies a deployed model identifier and can optionally define its endpoint, key, baseline system instructions, omitted request parameters, reasoning effort, and maximum output tokens. API keys may be loaded from environment variables with the env: prefix.

Configuration also supports Markdown role files, JSON preset files, prompt and error text, schemas, and a description. Local configuration overlays bundled defaults by file or key. HTTP reloads configuration for each request; stdio reads it once per connection, so edits take effect after the client reconnects.

Tools and capabilities

  • Individual tools for every configured model.
  • quorum for ad-hoc multi-model calls.
  • Preset-specific tools for pre-staffed councils.
  • Roles with reusable or inline instructions.
  • Parallel, multi-round, visibility, and synthesis options for council workflows.
  • Per-model limits and parameter omission for endpoint-specific behavior.

The separate prompt tool is also exposed by the server, alongside quorum and the generated model and preset tools.

Limitations and notes

The server needs at least one configured model and a compatible endpoint. It does not adapt provider-specific APIs itself, persist conversations, or provide a database. Bundled configuration cannot be deleted through the overlay mechanism; local files can override or add entries. Stdio clients must reconnect before configuration edits become active.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Legion

legion is an MCP server that connects configured language models through OpenAI Responses API-compatible endpoints, including OpenAI, Azure, or gateways such as LiteLLM. Its main tools are `prompt` for model calls and `quorum` for multi-model councils, with generated tools for individual models and configured presets.

Install it with `npx legion-mcp`, or clone the repository and run `npm install`. You must also provide at least one real model file in `config/models/` and configure an OpenAI Responses-compatible endpoint and credentials.

Add a JSON file under `config/models/` describing the deployed model identifier and endpoint details. The filename becomes the model tool name. HTTP reloads the file on the next request; stdio loads it when the client creates a new connection.

Legion communicates over MCP and can be configured as an MCP server, with model and council tools determined by the files in its configuration directory.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewLegion AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/legion?style=directory)](https://allmcps.com/mcp/legion)
HTML Embed
<a href="https://allmcps.com/mcp/legion"><img src="https://allmcps.com/api/badge/legion?style=directory" alt="Legion on AllMCPs" /></a>