Hive Memory

Hive Memory

hive-memory•bymoonx010

An MCP server that provides AI coding agents with persistent, graph-connected memory across projects, storing decisions, learnings, and session progress in a local SQLite knowledge base.

License: MIT•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Stores decisions, learnings, and notes as memory entries and automatically creates synapses to related memories.
  • •Recalls memories using keyword matching combined with graph traversal via spreading activation.
  • •Uses a SQLite database with FTS5 full-text search, WAL mode, and no external services required.
  • •Syncs context from connectors including GitHub, Slack, Notion, and Google Calendar.

BEST FOR

  • •AI coding agents that need to retain decisions and context across multiple projects over time.
  • •Discovering related context through graph traversal rather than relying solely on keyword search.
  • •Teams sharing memory through a Git-based shared cortex.

ABOUT HIVE-MEMORY

Hive Memory is cataloged as an MCP server attributed to moonx010. An MCP server that provides AI coding agents with persistent, graph-connected memory across projects, storing decisions, learnings, and session progress in a local SQLite knowledge base. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Hive Memory are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What is graph memory and how does it connect memories?

Memories are connected through directed, weighted synapses inspired by neuroscience, with axon types such as temporal, causal, semantic, refinement, conflict, dependency, and derived.

Does Hive Memory require a cloud service or accounts?

No cloud, accounts, or embeddings are required; everything stays on the local machine.

Can Hive Memory be deployed as a shared HTTP server?

Yes, it can run in HTTP mode for shared team access with per-user API keys and rate limiting.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 4bbf36c037ff · 采集于 2026-11-13 14:08:58 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

 ██╗  ██╗██╗██╗   ██╗███████╗
 ██║  ██║██║██║   ██║██╔════╝
 ███████║██║██║   ██║█████╗
 ██╔══██║██║╚██╗ ██╔╝██╔══╝
 ██║  ██║██║ ╚████╔╝ ███████╗
 ╚═╝  ╚═╝╚═╝  ╚═══╝  ╚══════╝
 ███╗   ███╗███████╗███╗   ███╗ ██████╗ ██████╗ ██╗   ██╗
 ████╗ ████║██╔════╝████╗ ████║██╔═══██╗██╔══██╗╚██╗ ██╔╝
 ██╔████╔██║█████╗  ██╔████╔██║██║   ██║██████╔╝ ╚████╔╝
 ██║╚██╔╝██║██╔══╝  ██║╚██╔╝██║██║   ██║██╔══██╗  ╚██╔╝
 ██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝██║  ██║   ██║
 ╚═╝     ╚═╝╚══════╝╚═╝     ╚═╝ ╚═════╝ ╚═╝  ╚═╝   ╚═╝

Cross-project memory layer for AI coding agents — with graph memory

npm license node


Hive Memory is an MCP server that gives AI coding agents persistent, graph-connected memory across projects. It stores decisions, learnings, and session progress in a local knowledge base with brain-inspired synaptic connections — so your agent can discover related context through topology-based traversal, not just keyword search.

Features

  • 33 MCP tools — project management, memory storage/recall, graph traversal, browsing, connectors, team sync, meetings, stewardship, and admin
  • SQLite-backed — FTS5 full-text search, WAL mode, zero external services
  • Graph memory (synapses) — 15 axon types, Hebbian learning, spreading activation
  • Hybrid search — BM25 + optional vector similarity with RRF fusion
  • 4 connectors — GitHub, Slack, Notion, Google Calendar
  • Team sync — Git-based shared cortex for teams
  • Meeting pipeline — transcript → structured notes → enrichment
  • HTTP mode — Deploy on Railway/Render with per-user API keys and rate limiting
  • Docker support — Ready-to-run container with health check
  • Schema versioning — Tracked migration history in schema_meta table
  • Audit logging — In-memory audit trail for all tool calls
  • Backup CLI — hive-memory backup [--output path] for database snapshots

Architecture

┌──────────────────────────────────────────────────────────┐
│                    Hive Memory (cortex)                   │
│                                                          │
│  ┌────────────┐  ┌──────────────┐  ┌─────────────────┐  │
│  │ MCP Server │  │  HTTP Server │  │   CLI Interface  │  │
│  │  (stdio)   │  │  (port 3179) │  │   (hive-memory)  │  │
│  └─────┬──────┘  └──────┬───────┘  └────────┬────────┘  │
│        └────────────────┼────────────────────┘           │
│                         │                                │
│  ┌──────────────────────▼────────────────────────────┐  │
│  │                   CortexStore                      │  │
│  │  ┌────────────┐  ┌──────────┐  ┌──────────────┐  │  │
│  │  │HiveDatabase│  │ Synapse  │  │ Enrichment   │  │  │
│  │  │ (SQLite)   │  │  Graph   │  │   Engine     │  │  │
│  │  └─────┬──────┘  └──────────┘  └──────────────┘  │  │
│  │        │                                           │  │
│  │  ┌─────▼──────────────────────────────────────┐  │  │
│  │  │         SQLite Database (cortex.db)          │  │  │
│  │  │  entities · synapses · sessions · projects  │  │  │
│  │  │  connectors · users · labels · schema_meta  │  │  │
│  │  └─────────────────────────────────────────────┘  │  │
│  └────────────────────────────────────────────────────┘  │
└──────────────────────────────────────────────────────────┘
         ▲              ▲              ▲
   ┌─────┴─────┐  ┌─────┴─────┐  ┌───┴──────┐
   │  GitHub   │  │   Slack   │  │  Notion  │
   │ Connector │  │ Connector │  │ Connector│
   └───────────┘  └───────────┘  └──────────┘

Quick Start

Install

npm install -g hive-memory

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "hive-memory": {
      "command": "hive-memory"
    }
  },
  "permissions": {
    "allow": [
      "mcp__hive-memory__*"
    ]
  }
}

The permissions.allow entry auto-approves all Hive Memory tools so Claude won't prompt for permission every session.

Claude Desktop

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "hive-memory": {
      "command": "hive-memory"
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "hive-memory": {
      "command": "hive-memory"
    }
  }
}

HTTP Mode (Remote Deployment)

CORTEX_HTTP=true CORTEX_AUTH_TOKEN=secret hive-memory --http

Or with Docker:

docker compose up

Agent Instructions

Hive Memory works best when your AI agent knows when to call the tools. Copy the provided instruction templates into your agent's instruction file:

AgentInstruction fileTemplate
Claude Code~/.claude/CLAUDE.mdclaude-md-template.md
Codex~/AGENTS.md or ./AGENTS.mdcodex-md-template.md

See the full setup guide for step-by-step instructions.

Tools Reference (33 tools)

Project Tools (4)

ToolDescription
project_registerRegister or update a project (upsert)
project_searchSearch projects by name/tags, or list all (empty query)
project_statusGet project context (full mode includes cross-project insights)
project_onboardAuto-discover projects in a directory + scan for agent memory files

Memory Tools (5)

ToolDescription
memory_storeStore a decision, learning, or note. Auto-creates synapses to related memories
memory_recallSearch using keyword matching + graph traversal (spreading activation)
memory_linkForm an explicit synapse between two memory entries
memory_traverseDeep graph traversal — find memories connected through synaptic pathways
memory_connectionsView the synaptic connections of a specific memory entry

Session Tools (1)

ToolDescription
session_saveSave session progress — what was done, what's next

Browse Tools (5)

ToolDescription
memory_lsList entities with filters (project, type, status, domain)
memory_treeTree view of entities grouped by project and type
memory_grepRegex/substring search across entity content
memory_inspectDetailed view of a specific entity including synapses
memory_timelineChronological view of entities in a time range

Trail Tools (3)

ToolDescription
memory_trailView the access trail of recently used memories
memory_whoSee which agents have contributed to a project
memory_decayApply synapse weight decay and prune weak connections

Connector Tools (2)

ToolDescription
connector_syncTrigger a connector sync (GitHub, Slack, Notion, Calendar)
connector_statusView sync status and entry counts for all connectors

Team Tools (4)

ToolDescription
team_initInitialize a Git-based shared team cortex
team_pushPush local entries to the team cortex
team_pullPull team entries into local database
team_statusView pending push/pull and conflict count

Context Tools (2)

ToolDescription
context_enrichRun enrichment on an entity (classification, topics, decisions)
entity_resolveFind and deduplicate person entities across sources

Meeting Tools (2)

ToolDescription
meeting_processProcess a meeting transcript into structured notes and decisions
meeting_briefingGenerate a meeting briefing from recent meetings

Steward Tools (2)

ToolDescription
memory_auditRun data quality audit on stored memories
memory_briefingGenerate daily or weekly memory briefing

Advisor Tools (1)

ToolDescription
workflow_analyzeAnalyze workflow patterns and generate insights

User / Admin Tools (2)

ToolDescription
user_manageManage users — add, list, revoke, rotate API keys
memory_audit_logRetrieve recent MCP tool call audit log (admin only)

Connectors

ConnectorEnv VariableWhat it syncs
GitHubGITHUB_TOKENPRs, Issues, ADRs, CODEOWNERS
SlackSLACK_TOKENSignal-filtered messages, threads
NotionNOTION_TOKENPages, databases, block content
Google CalendarGOOGLE_CALENDAR_CREDENTIALSEvents, attendees (OAuth2/service account)
OutlookOUTLOOK_TOKENCalendar events

How It Works

┌──────────┐     ┌──────────┐     ┌──────────┐
│ Claude   │     │ Cursor   │     │ Codex    │
│ Code     │     │          │     │          │
│ (Proj A) │     │ (Proj B) │     │ (Proj C) │
└────┬─────┘     └────┬─────┘     └────┬─────┘
     │                │                │
     └────────────────┼────────────────┘
                      │ MCP (stdio)
               ┌─────────────┐
               │ Hive Memory │
               │  MCP Server │
               └──────┬──────┘
                      │
     ┌────────────────┼────────────────┐
     ▼                ▼                ▼
┌─────────┐    ┌───────────┐    ┌───────────┐
│ Hive    │    │ Synapse   │    │ Spreading │
│ Cell    │    │ Graph     │    │ Activation│
│ Tree    │    │ (LTP/LTD) │    │           │
└─────────┘    └───────────┘    └───────────┘

No cloud. No accounts. No embeddings required. Everything stays on your machine.

Graph Memory (Synapses)

Every memory can be connected to other memories through synapses — directed, weighted edges inspired by neuroscience:

"Use JWT for auth" ──[causal:0.8]──→ "Add token refresh logic"
        │                                      │
        │──[semantic:0.5]──→ "OAuth2 decision"  │
                                               │
"Rate limit API" ←──[dependency:0.6]───────────┘

Axon Types:

TypeMeaningExample
temporalA occurred before BDecision A was made before Decision B
causalA caused/led to B"Use PostgreSQL" → "Add pgvector extension"
semanticTopically relatedBoth about authentication
refinementB refines/updates A"Use JWT" → "Use JWT with 15min expiry"
conflictA contradicts B"Use SQL" vs "Use NoSQL"
dependencyB depends on AFeature B requires Feature A
derivedB was derived from ALearning extracted from a decision

Spreading Activation

When you search with memory_recall or memory_traverse, the system propagates signal through the synapse graph:

Query: "auth token handling"
  │
  ▼ keyword match
  Seed: "Use JWT for auth" (activation: 1.0)
  │
  ├─[causal:0.8]──→ "Add token refresh" (activation: 0.4)
  │                        │
  │                  ├─[dependency:0.6]──→ "Rate limit API" (activation: 0.12)
  │
  └─[semantic:0.5]──→ "OAuth2 decision" (activation: 0.25)

Hebbian Learning

"Neurons that fire together, wire together":

  • LTP (Long-Term Potentiation): When two memories are recalled together repeatedly, their synapse weight increases (+0.1 per co-activation)
  • LTD (Long-Term Depression): Unused synapses decay over time (×0.995 per flush cycle)
  • Pruning: Synapses below 0.05 weight are automatically removed
  • Auto-formation: When two memories are co-activated 5+ times, a Hebbian synapse is created automatically

HTTP Mode & Multi-User Setup

Deploy as an HTTP server for shared team access:

# Create an admin user
hive-memory user create admin-name

# Start HTTP server
CORTEX_HTTP=true CORTEX_AUTH_TOKEN=<token> hive-memory

# Or use Docker
docker compose up

API Key Rotation

hive-memory user rotate <user-id>

The new key is active immediately. The graceUntil timestamp is stored for audit purposes.

Rate Limiting

The HTTP server enforces a limit of 100 requests per minute per user (in-memory, per instance).

Auto Session Capture

Hive Memory can automatically save sessions when Claude Code exits. Add to ~/.claude/settings.json:

{
  "hooks": {
    "SessionEnd": [{
      "matcher": "",
      "hooks": [{
        "type": "command",
        "command": "hive-memory hook session-end"
      }]
    }]
  }
}

This parses the Claude Code transcript and auto-saves a session summary. It skips if session_save was already called during the session.

Backup

# Create a backup
hive-memory backup

# Specify output path
hive-memory backup --output /path/to/backup.db

Configuration

Environment Variables

VariableDefaultDescription
CORTEX_DATA_DIR~/.cortexData storage directory
CORTEX_LOCAL_SYNCtrueSet to "false" to disable writing .cortex.md into project directories
CORTEX_LOCAL_FILENAME.cortex.mdCustom filename for local context files
CORTEX_HTTPfalseSet to "true" to enable HTTP server mode
CORTEX_AUTH_TOKEN—Admin API token for HTTP mode
PORT / CORTEX_PORT3179HTTP server port
CORTEX_SYNC_INTERVAL_MIN30Connector auto-sync interval in minutes

Example with custom config:

{
  "mcpServers": {
    "hive-memory": {
      "command": "hive-memory",
      "env": {
        "CORTEX_DATA_DIR": "/custom/path",
        "CORTEX_LOCAL_SYNC": "false"
      }
    }
  }
}

Local Context File (.cortex.md)

Hive Memory writes a .cortex.md file in each registered project directory. This file contains a snapshot of the project's current context — summary, recent session, next tasks, and cross-project insights. It's auto-generated and should be added to .gitignore.

To disable this feature, set CORTEX_LOCAL_SYNC=false.

Migration from v1/v2

Hive Memory v3 automatically migrates existing data:

  • Legacy knowledge/ files are migrated to hive direct entries on first startup, then renamed to knowledge.bak/
  • Existing project registrations (index.json, summary.json, sessions) are unchanged
  • Embedding data (vectors.json, embedding model cache) is no longer used and can be safely deleted
  • The @huggingface/transformers dependency has been removed — no more model downloads
  • Schema version is now tracked in the schema_meta table

No manual action needed — just update and restart.

Development

npm install          # Install dependencies
npm run build        # Build TypeScript
npm run dev          # Dev mode with auto-reload
npm run lint         # Lint with ESLint
npm run typecheck    # Type check
npm test             # Run tests
npm run test:coverage # Run tests with coverage report

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Hive Memory from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/hive-memory)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent