原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Legion

作者:faulkj版本 0.8.0i★ –i在你的电脑上运行
注册名称io.github.faulkj/legion

安装

概览

作者提供的说明(英文原文)

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

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 搜索与 AI 记忆
  • 你需要填写:MCP_TRANSPORT, DEFAULT_API_KEY, ALLOW_NO_MODELS, OPENAI_API_KEY

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: MCP_TRANSPORT, DEFAULT_BASE_URL, DEFAULT_API_KEY, ALLOW_NO_MODELS, OPENAI_API_KEY, MAX_ROUNDS, TOKEN_BUDGET, DYNAMIC_ROLES, LOG_LEVEL, ASYNC_TOOLS, TRUST_PROXY_AUTH

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "legion": {
      "command": "npx",
      "args": [
        "-y",
        "legion-mcp"
      ],
      "env": {
        "MCP_TRANSPORT": "your-value",
        "DEFAULT_BASE_URL": "your-value",
        "DEFAULT_API_KEY": "your-value",
        "ALLOW_NO_MODELS": "your-value",
        "OPENAI_API_KEY": "your-value",
        "MAX_ROUNDS": "your-value",
        "TOKEN_BUDGET": "your-value",
        "DYNAMIC_ROLES": "your-value",
        "LOG_LEVEL": "your-value",
        "ASYNC_TOOLS": "your-value",
        "TRUST_PROXY_AUTH": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add legion --env MCP_TRANSPORT=your-value --env DEFAULT_BASE_URL=your-value --env DEFAULT_API_KEY=your-value --env ALLOW_NO_MODELS=your-value --env OPENAI_API_KEY=your-value --env MAX_ROUNDS=your-value --env TOKEN_BUDGET=your-value --env DYNAMIC_ROLES=your-value --env LOG_LEVEL=your-value --env ASYNC_TOOLS=your-value --env TRUST_PROXY_AUTH=your-value -- npx -y legion-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "legion": {
      "command": "npx",
      "args": [
        "-y",
        "legion-mcp"
      ],
      "env": {
        "MCP_TRANSPORT": "your-value",
        "DEFAULT_BASE_URL": "your-value",
        "DEFAULT_API_KEY": "your-value",
        "ALLOW_NO_MODELS": "your-value",
        "OPENAI_API_KEY": "your-value",
        "MAX_ROUNDS": "your-value",
        "TOKEN_BUDGET": "your-value",
        "DYNAMIC_ROLES": "your-value",
        "LOG_LEVEL": "your-value",
        "ASYNC_TOOLS": "your-value",
        "TRUST_PROXY_AUTH": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "legion": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "legion-mcp"
      ],
      "env": {
        "MCP_TRANSPORT": "your-value",
        "DEFAULT_BASE_URL": "your-value",
        "DEFAULT_API_KEY": "your-value",
        "ALLOW_NO_MODELS": "your-value",
        "OPENAI_API_KEY": "your-value",
        "MAX_ROUNDS": "your-value",
        "TOKEN_BUDGET": "your-value",
        "DYNAMIC_ROLES": "your-value",
        "LOG_LEVEL": "your-value",
        "ASYNC_TOOLS": "your-value",
        "TRUST_PROXY_AUTH": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

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

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 faulkj 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“搜索与 AI 记忆”中的其他服务器比较i

  • 星标数多于此分类中其他 5662 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 5662 个服务器的 56% 更新
  • 基础检查结果等于或优于此分类中其他 5662 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Legion 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:MCP_TRANSPORT, DEFAULT_API_KEY, ALLOW_NO_MODELS, OPENAI_API_KEY

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.8.0)于32天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Context7, Codebase Memory, Exa

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Context7

作者:upstash

Up-to-date docs for AI agents

电脑或云端★ 64,224MIT昨天更新
安装

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

在你的电脑上运行★ 48,148MIT21天前更新
安装

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

在云端运行★ 5,213MIT2个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

Legion

"I am Legion, for we are many."

An MCP-native model council. Legion exposes LLMs as individual tools and orchestrates them into debates, juries, blind panels, private refinement gauntlets, workshops, and custom multi-model deliberations.

Every model is reached through the OpenAI Responses API wire format. Use OpenAI or Azure directly, route other providers through a compatible gateway (such as a LiteLLM proxy), and configure the entire council through hot-reloadable files.

Contents

  • How it works
  • Design decisions
  • Requirements
  • Setup
  • Configuration
  • Logging
  • Run
  • Try it
  • Use in VS Code
  • Deploy

How it works

flowchart LR

AI[Calling AI] -->|claude / gpt / gemini …| Legion Legion -->|Responses API| GPT[OpenAI / Azure — direct] Legion -->|Responses API| GW[Gateway e.g. LiteLLM] GW --> Claude & Gemini & Llama

  • One tool per model, named after the slugified model name (e.g. Claude → claude). Each accepts a prompt plus optional context, role, system, temperature, and maxTokens.
  • A `quorum` tool fans one prompt out to several models — with roles, multi-round discussion, visibility modes, and synthesis — and returns each answer separately. See Presets for the orchestration options.
  • Presets are named, pre-staffed councils (debate, courtroom, code review, …), each exposed as its own tool.
  • Identity and telemetry ride in structuredContent, not the answer text. Logging goes to stderr (safe for stdio).

Design decisions

  • No provider adapters. There is no provider-specific code and no built-in model list. Legion speaks one wire format; models that don't speak it natively go through a gateway. Supporting a new model requires no change here.
  • Models are config, not code. Adding a model means adding a JSON file. Over HTTP the directory is re-read per request, so no rebuild or restart; over stdio the config is read once per connection (see Hot-reload).
  • One tool per model. Each model appears to the calling AI as its own tool with its own description, rather than a single tool with a model parameter. The quorum tool covers the ad-hoc multi-model case, and each preset in config/presets/ is exposed as its own enforced, pre-staffed council tool.
  • Stateless. Every call is one-shot with store: false. Nothing is persisted, so there is no database and no conversation state to manage.
  • Small. A couple thousand lines of TypeScript, one bundled output file, five dependencies.

Requirements

  • Node.js 24+
  • At least one OpenAI-Responses-compatible endpoint (a provider API directly, or a gateway such as LiteLLM for models that need bridging)

Setup

From npm — no clone, no build:

npx legion-mcp

From a clone:

npm install

copy .env.example .env # then edit .env

Configuration

All configuration lives in a config/ directory. The bundled defaults are always the base layer; a config/ folder in the current working directory is overlaid on top of them, per file:

  • Directory resources (models/, roles/, presets/, tools/): a local file overrides the bundled file of the same name; a local-only file is added; every bundled file you don't touch stays. So dropping in one config/presets/refine.json overrides just that preset — the other bundled presets remain.
  • Single-file text (prompts.json, errors.json, schema.json): merged per key — bundled < local. A partial local file overrides only the keys it sets.
  • `description.md`: local wins whole if present, else bundled.

The overlay can override or add, but not delete a bundled entry. To choose which bundled presets register as tools, use PRESETS (see below).

Installing from npm? You must supply your own model files. The bundled

config ships only key-free *.example.json model files, which the scanner

deliberately ignores — so the bundle contributes zero real models. With no

real model file the server fails fast at startup (`No model files found

in ...). Drop one config/models/ .json` next to where you run the

server (see below) — the rest falls back to the bundled defaults.

The layout below is identical either way.

Hot-reload

Config is read fresh when a server instance is built, never baked in at build time — but *when* that happens depends on the transport:

TransportConfig is re-readEffect of editing a config file
httpper requestLive on the next call, no restart.
stdioonce per connectionTakes effect when the client reconnects.

HTTP builds a fresh server per request, so a dropped-in model, role, preset, or text override is picked up by the very next call. Stdio pins one server for the life of the connection, so the same edit lands when the client restarts Legion — which for most desktop MCP clients means reloading the server, not rebooting the machine.

Where this README says something is "live on the next call", read it as the HTTP behavior; over stdio it's the next connection.

Models — config/models/*.json

At least one model file is required — the server fails fast without one. Each JSON file becomes a tool, named after the slugified file name (config/models/fable.json → tool fable):

{

"model": "claude-fable-5", "description": "Claude Fable — fast, creative, general purpose.", "baseUrl": "https://api.example.com", "apiKey": "[PopNx MCP ตัดค่าที่หน้าตาเหมือนกุญแจออก]" }

  • model (required) — the deployed model id the endpoint routes to.
  • description — helps the calling AI pick the right model.
  • system — optional baseline system instructions baked into every call to this model.
  • baseUrl / apiKey — optional; omitted values fall back to DEFAULT_BASE_URL / DEFAULT_API_KEY. apiKey may reference an environment variable with the env: prefix — "apiKey": "env:GPT_KEY" reads GPT_KEY from the environment (unset/empty is a fatal startup error), so a key can stay out of the file entirely.
  • omitParams — optional list of request params to drop for this model, e.g. ["temperature"]. The server stays provider-agnostic: it never assumes which models reject which params — you declare each model's quirks here. Useful for reasoning models and some deployments that reject temperature.
  • reasoning — optional "minimal" | "low" | "medium" | "high", sent as reasoning.effort. Reasoning models can spend an entire maxTokens thinking and emit nothing; "low" may help leave room for an answer. The endpoint must support this parameter; it does not bypass content filtering.
  • maxTokens — optional hard output ceiling for this model. Every request sends min(requested, ceiling), whatever the caller or preset role asked for. For models that think harder the more room they get and come back empty.

Hot-drop: the directory is re-scanned per request — add or edit a model file and it's live on the next call, no restart.

Secrets & git: model files can contain API keys, so config/models/*.json is git-ignored. Copy a *.example.json (tracked, key-free, ignored by the scanner) to get started:

copy config\models\gpt.example.json config\models\gpt.json   # then add your key
Roles — config/roles/*.md

Optional hot-droppable instruction files. Each .md file becomes a named role (slugified from filename). Drop a file, it's live on the next call. This repo ships skeptic.md, builder.md, judge.md, and short.md (a terse "answer immediately, no deliberation" role useful for constrained-output turns) as ready-to-use starters — edit or delete them freely (they hold no secrets).

Available selectors in tools become roleName, e.g. passing role: "skeptic" or using "model:skeptic" in quorum.models.

Presets — config/presets/*.json

Optional hot-droppable council recipes, one JSON file per preset (named after the slugified file name, like models). Each preset becomes its own tool — drop config/presets/code_review.json and a code_review tool appears on the next request. Each preset has a description, a roles list, and optional authoritative mode / synthesizer defaults. Each role defines its behavior inline — a role's description *is* its instructions (the behavior contract); a role with no description falls back to a matching config/roles/ .md file:

{

"description": [ "Free-for-all: pit several contestants against each other, then crown a winner.", "", "Staff contestant with as many models as you like; one judge decides." ], "mode": "parallel", "synthesizer": "judge", "roles": [ { "role": "contestant", "description": "Argue why your answer beats the others.", "min": 2, "max": null }, { "role": "judge", "description": "Crown a single winner and justify it.", "min": 1, "max": 1 } ] }

The calling AI invokes the preset tool directly (e.g. code_review) and still writes the models selectors, assigning any model to any preset role. Presets are enforced: every selector must use a preset role and every role must be staffed within its cardinality, else the result is an error saying what to fix.

Keys:

KeyTypeDefaultDescription
description`string \string[]`requiredMCP description for the preset tool.
rolesPresetRole[]requiredRoles accepted by the preset.
mode`"sequential" \"parallel" \"private" \"independent"`"sequential"Controls which prior turns each round speaker sees.
defaultRoundspositive integer1Rounds used when the call omits rounds.
synthesizerstringnoneRole that produces synthesis turns. A single-seat role is neutral and sits out the rounds; a multi-seat role (max > 1 or null) plays, and its first live seat synthesizes.
synthesizeEvery`"end" \non-negative integer`"end"Runs synthesis at the end or every Nth round.
eliminatorstringnoneNeutral role that issues eliminations. Required with eliminateEvery.
framerstringnoneNeutral role that opens and redirects the discussion.
reframeEvery`"end" \non-negative integer`"end"Reframes only at opening or every Nth round after opening.
closingStatementsbooleanfalseRuns a closing phase before final synthesis.
eliminateEverynon-negative integer \"spread"0Lets the eliminator remove one speaker every Nth round, or spread the cuts evenly. Preset-only.
eliminationsOptionalbooleanfalseLets the eliminator decline an elimination. Preset-only.
enterEverynon-negative integer0Starts one speaker per team, then adds one benched speaker every Nth round. Preset-only.
votestringnoneBallot instructions; enables anonymous voting.
voteEvery`"end" \non-negative integer`"end"Votes at the end or every Nth round.
voteVisibility`"aggregate" \"ballots"`"aggregate"Includes only totals or also anonymized ballot choices in the transcript.
allowSelfVotebooleantrueIncludes each voter's own seat in its candidate menu.
voteByTeambooleanfalsePresents one choice per @team and aggregates votes by team.

Role object keys:

KeyTypeDefaultDescription
rolestringrequiredRole name used in model:role selectors.

| description | string \| string[] | matching role file | Inline instructions; arrays are joined with newlines. Otherwise

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx