hive-memory
Syncs PRs, Issues, ADRs, and CODEOWNERS from GitHub.
Syncs events and attendee information from Google Calendar.
Syncs pages, databases, and block content from Notion.
Syncs signal-filtered messages and threads from Slack.
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., "@hive-memoryremember the decision to use Redis for caching across projects"
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.
██╗ ██╗██╗██╗ ██╗███████╗
██║ ██║██║██║ ██║██╔════╝
███████║██║██║ ██║█████╗
██╔══██║██║╚██╗ ██╔╝██╔══╝
██║ ██║██║ ╚████╔╝ ███████╗
╚═╝ ╚═╝╚═╝ ╚═══╝ ╚══════╝
███╗ ███╗███████╗███╗ ███╗ ██████╗ ██████╗ ██╗ ██╗
████╗ ████║██╔════╝████╗ ████║██╔═══██╗██╔══██╗╚██╗ ██╔╝
██╔████╔██║█████╗ ██╔████╔██║██║ ██║██████╔╝ ╚████╔╝
██║╚██╔╝██║██╔══╝ ██║╚██╔╝██║██║ ██║██╔══██╗ ╚██╔╝
██║ ╚═╝ ██║███████╗██║ ╚═╝ ██║╚██████╔╝██║ ██║ ██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝Cross-project memory layer for AI coding agents — with graph memory
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_metatableAudit 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-memoryClaude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"hive-memory": {
"command": "hive-memory"
}
},
"permissions": {
"allow": [
"mcp__hive-memory__*"
]
}
}The
permissions.allowentry 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 --httpOr with Docker:
docker compose upAgent 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:
Agent | Instruction file | Template |
Claude Code |
| |
Codex |
|
See the full setup guide for step-by-step instructions.
Tools Reference (33 tools)
Project Tools (4)
Tool | Description |
| Register or update a project (upsert) |
| Search projects by name/tags, or list all (empty query) |
| Get project context (full mode includes cross-project insights) |
| Auto-discover projects in a directory + scan for agent memory files |
Memory Tools (5)
Tool | Description |
| Store a decision, learning, or note. Auto-creates synapses to related memories |
| Search using keyword matching + graph traversal (spreading activation) |
| Form an explicit synapse between two memory entries |
| Deep graph traversal — find memories connected through synaptic pathways |
| View the synaptic connections of a specific memory entry |
Session Tools (1)
Tool | Description |
| Save session progress — what was done, what's next |
Browse Tools (5)
Tool | Description |
| List entities with filters (project, type, status, domain) |
| Tree view of entities grouped by project and type |
| Regex/substring search across entity content |
| Detailed view of a specific entity including synapses |
| Chronological view of entities in a time range |
Trail Tools (3)
Tool | Description |
| View the access trail of recently used memories |
| See which agents have contributed to a project |
| Apply synapse weight decay and prune weak connections |
Connector Tools (2)
Tool | Description |
| Trigger a connector sync (GitHub, Slack, Notion, Calendar) |
| View sync status and entry counts for all connectors |
Team Tools (4)
Tool | Description |
| Initialize a Git-based shared team cortex |
| Push local entries to the team cortex |
| Pull team entries into local database |
| View pending push/pull and conflict count |
Context Tools (2)
Tool | Description |
| Run enrichment on an entity (classification, topics, decisions) |
| Find and deduplicate person entities across sources |
Meeting Tools (2)
Tool | Description |
| Process a meeting transcript into structured notes and decisions |
| Generate a meeting briefing from recent meetings |
Steward Tools (2)
Tool | Description |
| Run data quality audit on stored memories |
| Generate daily or weekly memory briefing |
Advisor Tools (1)
Tool | Description |
| Analyze workflow patterns and generate insights |
User / Admin Tools (2)
Tool | Description |
| Manage users — add, list, revoke, rotate API keys |
| Retrieve recent MCP tool call audit log (admin only) |
Connectors
Connector | Env Variable | What it syncs |
GitHub |
| PRs, Issues, ADRs, CODEOWNERS |
Slack |
| Signal-filtered messages, threads |
Notion |
| Pages, databases, block content |
Google Calendar |
| Events, attendees (OAuth2/service account) |
Outlook |
| Calendar 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:
Type | Meaning | Example |
| A occurred before B | Decision A was made before Decision B |
| A caused/led to B | "Use PostgreSQL" → "Add pgvector extension" |
| Topically related | Both about authentication |
| B refines/updates A | "Use JWT" → "Use JWT with 15min expiry" |
| A contradicts B | "Use SQL" vs "Use NoSQL" |
| B depends on A | Feature B requires Feature A |
| B was derived from A | Learning 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 upAPI 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.dbConfiguration
Environment Variables
Variable | Default | Description |
|
| Data storage directory |
|
| Set to |
|
| Custom filename for local context files |
|
| Set to |
| — | Admin API token for HTTP mode |
|
| HTTP server port |
|
| Connector 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 toknowledge.bak/Existing project registrations (
index.json,summary.json, sessions) are unchangedEmbedding data (
vectors.json, embedding model cache) is no longer used and can be safely deletedThe
@huggingface/transformersdependency has been removed — no more model downloadsSchema version is now tracked in the
schema_metatable
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 reportLicense
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/moonx010/hive-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server