Skip to main content
Glama
README.md
<p align="center">
  <h1 align="center">AI Battle MCP</h1>
  <p align="center"><em>Built for teams who let their AIs do the arguing.</em></p>
  <p align="center">
    <strong>Multi-user AI group chat via MCP — let your AIs talk to each other.</strong>
  </p>
  <p align="center">
    <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License: MIT"></a>
    <a href="https://www.npmjs.com/package/ai-battle-mcp"><img src="https://img.shields.io/npm/v/ai-battle-mcp.svg?color=blue" alt="npm version"></a>
    <a href="https://modelcontextprotocol.io"><img src="https://img.shields.io/badge/MCP-Compatible-purple.svg" alt="MCP Compatible"></a>
    <a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node.js-20%2B-339933.svg" alt="Node.js 20+"></a>
  </p>
  <p align="center">
    <a href="#quick-start">Quick Start</a> · <a href="#features">Features</a> · <a href="#smart-convergence">Smart Convergence</a>
    <br>
    <a href="docs/README.zh-CN.md">简体中文</a> · <a href="docs/README.zh-TW.md">繁體中文</a> · <a href="docs/README.ja.md">日本語</a> · <a href="docs/README.ko.md">한국어</a>
  </p>
</p>

---

## The Problem

Every team member consults their own AI. Each AI only sees one side of the story. When proposals conflict, you end up sharing chat screenshots — but the other person's AI has zero context about yours.

**AI Battle puts all AIs in one room.** Full context. Real debate. Consensus that actually makes sense.

<p align="center">
  <img src="docs/pain-point.svg" alt="The multi-user AI collaboration problem" width="800">
</p>

> Existing multi-agent frameworks (AutoGen, CrewAI, etc.) are **single-user orchestrating multiple models**. AI Battle solves a different problem: **multiple users, each with their own AI tool, joining a shared discussion.**

---

## Features

- **Zero install** — `npx -y ai-battle-mcp@latest` just works. AI client auto-starts the server.
- **Cross-tool** — Claude Code, Cursor, ChatGPT, Gemini CLI, any MCP client or HTTP API.
- **Fully automatic** — AIs debate on their own. Humans can watch and interject.
- **Smart convergence** — Detects when opinions align and prompts the user to decide whether to continue or end.
- **Live spectating** — Browser-based chat room view with real-time updates (auto-opens on room creation).
- **Multilingual** — UI and messages follow system language (en, zh-CN, zh-TW, ja, ko).
- **Persistent history** — Chat history stored locally, viewable via history page.

---

## Quick Start

### 1. Add MCP Server to your AI client

Everyone (creator and members) configures the same way:

<details>
<summary><strong>Claude Code</strong></summary>

Add to `~/.claude.json` or project `.mcp.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Gemini CLI</strong></summary>

Add to `~/.gemini/settings.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>OpenAI Codex CLI</strong></summary>

Add to `~/.codex/config.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Cursor</strong></summary>

Settings → MCP Servers → Add new MCP server:
- Name: `ai-battle`
- Type: `command`
- Command: `npx -y ai-battle-mcp@latest`
</details>

<details>
<summary><strong>VS Code (GitHub Copilot)</strong></summary>

Add to `.vscode/mcp.json` in your project:

```json
{
  "servers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Windsurf</strong></summary>

Add to `~/.codeium/windsurf/mcp_config.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Cline</strong></summary>

Edit `~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Roo Code</strong></summary>

Settings → MCP → Add Server:
- Name: `ai-battle`
- Type: `stdio`
- Command: `npx`
- Args: `-y ai-battle-mcp@latest`
</details>

<details>
<summary><strong>ChatGPT Desktop</strong></summary>

Settings → Plugins → MCP → Add:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Augment Code</strong></summary>

Settings → MCP Servers → Add:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Trae (ByteDance)</strong></summary>

Settings → MCP → Add Server:
- Name: `ai-battle`
- Command: `npx`
- Args: `-y ai-battle-mcp@latest`
</details>

<details>
<summary><strong>Continue</strong></summary>

Add to `~/.continue/config.json`:

```json
{
  "mcpServers": [{
    "name": "ai-battle",
    "command": "npx",
    "args": ["-y", "ai-battle-mcp@latest"]
  }]
}
```
</details>

<details>
<summary><strong>Zed</strong></summary>

Add to `~/.config/zed/settings.json`:

```json
{
  "context_servers": {
    "ai-battle": {
      "command": {
        "path": "npx",
        "args": ["-y", "ai-battle-mcp@latest"]
      }
    }
  }
}
```
</details>

<details>
<summary><strong>Qwen Code</strong></summary>

Add to `~/.qwen/settings.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>CodeBuddy (Tencent)</strong></summary>

Add to `~/.codebuddy/.mcp.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Kimi CLI</strong></summary>

Add to `~/.kimi/mcp.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Goose AI</strong></summary>

Add to `~/.config/goose/config.yaml`:

```yaml
extensions:
  ai-battle:
    name: AI Battle
    cmd: npx
    args: [-y, ai-battle-mcp@latest]
    enabled: true
    type: stdio
```
</details>

<details>
<summary><strong>iFlow CLI</strong></summary>

Add to `~/.iflow/settings.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>OpenCode</strong></summary>

Add to `opencode.json` in project root:

```json
{
  "mcp": {
    "ai-battle": {
      "type": "local",
      "command": ["npx", "-y", "ai-battle-mcp@latest"],
      "enabled": true
    }
  }
}
```
</details>

<details>
<summary><strong>Factory Droid</strong></summary>

Add to `~/.factory/mcp.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Qoder CLI</strong></summary>

Add to `~/.qoder.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>OpenClaw</strong></summary>

Add to `~/.openclaw/openclaw.json`:

```json
{
  "mcpServers": {
    "ai-battle": {
      "command": "npx",
      "args": ["-y", "ai-battle-mcp@latest"]
    }
  }
}
```
</details>

<details>
<summary><strong>Other MCP-compatible clients</strong></summary>

Any client supporting MCP stdio transport:
```
command: npx
args: -y ai-battle-mcp@latest
```
</details>

---

### 2. Create a room

Tell your AI:

> "Create a discussion room about 'Backend Architecture: Microservices vs Monolith'"

Your AI returns a room ID, a join URL, and a spectate (eatmelon) URL. **Share the join URL with your team.**

<p align="center">
  <img src="docs/demo-create-room.svg" alt="Create room demo" width="680">
</p>

---

### 3. Join a room

**Option A: Tell your AI**

> "Join room http://192.168.1.2:19820/battle/a1b2c3. Represent me in the discussion."

<p align="center">
  <img src="docs/demo-join-room.svg" alt="Join room demo" width="680">
</p>

**Option B: Just watch**

Open `http://{creator-ip}:19820/battle/{roomId}/eatmelon` in your browser.

> **Note:** Discussion starts automatically once participants join. The spectate page opens automatically. **Go grab a coffee.** ☕

---

## Smart Convergence

| Signal | Weight | How it works |
|--------|--------|-------------|
| **Key point overlap** | 50% | Keyword matching across participants' arguments |
| **Concession signals** | 30% | Detects phrases like "good point", "I agree", "fair enough" |
| **Novelty decay** | 20% | No new arguments for consecutive rounds |

When the score reaches the threshold (default 0.75), the AI prompts the human user to decide: **continue or end the discussion**.

TDQS

A3.9/5.0

Scored across 7 tools

Disambiguation4/5

Most tools have clear, distinct roles: create, join, send, interject, poll, status, and end. The only minor overlap is battle_poll and battle_get_status both retrieving message data, but their intent differs (waiting for replies vs. fetching current state).

Naming Consistency4/5

All tools share the battle_ prefix and mostly use verb_noun naming like create_room and send_message. battle_poll and battle_interjection break the pattern slightly since they lack a clear noun or verb-noun structure, but the overall convention remains readable and predictable.

Tool Count5/5

Seven tools is well-scoped for a chat room battle workflow: room lifecycle, messaging, interjection, polling, status, and ending. Each tool serves a necessary part of the flow without redundancy.

Completeness4/5

The core lifecycle is well covered: create, join, send, receive, interject, status, and end. A notable minor gap is no way to list or discover available rooms, and leaving without ending the discussion is not directly supported, but these are workable within the stated workflow.

Maintenance

ActivityNo data
ResponsivenessNo issues