mcpField
H
hivemind

hivemind

Local
github.com/QuantuLabsAI & Agents1Updated 40w ago

About hivemind

Hivemind is a multi-model consensus platform for Claude Code users and others seeking synthesized responses from AI models. Its MCP server queries configured providers, while its web app also offers solo chats and conversation history.

Key features

  1. 01Query multiple models for consensus
  2. 02Refine responses for up to three rounds
  3. 03Use solo or consensus chat modes
  4. 04Configure provider keys and settings
  5. 05Check token usage and cost statistics
  6. 06Maintain conversation history in the web app

Use cases

  1. 01Compare model perspectives on a question
  2. 02Consult other models when Claude Code is stuck
  3. 03Chat with one model at a time
  4. 04Review token usage and costs

MCP support

The MCP server exposes tools to query models for synthesized consensus, configure keys and settings, and check provider status and usage statistics. Claude Code can orchestrate responses from GPT-5.2 and Gemini 3 Pro.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"quantulabs-hivemind": {
"command": "npx",
"args": [
"-y",
"@quantulabs/hivemind"
],
"env": {
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"GOOGLE_API_KEY": "<GOOGLE_API_KEY>"
}
}
}
}
Run commandnpx -y @quantulabs/hivemind
Environment variables to set
OPENAI_API_KEYSecretOpenAI API key for GPT-5.2
GOOGLE_API_KEYSecretGoogle AI API key for Gemini

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@quantulabs/hivemind0.1.3

Tools

5

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
contextstringNoAdditional context to include (code snippets, file contents, documentation, etc.). This context will be sent to all models.
questionstringYesThe question to ask the AI models
previousResponsesarrayNoFor follow-up queries: include previous model responses so they can reconsider. Each item should have provider and content.

Details

From the project README

Hivemind

License: MIT npm version

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.


MCP Server for Claude Code

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.

Requirements

Note: No Anthropic API key needed - Claude is already your host!

Installation
npm install -g @quantulabs/hivemind
claude mcp add hivemind -- hivemind
Configuration

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.example template is included in the package.

Using with other MCP clients (non-Claude Code)

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.

Usage
/hive "Why is my WebSocket connection dropping?"

Claude orchestrates the consensus from GPT-5.2 and Gemini 3 Pro responses.

Available Tools
ToolDescription
hivemindQuery models and get synthesized consensus
configure_keysSet API keys (stored securely)
check_statusCheck configuration and active providers
configure_hiveToggle grounding search and settings
check_statsView token usage and cost statistics
Claude Code Commands
  • /hive <question> - Orchestrate multi-model consensus with Claude as the synthesizer
  • /hive-config - Configure API keys and settings
  • /hivestats - View usage statistics
Automatic Hivemind Fallback

Copy CLAUDE.md.example to your project's .claude/CLAUDE.md to enable automatic Hivemind consultation when Claude is stuck (after 3+ failed attempts).

Prompt Caching

All providers use optimized caching for cost reduction on follow-up queries:

ProviderTypeSavingsMin Tokens
OpenAIAutomatic50%1024
Gemini 2.5+Implicit90%-
AnthropicExplicit90%1024

Web Interface

A full-featured web app with solo mode, hivemind mode, and conversation history.

Quick Start
# 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.

Features
  • Multi-Model Consensus: Query 3 leading AI models simultaneously
  • Deliberation Algorithm: Up to 3 rounds of refinement to reach consensus
  • Solo Mode: Chat with individual models (GPT, Claude, Gemini)
  • Hivemind Mode: Get synthesized responses from all models
  • Conversation History: Persistent chat sessions
  • Dark/Light Theme: Full theme support
  • Secure Storage: API keys encrypted with AES-GCM in browser
Security
  • API keys are encrypted using AES-GCM with PBKDF2 key derivation
  • Keys are stored locally in browser localStorage (never sent to servers)
  • Session persistence uses sessionStorage (cleared on browser close)

How Consensus Works

  1. Initial Query: All 3 models receive the same question
  2. Analysis: An orchestrator analyzes responses for agreements/divergences
  3. Refinement: If no consensus, models see other perspectives and refine (up to 3 rounds)
  4. Synthesis: Final response synthesizes agreed points and addresses divergences

Supported Models

OpenAI
  • GPT-5.2 (default)
  • GPT-5.1, GPT-5, GPT-5 Mini, GPT-5 Nano
  • O4 Mini
Anthropic
  • Claude Opus 4.5 (default)
  • Claude Sonnet 4.5, Claude Opus 4, Claude Sonnet 4
Google
  • Gemini 3 Pro (default)
  • Gemini 3 Flash, Gemini 2.5 Pro/Flash/Flash Lite, Gemini 2.0 Flash

Project Structure

hivemind/
├── apps/
│   └── web/              # Next.js 14 frontend
├── packages/
│   ├── core/             # Shared consensus logic & providers
│   └── mcp/              # Model Context Protocol server
└── .claude/              # Claude Code integration

Development

# Run all tests
bun test

# Run tests with coverage
bun test:coverage

# Build all packages
bun build

# Lint code
bun lint

License

MIT


Developed by QuantuLabs

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.