Hivemind
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hivemindpublish event: starting task 'fix login bug'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hivemind
Persistent, append-only event log for AI agent coordination. Enables agents (Claude Code, Cursor, Codex CLI, custom scripts, CI pipelines) to publish, query, and react to structured events about project work — across tools, across sessions, and across time.
Hivemind is not an orchestrator, memory product, or workflow engine. It is the coordination layer beneath all of them.

Table of Contents
Related MCP server: AI Agent Timeline MCP Server
Quickstart
# Install the MCP server
npm install -g @hivemindai/mcp-server
# Or run directly with npx
npx hivemind-mcpLocal mode works out of the box — no account, no API key, no network. Events are stored in ~/.hivemind/events.db (SQLite) with local embeddings.
Cloud mode unlocks multi-agent coordination, the web dashboard, triggers, workflows, approvals, and cross-project intelligence:
export HIVEMIND_API_KEY=hm_live_xxx
npx hivemind-mcpGet your API key at hivemind.dev.
Configure Your AI Tool
Claude Code
claude mcp add hivemind -- npx hivemind-mcpCursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"hivemind": {
"command": "npx",
"args": ["hivemind-mcp"]
}
}
}Windsurf
Add to your MCP configuration:
{
"mcpServers": {
"hivemind": {
"command": "npx",
"args": ["hivemind-mcp"]
}
}
}Any MCP-Compatible Tool
Hivemind uses stdio transport. Point your tool at npx hivemind-mcp and it will auto-detect local or cloud mode based on whether HIVEMIND_API_KEY is set.
How It Works
Agent publishes event → embedding generated → stored in append-only log → other agents query/subscribeEvery meaningful action an agent takes — starting a task, making a decision, hitting a blocker, completing work — becomes a structured event with a vector embedding, stored permanently. Project memory, project state, and lightweight orchestration all compose on top of this log.
Two Modes
Mode | Storage | Embeddings | Auth | Network |
Local (default) | SQLite at | transformers.js (384 dims) | None needed | None |
Cloud | Convex (PostgreSQL + vector index) | OpenAI text-embedding-3-small (1536 dims) |
| Yes |
MCP Tools
Core Tools (local + cloud)
Tool | Description |
| Publish an event to a channel with structured data |
| Semantic search + structured filters (channel, event_type, time range) |
| Register interest in event patterns, returns recent matches |
| Aggregated project status: active tasks, completions, blockers |
| Acquire or release advisory resource locks |
Extended Tools (cloud only)
Tool | Description |
| List unresolved blockers across the project |
| Semantic memory search across all channels |
| View derived task state (active, completed, failed, blocked) |
| Your organizations, teams, and roles |
| List teams you have access to |
| Manage event-driven triggers (emit events or call webhooks) |
| Human-in-the-loop approval requests and policies |
| Curated knowledge base: add, search, update docs |
| Auto-injected instructions triggered by file/tool/keyword patterns |
| Define and run DAG-based multi-step workflows |
| Cron-based and event-based scheduling |
| Formally pass work between agents with context bundling |
| GSD-style structured planning with wave-based parallel execution |
Event Types
Hivemind defines standard event types for common agent activities. You can also use custom.* for anything else.
Type | Description |
| Agent starts a new task |
| Task finished successfully |
| Task failed |
| Task blocked by a dependency or error |
| Blocker resolved |
| Architecture or design decision recorded |
| Advisory lock acquired on a resource |
| Lock released |
| Code review needed |
| Review finished |
| Bug discovered or reported |
| Deployment candidate ready |
| Database schema change |
| Any user-defined event type |
Event Structure
{
"id": "01HQXYZ...",
"project_id": "proj_abc",
"channel": "backend",
"event_type": "task.completed",
"source": {
"agent": "claude-code",
"tool": "mcp-server",
"session": "sess_123"
},
"data": {
"description": "Implemented user authentication",
"files_changed": ["src/auth.ts", "src/middleware.ts"]
},
"confidence": 0.95,
"created_at": "2026-02-23T10:30:00Z"
}Tasks are derived from the event stream, not stored separately. A task.created event creates a task, task.completed/task.failed resolves it, task.blocked/task.unblocked changes its status. The event log is the single source of truth.
Features
Semantic Search
Every event gets a vector embedding at publish time. Query with natural language:
hivemind_query(query: "authentication changes", channel: "backend")Combines free-text semantic search with structured filters (channel, event_type, time range).
Advisory Locks
Resource-based locks for graceful conflict detection between agents:
hivemind_lock(action: "acquire", resource: "src/db.ts")
hivemind_lock(action: "release", resource: "src/db.ts")Any string as resource identifier (file paths, resource names, etc.)
Agent + tool metadata stored with each lock
Force-override with approval for stuck locks
Automatic cleanup of expired locks
Triggers
Pattern-match on events and automatically take action:
hivemind_trigger(action: "create", name: "deploy-on-ready",
match_event_type: "task.completed", match_channel: "backend",
action_type: "emit", emit_event_type: "deploy.ready", emit_channel: "ops")Exact and glob pattern matching (
task.*)Data field conditions (
{"status": "ready"})Aggregation modes:
all(AND),any(OR),count(threshold)Actions: emit a new event or call a webhook URL
Human-in-the-Loop Approvals
Agents can request human approval before taking sensitive actions:
hivemind_approvals(action: "request", channel: "backend",
description: "Schema migration: add users table",
action_type: "schema-change")Approval queue visible in the dashboard
Policies auto-require approval for resource patterns (e.g.,
src/db/**)Scopes:
one-time,session,standing
DAG Workflows
Define multi-step, multi-agent pipelines as directed acyclic graphs:
hivemind_workflow(action: "create", name: "deploy-pipeline",
nodes: [
{"nodeId": "test", "type": "task", "label": "Run tests"},
{"nodeId": "review", "type": "gate", "label": "Human review"},
{"nodeId": "deploy", "type": "task", "label": "Deploy to prod"}
],
edges: [
{"from": "test", "to": "review"},
{"from": "review", "to": "deploy"}
])Node types: task, gate, condition, parallel
Trigger workflows on cron schedules or events
Track run status and history
Knowledge Base
Curated documents with vector embeddings for semantic retrieval:
hivemind_knowledge(action: "add", title: "Auth Architecture",
content: "We use JWT tokens with...", tags: ["auth", "architecture"])
hivemind_knowledge(action: "search", query: "how does authentication work?")Skills (Auto-Injected Instructions)
Define instructions that auto-inject into agent context based on triggers:
hivemind_skill(action: "add", name: "react-conventions",
instructions: "Use functional components, prefer hooks...",
trigger_files: ["*.tsx", "src/components/**"],
trigger_keywords: ["component", "react"])Agent Handoffs
Formally pass work between agents with full context:
hivemind_handoff(action: "request", channel: "backend",
target_agent: "agent-2",
description: "Continue implementing the payment flow",
context: {"files_changed": ["src/payments.ts"], "decisions": [...]})Structured Plans (GSD-Style)
Create phased execution plans with dependency-aware wave-based parallelism — inspired by the Get Shit Done framework:
hivemind_plan(action: "create", name: "v2-migration",
goal: "Migrate API to v2",
phases: [
{"name": "Research", "gate": "human", "steps": [
{"id": "s1", "description": "Audit current endpoints"},
{"id": "s2", "description": "Map breaking changes"}
]},
{"name": "Execute", "steps": [
{"id": "s3", "description": "Update auth module", "files": ["src/auth.ts"]},
{"id": "s4", "description": "Update user module", "files": ["src/users.ts"]},
{"id": "s5", "description": "Integration tests", "dependencies": ["s3", "s4"]}
]}
])Wave computation: Steps are automatically grouped by dependency depth. Independent steps run in parallel (wave 0), dependent steps wait (wave 1+)
Phase gates:
autoadvances automatically when all steps complete;humanrequires explicit advancementProgress tracking: Real-time completion percentages per phase with visual progress bars
Decision log: Record architectural decisions tied to the plan
Event integration: Every plan action publishes events to the log for full traceability
hivemind_plan(action: "waves", plan_id: "plan_ABC123")
# Returns:
# Wave 0 (3 tasks — can run in parallel): s3, s4
# Wave 1 (1 task): s5 (deps: s3, s4)Conflict Detection
When a task.created event is published, Hivemind automatically checks for semantically similar active tasks and returns warnings if another agent is working on overlapping work.
Context Synthesis
Search project memory across all channels with natural language:
hivemind_remember(query: "what decisions were made about the database?")Groups results by channel for a comprehensive view of project knowledge.
Scheduling
Run workflows or emit events on cron schedules:
hivemind_schedule(action: "create", name: "nightly-tests",
cron_expression: "0 0 * * *",
action_type: "run_workflow", workflow_id: "...")SDKs
TypeScript
npm install @hivemindai/sdk-tsimport { HivemindClient } from "@hivemindai/sdk-ts";
const client = new HivemindClient({ apiKey: "hm_live_xxx" });
// Publish an event
await client.publish({
channel: "backend",
event_type: "task.completed",
source: { agent: "my-agent", tool: "cli" },
data: { description: "Implemented auth" },
});
// Semantic search
const results = await client.query({
channel: "backend",
query: "authentication changes",
limit: 10,
});
// Project status
const status = await client.status();
// Advisory lock
await client.lock("src/db.ts", { agent: "my-agent" });
// Triggers
await client.createTrigger({
name: "deploy-on-ready",
match_event_type: "task.completed",
match_channel: "backend",
action_type: "emit",
emit_event_type: "deploy.ready",
emit_channel: "ops",
});
// Workflows
const run = await client.runWorkflow("workflow-id");Zero dependencies. Built-in retry logic. Methods for all cloud features (triggers, workflows, approvals, knowledge, skills, schedules, handoffs).
Python
pip install hivemind-sdkfrom hivemind import HivemindClient, HivemindSyncClient, PublishParams, EventSource
# Async client
async with HivemindClient(api_key="hm_live_xxx") as client:
await client.publish(PublishParams(
channel="backend",
event_type="task.completed",
source=EventSource(agent="my-agent", tool="cli"),
data={"description": "Implemented auth"},
))
status = await client.status()
results = await client.query(QueryParams(channel="backend"))
# Synchronous client
client = HivemindSyncClient(api_key="hm_live_xxx")
client.publish(PublishParams(...))Requires Python 3.10+. Both async and sync clients with retry logic.
REST API
The REST API is served by Convex HTTP actions. All endpoints require Authorization: Bearer hm_live_xxx (except /health).
Events
Method | Endpoint | Description |
POST |
| Publish an event |
GET |
| Query events (semantic search + filters) |
GET |
| Get a single event |
Status & Tasks
Method | Endpoint | Description |
GET |
| Active tasks, recent completions, blockers |
GET |
| Derived task state from event stream |
GET |
| Task completion metrics |
Coordination
Method | Endpoint | Description |
POST |
| Acquire a lock |
DELETE |
| Release a lock |
POST |
| Register a webhook subscription |
GET/POST |
| List/create triggers |
PATCH/DELETE |
| Update/delete a trigger |
POST/GET |
| Approval requests |
POST |
| Approve/deny a request |
GET/POST |
| Approval policies |
POST/GET |
| Agent handoffs |
Plans
Method | Endpoint | Description |
GET/POST |
| List/create plans |
GET/DELETE |
| Get/delete a plan |
GET |
| Plan progress with completion percentages |
GET |
| Wave-ordered steps for current phase |
POST |
| Advance to next phase |
POST |
| Update step status |
POST |
| Record a decision |
Workflows & Scheduling
Method | Endpoint | Description |
GET/POST |
| List/create workflows |
POST |
| Execute a workflow |
GET |
| Run history |
GET/POST |
| List/create schedules |
Knowledge & Intelligence
Method | Endpoint | Description |
GET/POST |
| Knowledge base CRUD |
GET/POST |
| Skill management |
GET |
| Recent decisions |
GET |
| Knowledge graph entities |
POST |
| Conflict detection |
Health
Method | Endpoint | Description |
GET |
| Health check (no auth required) |
Dashboard
The web dashboard at hivemind.dev provides a full UI for managing your Hivemind projects.
Page | Description |
Dashboard | Overview with quick stats and recent activity |
Events | Browse, filter, and inspect all events |
Live | Real-time agent activity stream |
Search | Semantic search interface |
Traces | Execution trace visualization |
Workflows | DAG workflow builder and runner |
Schedules | Cron and event-based trigger management |
Approvals | Approval queue and policy management |
Knowledge | Knowledge base documents and skills |
Errors | Error group analysis |
Analytics | Usage charts and token savings metrics |
Org Intelligence | Cross-project pattern detection |
Teams | Team management and permissions |
Account | API key management and rotation |
Settings | Billing (Stripe) and org member management |
Real-time updates via Convex subscriptions — no polling.
Environment Variables
Variable | Required | Description |
| For cloud mode | API key ( |
| No | Override the default API URL |
API Key Format:
hm_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (production, 40 chars)
hm_test_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx (testing, 40 chars)When HIVEMIND_API_KEY is not set, the MCP server runs in local mode with SQLite and local embeddings.
Architecture
+-----------------+
| Dashboard | Next.js + Clerk
| (analytics, | Real-time via Convex
| management) | subscriptions
+--------+--------+
|
+--------v--------+
| Convex Backend | Serverless functions
| (HTTP actions, | PostgreSQL + pgvector
| mutations, | OpenAI embeddings
| queries) |
+--------^--------+
|
+--------------+--------------+
| | |
+--------+------+ +----+----+ +-------+-------+
| MCP Server | | TS SDK | | Python SDK |
| (stdio/local) | | (HTTP) | | (HTTP) |
+--------+------+ +----+----+ +-------+-------+
| | |
+--------+------+ +----+----+ +-------+-------+
| Claude Code | | Custom | | CI/CD |
| Cursor | | Scripts | | Pipelines |
+---------------+ +---------+ +---------------+Monorepo Structure
hivemind/
├── convex/ # Convex backend (schema, functions, HTTP router)
├── packages/
│ ├── core/ # Shared: schemas, types, DB adapters, auth, embeddings
│ ├── mcp-server/ # MCP server (17 tools, stdio transport, local + cloud)
│ ├── sdk-ts/ # TypeScript SDK (HivemindClient)
│ ├── sdk-py/ # Python SDK (async + sync clients)
│ └── dashboard/ # Next.js web dashboard
├── scripts/ # Demo, seed, and setup scripts
└── docs/ # DocumentationTech Stack
Layer | Technology |
Runtime | Node.js 22 + TypeScript 5.4 |
Monorepo | Turborepo + pnpm workspaces |
Backend | Convex (serverless functions + database + vector search) |
Database (cloud) | Convex-managed PostgreSQL + pgvector |
Database (local) | SQLite + sqlite-vec |
Embeddings (cloud) | OpenAI text-embedding-3-small (1536 dims) |
Embeddings (local) | transformers.js / all-MiniLM-L6-v2 (384 dims) |
MCP | @modelcontextprotocol/sdk (stdio transport) |
Dashboard | Next.js 15 + React 19 + Tailwind CSS 4 |
Auth | Clerk (dashboard) + API keys (SDK/API) |
Payments | Stripe |
Development
Prerequisites
Node.js 22
pnpm 9.15+
Setup
# Install dependencies
pnpm install
# Build all packages
pnpm run build
# Run tests
pnpm run test
# Lint
pnpm run lintDev Servers
# MCP server (watches for changes)
pnpm run dev:mcp
# Convex dev server
pnpm run dev:convex
# Deploy Convex to production
pnpm run deploy:convexPython SDK
cd packages/sdk-py
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -vBuild Order (Turborepo)
core → sdk-ts → mcp-server → dashboard
→ sdk-py (independent)Publishing
# MCP Server → npm
cd packages/mcp-server && npm publish
# TypeScript SDK → npm
cd packages/sdk-ts && npm publish
# Python SDK → PyPI
cd packages/sdk-py && python -m build && twine upload dist/*
# Convex Backend
npx convex deployLicense
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gbram1/hivemind'
If you have feedback or need assistance with the MCP directory API, please join our Discord server