Liking cljdoc? Tell your friends :D

hive-mcp

Your AI finally remembers.

License: AGPL-3.0 MCP


The Problem

You explain your codebase to Claude. Architecture, constraints, patterns. Then you hit the context limit. New session. Claude forgets everything.

The Solution

Session 1                         Session 2
───────────────────────────────────────────────────
You: "Our auth uses JWT..."       You: catch me up
Claude: *learns*                  Claude: "I remember:
         ↓                         - Auth uses JWT with refresh
    *wrap up*                      - Convention: validate at boundaries
         ↓                         What should we work on?"
    [Memory]  ────────────────►

Persistent, project-scoped memory with semantic search. Conventions, decisions, snippets — stored locally, never forgotten.

The two rituals

Catch up — reconstruct everything at the start of a session:

hive project workflow catchup using pwd as dir

Wrap up — crystallize what you learned before you lose it:

make memories on all learnings this session, kg connect them, sync kanban, create remaining kanban tasks if any, and workflow wrap. Can use multi command to do all at once.

Both are plain requests to the model, not slash commands — it reaches for the project, memory, kg, and kanban tools itself. multi batches the whole wrap into a single call.


What Sets hive-mcp Apart

Capabilityhive-mcpTypical MCP servers
Knowledge GraphStructural edges - how knowledge relate?Flat key-value or vector-only
Session Continuity/wrap crystallizes, /catchup reconstructs — zero-down re-explaining across sessionsManual copy-paste or lost
Multi-Agent CoordinationLings (planners) + drones (executors) with file claims, hivemind shouts, and a continuous production beltSingle-agent only
Scoped MemoryHierarchical Context Retrieval (HCR) - project scoping - with TTL decayGlobal namespace or none
Extension Architecturerequiring-resolve stubs with noop fallbacks - plug your extensions and playMonolithic

Quick Start

1. Install

Option A: Automated with hive-mcp-cli (Recommended)

# Requires Go 1.21+
go install github.com/hive-agi/hive-mcp-cli/cmd/hive@latest
go install github.com/hive-agi/hive-mcp-cli/cmd/hive-setup-mcp@latest

# Register and let Claude guide setup
claude mcp add hive-setup --scope user -- hive-setup-mcp
claude
# Ask: "Help me setup hive-mcp"

Option B: Manual

export HIVE_MCP_DIR="$HOME/hive-mcp"
export BB_MCP_DIR="$HOME/bb-mcp"

git clone https://github.com/hive-agi/hive-mcp.git "$HIVE_MCP_DIR"
git clone https://github.com/hive-agi/bb-mcp.git "$BB_MCP_DIR"

claude mcp add hive --scope user -- "$HIVE_MCP_DIR/start-bb-mcp.sh"

2. Verify

claude mcp list | grep -q "hive" && echo "OK" || echo "FAILED"

3. Optional: Semantic Search

ollama pull nomic-embed-text      # Local embeddings
docker compose up -d              # Chroma vector DB

Prerequisites

RequirementVersionInstall
Claude CodeLatestclaude.ai/download
Babashka1.3+babashka.org
Java17+apt install openjdk-17-jdk

Optional:

  • Emacs 28.1+ for swarm vterm UI and buffer integration. See Emacs Configuration.
  • Headless mode works without Emacs (but WIP for stability of headless - recommended to use Emacs as a dependency).

20 Consolidated Tools

ToolPurpose
memoryPersistent entries with semantic search, TTL decay, scoping
kgKnowledge Graph — edges, subgraphs
agentSpawn/kill/dispatch lings and drones
waveParallel drone dispatch with validation
hivemindShout/ask coordination between agents
sessionWrap, catchup, whoami, context store
workflowForge belt, FSM-driven production cycles
kanbanTask management with plan-to-kanban
magitGit operations — status, stage, commit, push
ciderClojure nREPL eval, doc, completions
presetAgent presets — list, search, generate headers
analysisKondo lint, SCC metrics, complexity hotspots
lspCode analysis — callers, calls, namespace graph
projectProjectile — files, search, hierarchy scan
emacsEval elisp, buffers, notifications
olympusGrid layout control for multi-agent UI
agoraMulti-agent deliberation and debates
configRuntime configuration management
migrationKG/memory backup, restore, backend switching
multiMeta-facade — batch operations

Each tool is a consolidated namespace with subcommands (e.g., memory add, memory query, kg traverse).


Architecture

Claude ──MCP──► hive-mcp (Clojure)
                    │
                    ├── Memory (Chroma vectors + scoped entries)
                    ├── Knowledge Graph (DataScript, Datalevin, or Datahike)
                    ├── Swarm (lings + drones + hivemind)
                    ├── Workflows for AIs (building blocks for repeatable behavior)
                    └── Extension Registry (requiring-resolve stubs)
                            │
                            └──► [optional] your extensions (e.g., plug openclaw, langchain, whatever etc)

Extensibility

hive-mcp uses a plugin architecture based on the IAddon protocol with automatic classpath discovery. Creating a new addon takes one command:

clojure -Sdeps '{:deps {io.github.hive-agi/hive-mcp {:git/tag "vX.Y.Z" :git/sha "..."}}}' \
  -Tnew create :template hive-agi/addon :name com.example/my-addon

This generates a complete project with:

  • IAddon protocol implementation (defrecord with 8 lifecycle methods)
  • META-INF classpath manifest (auto-discovered at startup, zero core changes)
  • Unit tests (12 tests covering lifecycle, tools, health)
  • REPL-ready development setup

Addon Types

TypeUse case
NativeClojure code in the same JVM — direct function calls
MCP BridgeProxy to external MCP servers via stdio/sse
ExternalNon-MCP integrations (REST APIs, CLI tools)

How It Works

Addons are discovered via META-INF/hive-addons/*.edn manifest files on the classpath (same pattern as Java's ServiceLoader). Manifests declare dependencies, and addons are loaded in topological order. No changes to hive-mcp core code needed.

See the Creating Addons wiki guide and ADR-0007 for architecture details.


Carto Store (Cartography Snippets)

Cartography snippets (code-chunked embeddings for carto_callers / carto_definition / carto_callees) live in a dedicated vector store — separate from the general :memory-store — so recall tuning stays independent.

Default config (already wired in docker-compose.yml as service qdrant-carto):

{:services
 {:qdrant-carto {:mode :local
                 :host "localhost"
                 :port 6333
                 :collection "carto-snippets"
                 :embedding {:provider :ollama
                             :model "nomic-embed-code"}}
  :carto-store  {:backend :qdrant-carto}}}

User override example (~/.config/hive-mcp/config.edn):

{:services
 {:qdrant-carto {:host "qdrant.internal"
                 :port 6333
                 :collection "my-carto"
                 :embedding {:provider :ollama
                             :model "nomic-embed-code"}}
  :carto-store  {:backend :qdrant-carto}}}

If :carto-store is omitted, hive-mcp.config.resolve/resolve-carto-store logs a warning and falls back to :memory-store — the system keeps booting, but cartography writes land in the shared store. Production deployments should declare :carto-store explicitly.

Bring up the dedicated instance:

docker compose up -d qdrant-carto

For LLMs

See CLAUDE.md for project conventions, tool patterns, and memory usage guidelines.

Documentation

ResourceDescription
WikiComplete guides
InstallationDetailed setup
TroubleshootingCommon issues

Related

RepositoryDescription
bb-mcpLightweight Babashka MCP wrapper (~50MB RAM)
lsp-mcpClojure-LSP bridge addon (analysis, callers, references)
basic-tools-mcpFile read/write/glob/grep tools addon
hive-dslDSL verb compiler for batch operations
hive-testTest utilities for hive-mcp addons
olympus-web-uiWeb dashboard for swarm monitoring
hive-mcp-cliGo CLI for automated setup

AGPL-3.0-or-later

Can you improve this documentation? These fine people already did:
Pedro Gomes Branquinho & blw
Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close