Queries OpenAI, Google, and Anthropic APIs in parallel to synthesize consensus responses from multiple frontier models. Exposes tools for submitting questions to the hivemind, configuring API keys, checking provider status, and viewing token usage stats. When Claude is your MCP host, it orchestrates responses from GPT-5.2 and Gemini 3 Pro without needing an Anthropic key. Includes a deliberation algorithm that runs up to three refinement rounds when models disagree, with prompt caching to reduce costs on follow-ups. Useful when you want multiple model perspectives on difficult questions or need validation across different reasoning approaches.
Multi-model AI consensus platform that queries GPT-5.2, Claude Opus 4.5, and Gemini 3 Pro simultaneously to deliver synthesized, high-confidence responses.
Use Hivemind directly in Claude Code to get perspectives from GPT-5.2 and Gemini 3 Pro. Claude acts as the orchestrator and synthesizes the responses.
Note: No Anthropic API key needed - Claude is already your host!
npm install -g @quantulabs/hivemind
claude mcp add hivemind -- hivemind
You need at least one API key, but both are recommended for better consensus:
Option 1: Paste directly (recommended)
/hive-config sk-proj-xxx... # OpenAI key
/hive-config AIzaSy... # Google key
Option 2: Config file
Create ~/.config/hivemind/.env:
OPENAI_API_KEY=sk-...
GOOGLE_API_KEY=AIza...
# Optional: Override default models
OPENAI_MODEL=gpt-5.1
GOOGLE_MODEL=gemini-2.5-flash
A
.env.exampletemplate is included in the package.
For standalone MCP usage, you can also add an Anthropic key to include Claude in the consensus:
ANTHROPIC_API_KEY=sk-ant-...
Disable Claude Code mode via /hive-config > Settings > Claude Code Mode.
/hive "Why is my WebSocket connection dropping?"
Claude orchestrates the consensus from GPT-5.2 and Gemini 3 Pro responses.
| Tool | Description |
|---|---|
hivemind | Query models and get synthesized consensus |
configure_keys | Set API keys (stored securely) |
check_status | Check configuration and active providers |
configure_hive | Toggle grounding search and settings |
check_stats | View token usage and cost statistics |
/hive <question> - Orchestrate multi-model consensus with Claude as the synthesizer/hive-config - Configure API keys and settings/hivestats - View usage statisticsCopy CLAUDE.md.example to your project's .claude/CLAUDE.md to enable automatic Hivemind consultation when Claude is stuck (after 3+ failed attempts).
All providers use optimized caching for cost reduction on follow-up queries:
| Provider | Type | Savings | Min Tokens |
|---|---|---|---|
| OpenAI | Automatic | 50% | 1024 |
| Gemini 2.5+ | Implicit | 90% | - |
| Anthropic | Explicit | 90% | 1024 |
A full-featured web app with solo mode, hivemind mode, and conversation history.
# Clone the repository
git clone https://github.com/QuantuLabs/hivemind.git
cd hivemind
# Install dependencies (requires Bun >= 1.0)
bun install
# Start development server
bun dev
Open http://localhost:3000, click the settings icon, and enter your API keys.
hivemind/
├── apps/
│ └── web/ # Next.js 14 frontend
├── packages/
│ ├── core/ # Shared consensus logic & providers
│ └── mcp/ # Model Context Protocol server
└── .claude/ # Claude Code integration
# Run all tests
bun test
# Run tests with coverage
bun test:coverage
# Build all packages
bun build
# Lint code
bun lint
MIT
Developed by QuantuLabs
OPENAI_API_KEYsecretOpenAI API key for GPT-5.2
GOOGLE_API_KEYsecretGoogle AI API key for Gemini
io.github.ericm1018/skillfm-llm-cost-optimizer-openai-anthropic-usage
io.github.mikerawsonnz/llm-orchestration-agent
io.github.mikerawsonnz/authenticated-llm-agent
labforgedev/copilot-memory-mcp
csoai-org/agent-prompt-injection-firewall-mcp
io.github.mikerawsonnz/authenticated-multi-llm-agent