Hivemind

Hivemind

MCP server that enables Claude Code to orchestrate multi-model AI consensus by querying GPT-5.2 and Gemini 3 Pro simultaneously, synthesizing high-confidence responses.

Category
访问服务器

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.

<details> <summary>Using with other MCP clients (non-Claude Code)</summary>

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. </details>

Usage

/hive "Why is my WebSocket connection dropping?"

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

Available Tools

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

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:

Provider Type Savings Min Tokens
OpenAI Automatic 50% 1024
Gemini 2.5+ Implicit 90% -
Anthropic Explicit 90% 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

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选