LLM Council MCP

LLM Council MCP

A lightweight, local MCP server for Mac that replicates a 3-stage LLM council workflow using OpenRouter, enabling multi-model deliberation and synthesis directly from AI coding tools.

Category
Visit Server

README

LLM Council MCP

English Version | Deutsche Version


English Version

Table of Contents


A lightweight, local MCP server for your Mac based on the original idea by Andrej Karpathy (karpathy/llm-council) with prompt/workflow templates ported from DmitryBMsk/llm-council-plus. It replicates the 3-stage workflow using the exact original prompts directly against OpenRouter, without any Docker or NAS dependencies. Works with Claude Code, Codex CLI, and Antigravity via MCP.

What it is (and how it works)

This tool replicates the AI deliberation process of the original project in three simple steps:

  1. Stage 1 (Answering): Several AI models answer your question independently and at the same time.
  2. Stage 2 (Reviewing): The models read all the answers without knowing who wrote which answer (blind review). Each model ranks the answers from best to worst to prevent self-bias.
  3. Stage 3 (Synthesis): A final "Chairman" model reads all answers and reviews, and writes a single, balanced response for you. If the Chairman fails, another model automatically takes over.

The AI prompt instructions and settings are copied exactly from the original project to ensure the same high quality.

What is currently left out (kept simple for now, but planned as optional features later):

  • Web Search / Internet Access in Stage 1: Currently, models answer based on training and context. (Planned as an optional feature in a future release).
  • Editable Prompts / Custom Roles (e.g. Critic mode) in the UI: Prompt templates are currently hardcoded for reliability. (Planned as an optional settings section).
  • Chat History & Interactive Discussion: Currently designed for deep-dive single questions. (An optional discussion mode between Claude and the Chairman to decide which files are needed is planned).
  • Direct File Access: The server does not read your workspace directly for security/simplicity. Your client (Claude Code, Antigravity) reads the files and passes them as parameters.

Installation & Setup

Method A: Quick Onboarding via PyPI (Recommended)

You can run the Setup UI directly from PyPI without cloning the repository (requires the package installer uv to be installed, e.g., via curl -LsSf https://astral.sh/uv/install.sh | sh or brew install uv):

uvx --from llm-council-mcp-server llm-council-setup

This automatically opens http://127.0.0.1:5151 in your browser.

Method B: Manual Clone (for Development)

If you want to modify the source code locally:

git clone https://github.com/salutaris91/llm-council-mcp-server.git
cd llm-council-mcp-server
python3 -m venv venv
source venv/bin/activate

# Install dependencies (either via requirements.txt or directly using pyproject.toml)
pip install -r requirements.txt  # Or: pip install .

Run the Setup UI locally:

python3 setup_ui.py

🚀 Quick Start / First Run

Follow these steps to get up and running:

  1. Get an OpenRouter API Key:
    • Create an API key at openrouter.ai/keys.
    • Note: Make sure your OpenRouter account has a small funded balance, as each query runs multiple models in parallel.
  2. Launch the Setup UI:
    • Run uvx --from llm-council-mcp-server llm-council-setup in your terminal. This will automatically open the local configuration panel in your web browser.
  3. Configure Settings:
    • Paste your API key, select your preferred council and Chairman models, and click Save.
  4. Register the Server:
    • Under the Install section of the Setup UI, click the Install button next to your desired tool (Claude Code, Codex CLI, or Antigravity).
  5. Restart Your Tool:
    • Fully restart your MCP-enabled editor/client (e.g. reload Antigravity) to apply the changes.
  6. Start Deliberating:
    • In your chat client, run a query (see Usage below).

Setup UI & Settings Storage

The Setup UI provides a user-friendly interface to manage your council settings. It features:

  • Language Switcher: Toggle the UI dynamically between German and English.
  • Model Presets (Quick & Deep): Instantly switch between fast models (for quick checks) and highly capable reasoning models (for deep architectural decisions).
  • Advanced / Expert Settings: Adjust the AI's "creativity" (temperatures) for each of the three stages and configure custom token limits.
  • Auto-Open Browser Toggle: Choose whether the Setup UI should automatically open your browser on startup.
  • Tool Installer: View the status (Installed/Not Installed) and register/unregister the MCP server in Claude Code, Codex CLI, and Antigravity with a single click.

Your configuration is saved to a settings.json file in your user config directory (e.g., ~/Library/Application Support/llm-council on macOS). Legacy Note: If you have an existing .env file from manual setups, it will be automatically imported into settings.json on the first start, and can be safely removed afterwards.


Usage

To use the council, simply ask your MCP host to query it, passing any code context you want it to evaluate.

Example Prompts:

  • "Use the council to get a second opinion on whether we should use Redis or an in-memory cache for this class."
  • "Ask the council to review my implementation of this sorting algorithm."

What happens under the hood: The server will run the 3-stage consensus pipeline. Because this involves multiple parallel and sequential LLM calls, the tool response typically takes 30 to 120 seconds to complete. Some hosts (Antigravity) show live progress, others (Codex) only a spinner — the call continues normally and typically takes 30–120 s depending on the models (occasionally a bit longer). Simply wait until the result appears. It will return a formatted Markdown report consisting of the Chairman's synthesis, followed by the individual models' responses and rankings.


Tool Registration (Manual, alternative to Setup UI)

1. If installed via PyPI (Method A)

Claude Code

claude mcp add llm-council --scope user -- uvx --from llm-council-mcp-server llm-council-mcp

Codex CLI

Add to ~/.codex/config.toml:

[mcp_servers.llm-council]
command = "uvx"
args = ["--from", "llm-council-mcp-server", "llm-council-mcp"]

Antigravity

Add to the configuration file located at ~/.gemini/config/mcp_config.json (do not use ~/.gemini/antigravity/):

{
  "mcpServers": {
    "llm-council": {
      "command": "uvx",
      "args": ["--from", "llm-council-mcp-server", "llm-council-mcp"]
    }
  }
}

2. If cloned manually (Method B)

Replace /path/to/venv/bin/python3 and /path/to/llm-council-mcp/server.py with your absolute paths.

Claude Code

claude mcp add llm-council --scope user -- /path/to/venv/bin/python3 /path/to/llm-council-mcp/server.py

Codex CLI (~/.codex/config.toml)

[mcp_servers.llm-council]
command = "/path/to/venv/bin/python3"
args = ["/path/to/llm-council-mcp/server.py"]

Antigravity (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "llm-council": {
      "command": "/path/to/venv/bin/python3",
      "args": ["/path/to/llm-council-mcp/server.py"]
    }
  }
}

🛠️ Troubleshooting

  • Server not showing up in tool?
    • Fully restart the client application (Claude Code, Codex, or Antigravity). MCP servers are loaded on startup.
  • Antigravity isn't picking up the server?
    • Verify that the server is written to ~/.gemini/config/mcp_config.json. If you manually created a file in ~/.gemini/antigravity/, delete it and use the correct path.
  • OpenRouter API Errors (e.g. 401, 402)?
    • Open the Setup UI and double-check your API key. Make sure your OpenRouter account has positive credit.
  • Check the Logs:
    • Standard error logs are captured by your MCP host. Check your tool's log output or terminal window for details.

Releasing (Maintainer)

This repository is set up with Trusted Publishing to PyPI via GitHub Actions. Releases are triggered tokenless using OIDC.

To release a new version:

  1. Update the version string in _version.py (e.g. 0.1.4). This is the single source of truth — pyproject.toml, the installer pin, and the version shown in the Setup UI header all derive from it automatically, so there is no separate place to update the displayed version.
  2. Commit and push the changes to main.
  3. Create and push a version tag matching v*.*.*:
    git tag -a v0.1.4 -m "v0.1.4"
    git push origin v0.1.4
    
  4. GitHub Actions will automatically build the package and publish it to PyPI.
  5. Create a GitHub Release referencing the new tag.
  6. Run the Setup UI or installer to update your local configuration file to point to the new version pin.

Credits


Deutsche Version

Inhaltsverzeichnis


Ein schlanker, lokaler MCP-Server für deinen Mac basierend auf der Originalidee von Andrej Karpathy (karpathy/llm-council) mit Prompt-/Workflow-Vorlagen portiert aus DmitryBMsk/llm-council-plus. Er bildet den 3-Stufen-Workflow mit den exakten Original-Prompts direkt gegen OpenRouter nach, ohne Docker- oder NAS-Abhängigkeit. Nutzbar aus Claude Code, Codex CLI und Antigravity über MCP.

Was das ist (und wie es funktioniert)

Dieses Tool bildet den Entscheidungsprozess des Originalprojekts in drei einfachen Schritten ab:

  1. Stufe 1 (Antworten): Mehrere KI-Modelle beantworten deine Frage gleichzeitig und unabhängig voneinander.
  2. Stufe 2 (Bewerten): Die Modelle lesen alle Antworten, ohne zu wissen, welches Modell welche Antwort geschrieben hat (Blindverkostung). Jedes Modell bewertet die Antworten, um Eigenvoreingenommenheit zu verhindern.
  3. Stufe 3 (Zusammenfassen): Ein finales "Chairman"-Modell liest alle Antworten und Bewertungen und verfasst eine ausgewogene Zusammenfassung fĂĽr dich. Sollte das Chairman-Modell ausfallen, springt automatisch ein anderes Modell ein.

Die KI-Anweisungen (Prompts) und Einstellungen wurden exakt aus dem Originalprojekt übernommen, um die gleiche hohe Qualität der Antworten zu garantieren.

Was aktuell bewusst weggelassen wurde (für maximale Einfachheit – später als optionale Funktionen geplant):

  • Web-Suche / Internetzugriff in Stufe 1: Modelle antworten aktuell basierend auf ihrem Wissen und dem Kontext. (Als optionale Funktion fĂĽr spätere Releases geplant).
  • Bearbeitbare Prompt-Vorlagen / Eigene Rollen (z. B. Kritiker-Modus) in der UI: Prompt-Vorlagen sind fĂĽr stabile Ergebnisse fest hinterlegt. (Als optionaler Einstellungsbereich geplant).
  • Chat-Verlauf & Interaktive Diskussion: Aktuell fĂĽr präzise Einzelanfragen konzipiert. (Ein optionaler Diskussionsmodus zwischen Client und Chairman zur gemeinschaftlichen Ermittlung benötigter Dateien ist geplant).
  • Direkter Dateizugriff: Der Server liest deine Dateien aus Sicherheits- und EinfachheitsgrĂĽnden nicht selbst. Dein Client (Claude Code, Antigravity) liest den Code aus und ĂĽbergibt ihn automatisch.

Installation & Setup

Methode A: Schnellstart via PyPI (Empfohlen)

Du kannst die Setup-Oberfläche direkt über PyPI ausführen, ohne das Repository klonen zu müssen (erfordert ein installiertes uv, z. B. installierbar via curl -LsSf https://astral.sh/uv/install.sh | sh oder brew install uv):

uvx --from llm-council-mcp-server llm-council-setup

Dies öffnet automatisch http://127.0.0.1:5151 in deinem Browser.

Methode B: Manueller Klon (fĂĽr Entwickler)

Wenn du den Quellcode lokal anpassen möchtest:

git clone https://github.com/salutaris91/llm-council-mcp-server.git
cd llm-council-mcp-server
python3 -m venv venv
source venv/bin/activate

# Abhängigkeiten installieren (entweder über requirements.txt oder pyproject.toml)
pip install -r requirements.txt  # Oder: pip install .

Lokale Setup-UI starten:

python3 setup_ui.py

🚀 Schnellstart / Erster Lauf

Befolge diese Schritte, um direkt loszulegen:

  1. OpenRouter API-Key holen:
    • Erstelle einen API-Key auf openrouter.ai/keys.
    • Hinweis: Stelle sicher, dass dein OpenRouter-Konto ein kleines Guthaben aufweist, da pro Anfrage mehrere Modell-Aufrufe parallel durchgefĂĽhrt werden.
  2. Setup-UI starten:
    • FĂĽhre uvx --from llm-council-mcp-server llm-council-setup im Terminal aus. Dadurch öffnet sich die lokale Konfigurationsoberfläche in deinem Browser.
  3. Einstellungen konfigurieren:
    • Trage deinen API-Key ein, wähle deine bevorzugten Council- und Chairman-Modelle und klicke auf Speichern.
  4. Server registrieren:
    • Klicke im Bereich Install der Setup-UI auf den Button Install neben dem Tool deiner Wahl (Claude Code, Codex CLI oder Antigravity).
  5. Tool neu starten:
    • Starte deinen MCP-Client / Editor (z. B. Antigravity) komplett neu, um die Registrierung zu laden.
  6. Council anfragen:
    • Stelle deine Frage im Chat-Interface (siehe Nutzung unten).

Setup-UI & Speicherort der Einstellungen

Die Setup-UI bietet eine benutzerfreundliche Oberfläche zur Verwaltung deiner Council-Einstellungen. Zu den Features gehören:

  • Sprachumschalter: Wechselt die UI dynamisch zwischen Deutsch und Englisch.
  • Modell-Presets (Schnell & Deep): Ermöglicht das sofortige Umschalten zwischen schnellen Modellen (fĂĽr schnelle Checks) und hochentwickelten Reasoning-Modellen (fĂĽr tiefgehende Architekturfragen).
  • Profi-Modus / Erweiterte Einstellungen: Passe die „Kreativität“ der KI (Temperaturen) fĂĽr jede der drei Stufen individuell an und definiere maximale Token-Limits.
  • Browser Auto-Open Toggle: Wähle aus, ob die Setup-UI beim Start automatisch den Browser öffnen soll.
  • Tool-Installer: Zeigt den aktuellen Installationsstatus an und ermöglicht die Registrierung/Entfernung des MCP-Servers in Claude Code, Codex CLI und Antigravity mit einem Klick.

Deine Konfiguration wird in einer settings.json-Datei im Konfigurationsverzeichnis (z. B. ~/Library/Application Support/llm-council unter macOS) gespeichert. Migration: Falls noch eine alte .env-Datei aus manuellen Setups vorhanden ist, wird diese beim ersten Start automatisch in die settings.json importiert und kann danach gelöscht werden.


Nutzung

Um den Council zu nutzen, bitte einfach deinen MCP-Client darum, das Tool ask_council aufzurufen und ĂĽbergib die Frage sowie den zu prĂĽfenden Code.

Beispiel-Prompts:

  • "Nutze den Council fĂĽr eine zweite Meinung dazu, ob wir fĂĽr diese Klasse Redis oder einen In-Memory-Cache nehmen sollten."
  • "Frag den Council nach einem Review fĂĽr meine Implementierung dieses Sortieralgorithmus."

Was im Hintergrund passiert: Der Server führt die 3 Stufen des Council-Prozesses durch. Da dies mehrere parallele und sequenzielle LLM-Aufrufe erfordert, dauert die Antwort in der Regel 30 bis 120 Sekunden. Manche Hosts (Antigravity) zeigen Live-Fortschritt, andere (Codex) nur einen Spinner — der Call läuft dabei ganz normal weiter und dauert je nach Modellen typischerweise 30–120 s (gelegentlich etwas länger). Einfach warten, bis das Ergebnis erscheint. Du erhältst einen formatierten Markdown-Report mit der Synthese des Chairmans, gefolgt von den Antworten der Einzelmodelle sowie deren Rankings.


Tool-Registrierung (Manuell, alternativ zur Setup-UI)

1. Bei Installation via PyPI (Methode A)

Claude Code

claude mcp add llm-council --scope user -- uvx --from llm-council-mcp-server llm-council-mcp

Codex CLI

Trage Folgendes in ~/.codex/config.toml ein:

[mcp_servers.llm-council]
command = "uvx"
args = ["--from", "llm-council-mcp-server", "llm-council-mcp"]

Antigravity

Trage Folgendes in die Konfigurationsdatei unter ~/.gemini/config/mcp_config.json ein (nutze nicht ~/.gemini/antigravity/):

{
  "mcpServers": {
    "llm-council": {
      "command": "uvx",
      "args": ["--from", "llm-council-mcp-server", "llm-council-mcp"]
    }
  }
}

2. Bei manuellem Klon (Methode B)

Ersetze /pfad/zu/venv/bin/python3 und /pfad/zu/llm-council-mcp/server.py mit deinen absoluten Pfaden.

Claude Code

claude mcp add llm-council --scope user -- /pfad/zu/venv/bin/python3 /pfad/zu/llm-council-mcp/server.py

Codex CLI (~/.codex/config.toml)

[mcp_servers.llm-council]
command = "/pfad/zu/venv/bin/python3"
args = ["/pfad/zu/llm-council-mcp/server.py"]

Antigravity (~/.gemini/config/mcp_config.json)

{
  "mcpServers": {
    "llm-council": {
      "command": "/pfad/zu/venv/bin/python3",
      "args": ["/pfad/zu/llm-council-mcp/server.py"]
    }
  }
}

🛠️ Fehlerbehebung

  • Server erscheint nicht im Tool?
    • Starte die Client-Anwendung (Claude Code, Codex oder Antigravity) komplett neu. MCP-Server werden beim Start geladen.
  • Antigravity erkennt den Server nicht?
    • ĂśberprĂĽfe, ob der Server-Eintrag in ~/.gemini/config/mcp_config.json steht. Falls du manuell eine Datei in ~/.gemini/antigravity/ angelegt hast, lösche diese und nutze den korrekten Pfad.
  • Fehler beim Aufruf von OpenRouter (z. B. 401, 402)?
    • Ă–ffne die Setup-UI und kontrolliere deinen API-Key. Vergewissere dich, dass dein OpenRouter-Konto ĂĽber ausreichend Guthaben verfĂĽgt.
  • Logs einsehen:
    • Fehlermeldungen werden von deinem MCP-Client erfasst. Siehe in den Logs des Editors oder im Terminalfenster nach Details.

Releasing (Maintainer)

Dieses Repository verwendet Trusted Publishing über GitHub Actions, um Releases vollautomatisch auf PyPI zu veröffentlichen. Das Publishing erfolgt tokenlos mittels OIDC.

Ablauf fĂĽr ein neues Release:

  1. Versionsnummer in _version.py anpassen (z. B. 0.1.4).
  2. Änderungen committen und auf main pushen.
  3. Versions-Tag erstellen und pushen (muss auf v*.*.* passen):
    git tag -a v0.1.4 -m "v0.1.4"
    git push origin v0.1.4
    
  4. GitHub Actions baut und veröffentlicht das Paket automatisch auf PyPI.
  5. Ein GitHub-Release fĂĽr den neuen Tag erstellen.
  6. Die Setup-UI oder den Installer ausfĂĽhren, um die lokale Konfigurationsdatei auf den neuen Versions-Pin zu aktualisieren.

Credits

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured