consensus-mcp
ai-consensus-mcp
Ein minimaler Stdio-Model Context Protocol-Server, der das Consensus Validation Protocol als einzelnes
consensus-Tool bereitstellt. Geben Sie Claude Code, Cursor, Windsurf — oder jedem anderen MCP-Host — eine echte Multi-Modell-Runde.
Ein schlanker Wrapper um ai-consensus-core. Ein Tool, eine Konfigurationsdatei, kein Drama.
Was Sie bekommen
Ein MCP-Tool:
consensus. Geben Sie eine Liste von Modellen + Personas an und führen Sie eine Debatte über mehrere Runden durch.Jeder OpenAI-kompatible Anbieter. xAI Grok, Anthropic (via OpenAI-kompatiblem Endpunkt), OpenAI, Groq, Together, Fireworks oder Ihr privates Gateway. Ein Adapter, konfigurierbar pro Teilnehmer.
Live-Fortschritt. Jedes strukturierte Engine-Ereignis wird als MCP-Fortschrittsbenachrichtigung weitergeleitet — Hosts zeigen den Status von Runde/Teilnehmer/Meinungsverschiedenheit/Punktzahl in Echtzeit an.
Wenig Abhängigkeiten.
@modelcontextprotocol/sdk,zod,ai-consensus-core. SSE-Parsing ist nativesfetch— keine Anbieter-SDKs.
Related MCP server: Claude Code AI Collaboration MCP Server
Das Protokoll
Für das eigentliche Protokoll — Runden, Phasen, Prompts, Bewertung — siehe das ai-consensus-core Protokoll-Diagramm. Diese README behandelt nur die Server-Oberfläche.
Installation
Via npm:
# Globally, for use as a binary
npm install -g ai-consensus-mcp
# Or as a project dependency
npm install ai-consensus-mcpOder klonen und ausführen:
git clone https://github.com/entropyvortex/ai-consensus-mcp.git
cd ai-consensus-mcp
npm install
npm run buildKonfiguration
Kopieren Sie das Beispiel und bearbeiten Sie es:
cp consensus.config.example.json ./consensus.config.jsonMinimale Form:
{
"providers": {
"xai": {
"baseUrl": "https://api.x.ai/v1",
"apiKeyEnv": "GROK_API_KEY"
},
"anthropic": {
"baseUrl": "https://api.anthropic.com/v1",
"apiKeyEnv": "ANTHROPIC_API_KEY"
}
},
"participants": [
{ "id": "grok", "provider": "xai", "modelId": "grok-4", "personaId": "pessimist" },
{ "id": "domain", "provider": "anthropic", "modelId": "claude-sonnet-4-6", "personaId": "domain-expert" },
{ "id": "devil", "provider": "xai", "modelId": "grok-4", "personaId": "devils-advocate" }
],
"judge": {
"provider": "xai",
"modelId": "grok-4"
}
}Konfigurationsreferenz
providers.<id>.baseUrl string OpenAI-compatible base URL. No trailing /chat/completions.
providers.<id>.apiKeyEnv string Name of the env var holding the API key.
providers.<id>.extraHeaders object? Static headers sent on every request (rarely needed).
participants[].id string Stable participant id (appears in events + progress).
participants[].provider string Key into providers.
participants[].modelId string Opaque model id the provider accepts.
participants[].personaId enum One of: pessimist, first-principles, vc-specialist,
scientific-skeptic, optimistic-futurist,
devils-advocate, domain-expert.
participants[].label string? Optional display label.
judge.provider string? Key into providers.
judge.modelId string? Opaque judge model id.
judge.temperature number? Defaults to 0.3.
judge.maxOutputTokens number? Defaults to 1500.
defaults.maxRounds int? 1–10, defaults 4.
defaults.earlyStop bool? Defaults true.
defaults.convergenceDelta number? Defaults 3.
defaults.disagreementThreshold number? Defaults 20.
defaults.blindFirstRound bool? Defaults true.
defaults.randomizeOrder bool? Defaults true.
defaults.participantTemperature number? Defaults 0.7.
defaults.maxOutputTokens int? Defaults 1500.
defaults.useJudge bool? Defaults true if `judge` is declared, else false.Jedes Feld, das nicht in dieser Liste enthalten ist, wird vom Konfigurations-Loader abgelehnt — Tippfehler führen zu einem deutlichen Fehler statt zu stillem Versagen.
Standalone ausführen
export GROK_API_KEY=xai-...
export ANTHROPIC_API_KEY=sk-ant-...
ai-consensus-mcp --config ./consensus.config.jsonDer Server spricht JSON-RPC über Stdio. Eine Bereitschaftsmeldung wie:
ai-consensus-mcp ready — 3 participant(s) from 2 provider(s), judge=grok-4 (config: /abs/consensus.config.json)wird beim Start auf stderr geschrieben; stdout ist für den MCP-Protokoll-Stream reserviert.
Registrierung bei einem MCP-Host
Claude Desktop
Bearbeiten Sie ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) oder das Windows-Äquivalent:
{
"mcpServers": {
"consensus": {
"command": "ai-consensus-mcp",
"args": ["--config", "/absolute/path/to/consensus.config.json"],
"env": {
"GROK_API_KEY": "xai-...",
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}(Wenn Sie nicht global installiert haben, ersetzen Sie "command": "ai-consensus-mcp" durch "command": "node" und verweisen Sie args auf /path/to/ai-consensus-mcp/dist/index.js.)
Starten Sie Claude Desktop neu. Sie sollten sehen, dass ein consensus-Tool verfügbar wird.
Claude Code
claude mcp add consensus \
--scope user \
-- ai-consensus-mcp --config /absolute/path/to/consensus.config.jsonOder bearbeiten Sie ~/.claude.json direkt mit der gleichen command / args / env-Struktur.
Cursor, Windsurf und andere Hosts
Verweisen Sie diese auf ai-consensus-mcp --config <path>/consensus.config.json mit den relevanten API-Schlüsseln des Anbieters in der Umgebung. Nur Stdio-Transport.
Das consensus-Tool
Eingabe
{
"prompt": "Should an early-stage startup adopt microservices from day one?",
"maxRounds": 4, // optional, 1–10
"participantIds": ["grok", "domain"], // optional — subset of configured participants
"earlyStop": true, // optional
"judge": true, // optional — defaults to config.defaults.useJudge
"blindFirstRound": true, // optional
"randomizeOrder": true, // optional
"convergenceDelta": 3, // optional
"disagreementThreshold": 20, // optional
"participantTemperature": 0.7, // optional
"maxOutputTokens": 1500, // optional
"randomSeed": 42 // optional — deterministic round-order shuffle
}Nur prompt ist erforderlich. Alles andere greift auf die defaults der Konfiguration zurück, dann auf die Standardwerte der Engine.
Ausgabe
Zwei Artefakte bei jedem erfolgreichen Aufruf:
content[0].text— eine für Menschen lesbare Markdown-Zusammenfassung:Endergebnis, Dauer, Stopp-Grund
Punktetabelle pro Runde
Antworten der letzten Runde, beschriftet nach Persona + Modell
Richter-Synthese (falls
judge: true)
structuredContent— das vollständigeConsensusResultals JSON für programmatische Konsumenten.
Fortschrittsbenachrichtigungen
Jedes strukturierte Engine-Ereignis wird als MCP notifications/progress-Nachricht weitergeleitet. Streaming-Ereignisse auf Token-Ebene werden absichtlich verworfen — sie würden den Kanal überfluten.
Engine-Ereignis | Beispiel-Fortschrittsnachricht |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
progress erhöht sich monoton bei roundComplete und synthesisComplete; total ist maxRounds + (judge ? 1 : 0).
Fehler
Konfigurationsladefehler sind beim Start fatal und werden mit dem fehlerhaften Feldpfad auf stderr ausgegeben.
Tool-Eingabefehler geben
{ isError: true, content: [{ type: "text", text: "…" }] }zurück — der Host sieht sie, aber der Server bleibt aktiv.Anbieterfehler (HTTP nicht-2xx, leere Streams) werden im
response.error-Feld des jeweiligen Teilnehmers erfasst und der Durchlauf wird mit den verbleibenden Teilnehmern fortgesetzt. Fehler sind sowohl im Fortschritts-Stream als auch im endgültigen strukturierten Ergebnis sichtbar.Abbruch. Wenn der Host einen Tool-Aufruf abbricht, propagiert das
AbortSignalin jeden laufendenfetchund die Engine gibt einConsensusResultmitstopReason: "aborted"zurück.
Grenzen und Nicht-Ziele
Keine Persistenz. Jeder Tool-Aufruf ist ein frischer Durchlauf. Wenn Sie eine Historie wünschen, zeichnen Sie
structuredContentauf der Host-Seite auf.Kein HTTP-Transport. Nur Stdio. Für HTTP/SSE binden Sie
ai-consensus-coredirekt ein.Keine Durchsetzung von Token-Budgets.
maxOutputTokensist bei jedem Aufruf nur ein Hinweis; richten Sie Nutzungsalarme in Ihren Anbieter-Dashboards ein.Keine Multi-Run-Planung. Ein Durchlauf pro Aufruf, sequenziell, wenn der Host sie in die Warteschlange stellt.
Wenn eines dieser Dinge zu dem wird, was Sie am meisten benötigen, ist die Kernbibliothek der richtige Ort zum Ansetzen — dieser Server ist absichtlich winzig.
Entwicklung
git clone https://github.com/entropyvortex/ai-consensus-mcp.git
cd ai-consensus-mcp
npm install
npm run test # vitest — config loader + MCP handshake integration
npm run build
npm start -- --config ./consensus.config.jsonPhilosophie
Die Kernbibliothek sollte überall laufen können — Next.js, CLI, Worker, Durable Object, ein anderer MCP-Server. Deshalb weiß sie nicht, was ein LLM-Anbieter ist.
Dieses Paket ist das "Überall", das die meisten Leute zuerst interessiert: ein Stdio-MCP-Server, der in Claude Code, Cursor, Windsurf oder jeden Host, der das Protokoll spricht, integriert werden kann. Er ist bewusst klein gehalten — lädt eine Konfiguration, leitet Ereignisse weiter, sonst nichts. Wenn Sie darüber hinauswachsen, ist der Kern direkt verfügbar.
Siehe auch
ai-consensus-core— die zugrunde liegende Bibliothek. Verwenden Sie sie direkt, wenn Sie HTTP-Transport, benutzerdefinierte Scheduler oder eine tiefere Integration benötigen.
Lizenz
MIT
Teil des entropyvortex-Stacks — praktisches, schnörkelloses KI-Open-Source von Marcelo Ceccon.
Mit ❤️ in Brasilien gemacht.
MIT-Lizenz • Gebaut zum Ausliefern.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables collaborative debates between multiple AI agents, allowing them to discuss and reach consensus on user prompts.1MIT
- AlicenseBqualityDmaintenanceAn MCP server that enables multi-provider AI collaboration using models like DeepSeek, OpenAI, and Anthropic through strategies such as parallel execution and consensus building. It provides specialized tools for side-by-side content comparison, quality review, and iterative refinement across different AI providers.41MIT
- AlicenseAqualityCmaintenanceAn MCP server that enables users to query, compare, and synthesize responses from multiple local and cloud LLMs simultaneously using existing subscriptions. It provides tools for parallel model evaluation, consensus polling with an LLM-as-judge, and response synthesis across different model providers.81515MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that orchestrates multiple AI agents in parallel to get diverse perspectives on a single topic, supporting debate, review, and quick modes.341Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/entropyvortex/ai-consensus-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server