# MultiChat

> Broadcast one prompt to 2-6 AI models side-by-side - or convene them as a deliberative panel: an AI-only Habermas Machine with blind drafts, anonymous peer review, explicit convergence, and a minority report. Local-first, bring your own keys.

- **Type:** MCP server
- **Install:** `agentstack add mcp-zmustafa-multichat`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [zmustafa](https://agentstack.voostack.com/s/zmustafa)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [zmustafa](https://github.com/zmustafa)
- **Source:** https://github.com/zmustafa/MultiChat

## Install

```sh
agentstack add mcp-zmustafa-multichat
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 💬 MultiChat

**Broadcast one prompt to many AI models and watch them answer side-by-side — live.**
A multi-model workbench with two modes: **compare** — fan a single prompt out to 2–6 models
and stream every answer concurrently, then let a Judge lane synthesize the best one; or
**deliberate** — an AI-only **Habermas Machine** that convenes those same models as a panel:
blind drafts, anonymous peer review, an explicit convergence gate, and a minority report of
what they never agreed on. Bring your own providers (API key **or** OAuth), call tools, run
evals, and track it all on an insights dashboard.

[](https://github.com/zmustafa/MultiChat/actions/workflows/ci.yml)
[](LICENSE)
[](backend/requirements.txt)
[](frontend/package.json)
[](frontend/tsconfig.json)
[](https://fastapi.tiangolo.com/)
[](CONTRIBUTING.md)

[Features](#-features) · [Screenshots](#-screenshots) · [Quick start](#-quick-start-local) · [Connect providers](#-connect-your-ai-providers) · [How it works](#-how-it-works) · [Deliberation](#-model-deliberation--the-research-behind-it) · [Tech stack](#-tech-stack) · [Docs](#-documentation)

> 🆕 **Latest:** **Deliberation** — convene 2–5 models as a panel (an AI-only *Habermas
> Machine*): blind drafts, anonymous claim-level review, an approval gate, a synthesis with
> a **minority report**, and a JSON **audit trail** of every step. Chats and panels now
> share one sidebar.

---

> [!IMPORTANT]
> This is an unofficial project and is **not affiliated with or endorsed by** OpenAI,
> Anthropic, Google, Microsoft/GitHub, or any model provider. You bring your own
> accounts and API keys; you are responsible for complying with each provider's terms.

## Why MultiChat?

Picking the "best" model is guesswork when you only ever see one answer at a time.
**MultiChat puts them head-to-head** — one prompt fans out to every lane, each streams
live in its own column, and a **Judge** lane can merge them into a single best answer.
When the *disagreement* is the point, switch to **Deliberate** and the same models become
a panel that has to justify everything it rejects.
It's not just a chat box: enable **tools** (web search, fetch URL, calculator), run a
**suite of evals** across many models with latency/throughput scoring, and watch usage,
cost, and provider mix on an **Insights** dashboard — all running locally against your
own keys.

- 🏟️ **Compare, not one-at-a-time** — broadcast a prompt to 2–6 lanes and read every model's answer concurrently, with a **Diff** view to spot differences.
- ⚖️ **Deliberate, don't just compare** — convene the models as a panel (an AI-only **Habermas Machine**): blind drafts, anonymous peer review, an explicit convergence gate, and a minority report when they don't agree.
- 🔌 **Bring your own provider** — OpenAI, Azure OpenAI, Azure Foundry, Anthropic, Gemini, GitHub Copilot, Ollama, OpenAI-compatible — via **API key or OAuth sign-in** (ChatGPT / Claude / Copilot).
- ⚖️ **Agentic tools + a Judge** — models call web search / fetch / calculator with a persisted tool-call timeline, and a Judge lane synthesizes the strongest answer.
- 🧪 **Evals & 📊 Insights built in** — run prompt × model grids in parallel with score, TTFT and tok/s; track token usage, estimated cost, and activity trends over time.
- 🏠 **Local-first & private** — runs on your machine via Docker or natively; keys are encrypted at rest and **never** sent to the browser.

> Built for developers, prompt engineers, and AI power users who want to compare and trust their models.

## Table of Contents

- [Features](#-features)
- [Screenshots](#-screenshots)
- [Quick start (local)](#-quick-start-local)
- [Connect your AI providers](#-connect-your-ai-providers)
- [How it works](#-how-it-works)
- [Deliberation — the research behind it](#-model-deliberation--the-research-behind-it)
- [Tech stack](#-tech-stack)
- [Security notes](#-security-notes)
- [Documentation](#-documentation)
- [Contributing](#-contributing)
- [License](#-license)

## ✨ Features

### 🏟️ Multi-model compare
Broadcast one prompt to **2–6 lanes** and watch each model stream **concurrently** in its
own column. Target a single lane, resend to all, or regenerate — a single chat is just a
one-lane session.

### ⚡ Live streaming fan-out
An async fan-out engine streams every lane over **SSE** at once. Disconnect and reconnect
mid-run — answers keep generating **server-side** and resume from a disk-backed mirror.

### 🛠️ Tool calling
Models can call **web_search** (Brave), **fetch_url** (SSRF-guarded, size-capped), and a
safe **calculator** — with a per-message reasoning + tool-call timeline that persists
across reloads and shows a live preview of each call.

### ⚖️ Judge / synthesizer
Turn on a **Judge** lane to merge every model's answer into one best response — then
**copy**, download as **Markdown**, or export to **PDF**.

### 🧪 Evaluations
Run a **prompt × model** grid **in parallel** (5 at a time) with live progress. Each cell
is scored 1–10 by a judge model and reports **latency**, **time-to-first-token**, and
**tokens/sec** — all sortable, with regression tracking across runs.

### 📊 Insights dashboard
At-a-glance **token usage & estimated cost**, provider mix, tool-calls by status/kind,
activity over 7 days / 24 hours, a weekday×hour punch-card, top tools, and most-active
chats — filterable by time range.

### 🔌 Bring your own AI
**OpenAI · OpenAI EU · Azure OpenAI · Azure Foundry · Anthropic · Gemini · GitHub
Copilot · Ollama · OpenAI-compatible** — switchable per lane, via **API key** or **OAuth
sign-in** (ChatGPT, Claude Pro/Max, Copilot). Keys are encrypted and disabled until set.

### 🖼️ Rich rendering
**Markdown + GFM**, syntax-highlighted code with collapse, **Mermaid** diagrams (export to
PNG), and **image vision** input for models that support it.

### ⚖️ Model deliberation
Put a **panel of models** through blind drafts, anonymous claim-level peer review and
explicit `APPROVE` / `REJECT` verdicts. Converges only on real agreement — otherwise it
hands you a **minority report** of what stayed contested. [The research behind it ↓](#-model-deliberation--the-research-behind-it)

### 🔍 Auditable by design
Every deliberation records the **exact prompt each model saw**, what it accepted or
rejected and why, who changed position and what changed it. Export the whole trail as
**PDF / Markdown / Word / JSON**.

### 🎭 Personas & snippets
Save reusable **lane presets** (a set of providers/models) as personas, and keep a library
of prompt **snippets** to drop into the composer.

### 💾 Export, import & backup
Export a comparison to **Markdown / Word / PDF / JSON**, import sessions, and take a full
encrypted **system backup** of everything from Settings.

### Local & private

🔒 Keys Fernet-encrypted at rest · 🧾 never sent to the browser · 👤 JWT auth, per-owner
scoping · 🛡️ SSRF-guarded fetch · 🏠 runs entirely on your machine (Docker or native).

## 📸 Screenshots

All captured live against a real multi-lane session — nothing staged or mocked up. The blue
dot is the mouse pointer.

**Full council deliberation** — convene multiple models for blind drafts, peer review and convergence checks, then inspect the synthesized answer and minority report.

**Compare & diff** — read all four lanes side-by-side, then flip to **Diff** to see where the models agree and where they part ways.

**Tools & focus mode** — models call `web_search` / `fetch_url` mid-answer with cited sources, and any lane can be **maximized to full width** to read it properly, then restored to the grid.

**Judge** — merge every lane into one best answer, then copy or export it to Markdown or PDF.

**Usage & cost insights** — a dashboard for messages, responses and tool calls, token usage with per-model cost estimates, provider mix, and activity trends over any time range.

## ⚡ Quick start (local)

### Option 1 — set it up with Microsoft Scout

1. Open **Microsoft Scout** and check that your account shows **● Connected** at the bottom left.
2. Click **New chat** in the left sidebar.
3. *(Optional)* Pick a model in the composer's model selector (e.g. `GPT-5.5`).
4. Type this into the **"Describe what you want to do"** box and press **Enter**:

   > Set up MultiChat from https://github.com/zmustafa/MultiChat on my computer in a folder called
   > `C:\dev\MultiChat`: install everything it needs and start it on **http://localhost:5000** (its API
   > on port 5001), create the sign-in account with username **admin** and password **admin**, make sure
   > it starts again automatically whenever I turn my computer on, and then confirm the app is running
   > and I can log in.

5. Approve the steps Scout asks to run. It reports back when the app is ready.

### Option 2 — set it up with VS Code + GitHub Copilot

1. Open **Visual Studio Code**.
2. Select **File → Open Folder** and open a local folder where MultiChat should live.
3. Open **GitHub Copilot Chat** from the Copilot icon, or press `Ctrl+Alt+I`, and switch it to **Agent** mode.
4. Ask Copilot:

   > Set up MultiChat from https://github.com/zmustafa/MultiChat in this folder: install everything it
   > needs and start it on **http://localhost:5000** (its API on port 5001), create the sign-in account
   > with username **admin** and password **admin**, make sure it starts again automatically whenever I
   > turn my computer on, and then confirm the app is running and I can log in.

That's it — the agent handles the rest and tells you when the app is ready.

### Sign in

| | |
| --- | --- |
| **App** | **http://localhost:5000** |
| **Username** | `admin` |
| **Password** | `admin` |
| API + interactive docs | http://localhost:5001/docs |

MultiChat keeps running in the background and restarts with your computer, so
**http://localhost:5000 is ready every time you sign in** — just open it and log in.

> [!IMPORTANT]
> The seeded **admin / admin** account is for local use only. **Change the password immediately**
> (avatar menu → *Change password*) before exposing the app — see [Security notes](#-security-notes).

Useful VS Code shortcuts:

- Open Copilot Chat: `Ctrl+Alt+I`
- Open the Command Palette: `Ctrl+Shift+P`
- Open a terminal: ``Ctrl+Shift+` ``

Manual setup (Docker, no Copilot)

```bash
# 1) Clone
git clone https://github.com/zmustafa/MultiChat.git
cd MultiChat

# 2) Configure environment
cp .env.example .env
# Generate a Fernet key and paste it into APP_ENCRYPTION_KEY:
python -c "from cryptography.fernet import Fernet;print(Fernet.generate_key().decode())"
# Also set a strong JWT_SECRET (don't ship the default).

# 3) Run the whole stack
docker compose up --build -d
```

Then open **http://localhost:5000** and sign in with **admin / admin**.

Native dev (without Docker)

Requires **Python 3.11+** and **Node 20+**.

**Backend**

```bash
cd backend
python -m venv .venv
. .venv/Scripts/Activate.ps1     # Windows PowerShell
pip install -r requirements.txt
$env:APP_ENCRYPTION_KEY = (python -c "from cryptography.fernet import Fernet;print(Fernet.generate_key().decode())")
$env:JWT_SECRET = "dev-secret"
uvicorn app.main:app --reload --port 5001
```

**Frontend**

```bash
cd frontend
npm install
npm run dev        # http://localhost:5000  (reads VITE_API_BASE, default http://localhost:5001)
```

### Using the app

1. **Sign in** (admin / admin on first run).
2. **Settings → Add provider** (e.g. OpenAI) with an API key or OAuth, then **Test**.
3. On **Compare**, create a topic and **Add lane** (provider + model) 2–6 times.
4. Type a prompt and **Send** — it broadcasts to all lanes and each streams live.
5. Optional: enable **Tools**, turn on a **Judge** lane, open **Evals** / **Insights**,
   switch to **Diff** view, export/import, or toggle dark mode.

## 🔑 Connect your AI providers

MultiChat ships with **no models of its own** — you connect your own accounts. After the
first sign-in it takes you straight to **Settings → Providers**, where **＋ Add provider**
opens a 2-step wizard. The quickest route is to **sign in with a subscription you already
have** (GitHub Copilot, ChatGPT, Claude Pro/Max); everything else uses an **API key**.

### Option 1 — sign in with an AI subscription you already have *(easiest)*

Works for **GitHub Copilot**, **OpenAI (ChatGPT)** and **Anthropic Claude (Pro/Max)** — no
API key, no separate billing.

1. Go to **Settings → Providers** and click **＋ Add provider**.
2. Pick the provider, choose **👤 OAuth sign-in** as the auth method, and click **Add provider**.
3. In the provider's panel click **Connect**. A browser tab opens:
   - **GitHub Copilot** — enter the device code shown in MultiChat on the GitHub page that opened.
   - **ChatGPT** — sign in and it connects automatically. If it doesn't, paste the full
     `http://localhost:1455/auth/callback?code=…` URL back into the box.
   - **Claude** — sign in, then paste the `code#state` value shown by Anthropic.
4. The panel flips to **OAuth: connected ✓** and the model list loads by itself.

You can **Disconnect** at any time from the same panel.

### Option 2 — connect with an API key

For every other provider (and if you'd rather use a key than a sign-in).

1. Go to **Settings → Providers** and click **＋ Add provider**.
2. Pick the provider, keep **🔑 API key** as the auth method, and click **Add provider**.
3. Paste your key (plus **base URL** / **deployment** for Azure, OpenAI-compatible and Ollama) and **Save**.
4. Click **Test connection** — a green result means you're good.
5. Click **↻ Refresh models**, then click a model in the list to make it the default.

### Supported providers

| Provider | Connect with | What you need |
| --- | --- | --- |
| **GitHub Copilot** | Sign-in | A GitHub account with an active Copilot subscription |
| **OpenAI** | ChatGPT sign-in *or* API key | Your ChatGPT account, or a key from [platform.openai.com](https://platform.openai.com/api-keys) |
| **Anthropic Claude** | Claude sign-in *or* API key | Your Claude Pro/Max subscription, or an `sk-ant-…` key |
| **OpenAI (EU)** | API key | An EU-enabled OpenAI key (routes to `eu.api.openai.com`) |
| **Google Gemini** | API key | Key from [Google AI Studio](https://aistudio.google.com/) |
| **Azure OpenAI** | API key | Endpoint (base URL), API version and deployment name |
| **Azure Foundry** | API key | `…services.ai.azure.com` endpoint, key, and a deployed model name |
| **OpenAI-compatible** | API key + base URL | Any gateway — OpenRouter, Together, Groq, vLLM… |
| **Ollama (local)** | Base URL | Your local Ollama server (usually no key) |

### Use it in a lane

On **Compare**, click **Add lane**, pick the provider and a model, and repeat for 2–6 lanes.
Set one provider as **default** so background tasks (chat titles, the Judge, evals) know what to use.

> [!NOTE]
> Keys and OAuth tokens are **encrypted at rest** and never sent to the browser — but all usage
> is billed to **your own** provider accounts under their terms.

## 🧩 How it works

The React SPA talks to a FastAPI backend that fans one prompt out to every lane in
parallel and streams tokens back over SSE. All provider and tool calls are proxied by the
backend — the browser never holds a key.

```mermaid
flowchart LR
    U([Browser]) --> SPA[React SPA]
    SPA -->|/api + SSE| BE[FastAPI backendasync fan-out · SSE streaming]
    BE --> LLM{{ProvidersOpenAI · Claude · GeminiCopilot · Ollama · …}}
    BE --> TOOLS[Toolsweb_search · fetch_url · calculator]
    BE --> DB[(SQLite)]
    BE --> FILES[[Uploads / run mirror]]
```

The fan-out streaming engine, the provider abstraction, and the tool implementations all
live in the backend; the browser only ever talks to the API.

## ⚖ Model Deliberation — the research behind it

> **MultiChat Deliberation is an AI-only adaptation of the deliberative pattern
> demonstrated by DeepMind's Habermas Machine. It combines blind multi-model reasoning,
> anonymous claim-level peer review, iterative revision, explicit convergence criteria and
> minority-report preservation to

…

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [zmustafa](https://github.com/zmustafa)
- **Source:** [zmustafa/MultiChat](https://github.com/zmustafa/MultiChat)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** yes
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-zmustafa-multichat
- Seller: https://agentstack.voostack.com/s/zmustafa
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
