Magpie Council
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Convene 3 to 12 models already configured in your local Magpie gateway to independently analyze hard bugs, architecture trade-offs, security audits, or product roadmaps — then cross-examine each other anonymously, score peers with Borda ranking, and synthesize an actionable verdict.
Every request goes strictly through your local Magpie gateway (http://127.0.0.1:3425 or discovered MAGPIE_ADDR), so your existing accounts, quota pacing, routing groups, failover, and usage ledger work out of the box with zero extra API keys.
Highlights
Anti-sycophancy 3-phase debate engine — Parallel blind opening prevents anchoring bias; anonymous cross-examination (
Participant A/B/C…) enforces concrete critiques, calibrated confidence (1–10), and Borda peer ranking before Judge synthesis.Unleash each model's full capacity — Session ingestion scales to the strongest participating model's
context_window(up to 160k runes indeepmode); only smaller-window seats get per-call 70%/30% head+tail smart slicing instead of dragging down the entire council.Deep Magpie-native integration — Zero-config gateway discovery (
MAGPIE_BASE_URL→MAGPIE_ADDR→~/.config/magpie/gateway.json), quota-pacing smart selection (/v1/magpie/quotas?kept=1), custom Chinese/English provider display-name matching (e.g.自建中转),all_models(up to 12 seats), per-seatX-Magpie-Sessionroute/failover tracing, and automatic compatibility retries (400/422params &502reasoning-budget exhaustion).Live SSE spectator & 2x PNG share cards — Debates launched from any terminal or MCP agent appear automatically in the built-in dark/light dashboard and native Magpie sidebar page (
Council / 议会), complete with sub-second SSE progress, live interim Borda leaderboard, provider right-click quick launch, and zero-dependency Canvas 2D 2x Retina PNG export.Crash-safe single binary — Pure Go (zero CGO), OS-level per-session
flock, atomicfsync+renamepersistence (session.json,transcript.md, standalonereport.html), orphan-runner detection, and seamless--sessioncontinuation.
Related MCP server: imladris
How It Works
flowchart LR
U["Terminal / Agent (MCP) / Magpie Sidebar"] --> S["Magpie Discovery & Quota Selector"]
S --> R1["Phase 1: Blind Opening\n(Parallel, Isolated Seats)"]
R1 --> R2["Phase 2: Cross-Examination\n(Anonymous Critique + Borda Ranking)"]
R2 -->|Supermajority or Max Rounds| J["Phase 3: Judge Synthesis\n(Consensus · Disagreements · Actions)"]
J --> A["Atomic Store + SSE Live UI\n(session.json · transcript.md · report.html · 2x PNG)"]Zero-config gateway & quota awareness: Reads
GET /v1/models,GET /v1/magpie/quotas?kept=1, andGET /v1/magpie/limit, aligning seat selection with Magpie's smart pacing (resetsAt,runsOutAt,outlasts,pricing) and routing groups (group/*).Problem-solving-first adversarial debate: Round 1 collects independent opening positions with zero peer visibility. Round 2..N anonymizes seats (
Participant A,B,C…) so models critique claims rather than brand names, absorb strong peer evidence, and converge promptly once a solid solution emerges.Verdict & continuation: A Judge model synthesizes concise Consensus, unresolved Disagreements (Pro / Con), and concrete Recommendations (with an enriched deterministic fallback if every judge candidate fails). Continue any session anytime with
session_id+follow_upreusing the exact same seats.
Quick Start
1. Build & Install the Binary
# Apple Silicon macOS (remove first to ensure a fresh AMFI inode)
rm -f /opt/homebrew/bin/magpie-council && \
go build -o /opt/homebrew/bin/magpie-council ./cmd/magpie-council
# Intel macOS / Linux
go build -o /usr/local/bin/magpie-council ./cmd/magpie-council2. Connect to Magpie MCP Router + Skill (Recommended for Agents)
Register magpie-council once in Magpie's Library so every agent behind Magpie (OMP, Claude Code, Codex, Devin, Cursor, Antigravity…) can convene debates natively:
magpie library mcp add council \
/opt/homebrew/bin/magpie-council mcp \
env=MAGPIE_BASE_URL=http://127.0.0.1:3425 \
call-timeout=300 idle=neverAdd the companion workflow skill (skills/magpie-council/SKILL.md) or import MCP + Skill together:
magpie library plugin import /path/to/magpie-councilThen just ask your agent naturally in any terminal:
"Use all models under Magpie provider
my-relayin deep mode to review this project for concurrency bugs, optimization opportunities, and roadmap priorities."
3. Add the Native Magpie Sidebar Page (Council / 议会)
magpie plugin add /path/to/magpie-council/magpie-pluginOpens a Council / 议会 tab under Plugins in Magpie Desktop and
magpie web.Adds Convene Council / 召开多模型议会 to every provider's right-click menu in Magpie's Providers list — click it to open Quick Run pre-filled with that provider.
4. Run Directly from the Terminal (CLI)
# Inspect live providers, custom display names, models, and quota health
magpie-council providers
magpie-council providers -p "my-relay"
# Fast cross-provider debate (subscription-first pacing)
magpie-council run -p auto -m fast --cost subscription_first "Evaluate SQLite vs file-backed session storage"
# Deep code review using ALL healthy models under one provider + exact line ranges
magpie-council run -p "my-relay" --all-models -m deep --preset code_review \
--context-file "/abs/path/server.go:1-240,/abs/path/engine.go" \
"Audit concurrency races, edge-case bugs, and high-ROI optimizations"
# Continue or recover an existing debate with new constraints
magpie-council run --session <session_id> --follow-up "New constraint: zero CGO; dig deeper into Disagreement #1"
# Inspect saved sessions, specific rounds, or standalone HTML report path
magpie-council session --list
magpie-council session <session_id> --transcript --round 2
magpie-council session <session_id> --report
# Manage persistent defaults (~/.config/magpie-council/config.json)
magpie-council config show
magpie-council config set mode=deep language=zh
# Launch the standalone spectator dashboard (default 127.0.0.1:3497)
magpie-council ui --addr 127.0.0.1:3497MCP Tools & Presets
Tools Exposed by magpie-council mcp
Tool | Purpose | Key Parameters |
| List enabled Magpie providers, custom display names, routing groups, models, context windows, and quota health |
|
| Convene a new debate or continue an existing |
|
| Poll running progress (including live lock & orphan recovery hints) or fetch the final verdict, |
|
Modes & Presets
Mode / Preset | Behavior |
| Up to 3 rounds, concise structured responses, |
| Up to 5 rounds, unrestricted high-density reasoning ( |
| Architect · RedTeam · Pragmatist (+ Evolution / Security / Systems / DX / Testing seats when |
| BugHunter · Maintainability · Performance |
| Attacker · Defender · Compliance |
| UserAdvocate · Skeptic · Delivery |
Native Magpie Page Plugin
The native page plugin in magpie-plugin/ follows Magpie's kind: "page" specification:
Launcher (
magpie-plugin/page/index.html+boot.js): Runs in Magpie's strict CSP sandbox (connect-src 'none', zero inline scripts), negotiates theme/language/options/provider actions over_magpie/bridge.js, and navigates towindow.magpie.service(proxied remotemagpie web) orhttp://127.0.0.1:3497/(with SSH tunnel guidance on older remote setups).Host part (
magpie-plugin/index.mjs): OpenCode v1{ id, server }export loaded by Magpie's Bun host. Adopts a runningmagpie-council uior spawns and supervises one withstderrdraining and bounded backoff restarts.Plugin options (Plugins › Installed › Magpie Council › Options or
magpie plugin options):
{
"port": 3497,
"binary": "",
"gatewayUrl": ""
}Environment Variables
Variable | Default | Description |
| Auto-discovered | Explicit Magpie gateway URL (overrides |
| Set by Magpie host | Gateway |
| (empty) | Optional Magpie gateway API key (for LAN/remote or key-restricted setups) |
|
| Directory where |
|
| Persistent user defaults shared by CLI, MCP, and Web UI |
|
| Output language override ( |
| (unrestricted) | Optional colon-separated allowlist restricting which root directories |
| Auto-resolved | Explicit path to the |
Data and Security
Zero external telemetry or credential storage:
magpie-councilregisters no provider, stores no upstream API keys, and sends zero telemetry. All model inference goes exclusively through your configured Magpie gateway.Zero bridge reads:
magpie-plugin/package.jsondeclares"permissions": []— the sandboxed page reads no private Magpie bridge data.Hardened loopback UI service (
127.0.0.1:3497):Validates loopback
Hostheaders (127.0.0.1,localhost,::1,*.localhost) to block DNS rebinding.Guards every JSON API, SSE stream, and HTML report route with a 256-bit
X-Council-Token(created atomically with0600permissions) embedded only inGET /withCache-Control: no-storeand no permissive CORS.Blocks unauthenticated cross-origin and
Sec-Fetch-Site: cross-siterequests while supporting same-originmagpie webreverse proxying.Sets
Referrer-Policy: no-referrerandX-Content-Type-Options: nosniffon responses.
Safe server-side file ingestion:
context_filesopens paths with UnixO_NONBLOCK+ regular-filefstat(never blocks on FIFOs/devices), rejects binary NUL files before truncation, trims cleanly on UTF-8 rune boundaries, and resolves symlinks viaos.SameFilewhenMAGPIE_COUNCIL_ALLOWED_ROOTSis set.
Scope & Known Limits
Why stdio MCP instead of Magpie's
toolhook: Magpie's plugintoolhook enforces a hard 55-second timeout and has no MCPnotifications/progresschannel. Running the 3 tools through stdio MCP (magpie-council mcp) supports multi-minutedeepdebates, 12s progress heartbeats, andasync: truebackground sessions without duplicating tools in Magpie Library.Default port: Uses
3497by default to avoid colliding with official community pages (page-window-warmupuses3492,page-usage-tree3494,page-harnessweight3496). Change"port"in Plugin Options if needed.Quota usage: Every debate sends live chat completion requests through your Magpie gateway and consumes the selected provider/account quota.
Project Structure
magpie-council/
├── assets/icon.svg # Brand SVG icon (128x128 viewBox)
├── cmd/magpie-council/ # Single-binary CLI / MCP / UI entrypoint
├── internal/
│ ├── config/ # Shared defaults & MAGPIE_COUNCIL_LANG override
│ ├── debate/ # 3-phase debate engine, prompts, context_files
│ ├── magpie/ # Magpie gateway client, route/quota/limit, compat retry
│ ├── mcpserver/ # Official Go MCP SDK stdio server
│ ├── selector/ # Quota-pacing model selector & display-name matcher
│ ├── store/ # Atomic persistence, flock, stat cache, report.html
│ └── webui/ # Hardened HTTP/SSE server & embedded dashboard.html
├── magpie-plugin/ # Native Magpie page plugin (index.mjs, page/, registry-entry.json)
├── npm/ # Zero-dependency npx Go binary launcher (SHA-256 verified)
├── skills/magpie-council/SKILL.md # Canonical agent workflow skill
├── server.json # Official MCP Registry manifest
└── PUBLISHING.md # Release & Magpie Market publishing guideDevelopment & Verification
go vet ./...
go test -race -count=3 ./...
go build -o ./bin/magpie-council ./cmd/magpie-council
node --check magpie-plugin/index.mjs magpie-plugin/page/boot.js npm/bin/magpie-council.jsSee PUBLISHING.md for GoReleaser, npm launcher, Official MCP Registry (server.json), magpie library plugin import, npx skills add, and magpie-community/plugins submission steps.
License
MIT © 2026 magpie-council contributors. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Commission a multi-model AI spec committee from your agent; get rubric-scored, build-ready specs.
Put a decision to a council of top AI models and get one brief: verdict, splits, risks, next steps.
Convene a panel of expert AI personas to debate any decision from every side.
Run multi-AI meetings and retrieve decisions, reasoning, and remaining disagreements.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to create council hearings where multiple LLMs (Claude, GPT, Gemini, Grok) debate topics and synthesize verdicts with trust scores and diverse perspectives.29 npmApache 2.0
- AlicenseAqualityDmaintenanceEnables multi-LLM deliberation via a council of panel members, judges responses for consensus and contradictions, and returns analysis to the calling model.34MIT
- AlicenseAqualityDmaintenanceEnables role-based, multi-model AI orchestration by assigning specialized expert roles to a hybrid panel of local and cloud LLMs, generating unified advisory council reports for complex tasks.61MIT
- AlicenseNot gradedqualityBmaintenanceEnables multi-model deliberation by sending questions to various AI models and aggregating their responses and typed cross-model reactions, facilitating agreement, challenge, and exploration for tasks like architecture review and strategy.MIT