Persistent memory for AI assistants: store, search, and connect knowledge across conversations.
MCP Server: io.github.kagura-ai/memory-cloud
The io.github.kagura-ai/memory-cloud MCP server provides persistent memory for AI assistants, enabling the storage, search, and connection of knowledge across conversations. Its description emphasizes continuity by maintaining and reusing information rather than treating each conversation as isolated.
๐ ๏ธ Key Features
Persistent memory for AI assistants
Store knowledge
Search stored knowledge
Connect knowledge across conversations
๐ Use Cases
Reusing information between separate AI assistant conversations
Retrieving previously stored facts or context via search
Linking related knowledge across conversation boundaries
โก Developer Benefits
Supports cross-conversation knowledge continuity
Exposes capabilities aligned to memory workflows: store, search, connect
โ ๏ธ Limitations
No additional capabilities, tool count, or operational details are provided in the available server data
Adaptive memory for AI agents and teams โ self-hosted, beyond RAG.
An MCP server that gets smarter every time you search:
hybrid search + a neural memory graph that learns which memories belong together.
Claude Code CLI recalling memories from Kagura over MCP โ โถ watch the demo
Why Kagura Memory Cloud?
Your AI forgets everything after each conversation. Kagura fixes that โ and gets smarter every time you search.
Most AI memory tools are just vector databases with a chat wrapper. Kagura is different โ it implements the full LLM Knowledge Base pattern (Karpathy's LLM Wiki) at team scale:
Approach
Storage
Compounding
Scale
Vector DB / RAG
Embedded chunks
None โ retrieve-only
Any
Karpathy's LLM Wiki
Markdown files
LLM rewrites pages
Personal (~100 pages)
Kagura Memory Cloud
PostgreSQL + Qdrant + Neural graph
Hebbian + Sleep Maintenance
Team / org
Feature
Description
Adaptive Memory
Every search automatically strengthens connections between related memories. The more you use it, the better explore() discovers hidden relationships.
Self-hosted (Ollama/vLLM โ local, free), Voyage AI, or Cohere โ cross-encoder reranking for precision
Neural Memory Graph
Hebbian learning builds a knowledge graph in the background. explore() traverses it for serendipitous discovery.
Agent Memory Substrate
Beyond a knowledge store: delivery modes (pinned / time-triggered), a server-stamped trust boundary, an agent state lane, and a retrieval-feedback signal โ the primitives an autonomous agent loop needs.
Agent Control Plane (preview)
Workspace-scoped Agent Registry, subtractive context bindings, agent-bound member keys, lifecycle kill switches, and one-call session bootstrap. Introduced in v0.49.0.
Hebbian learning โ every recall() strengthens edges between co-retrieved memories. Sleep Maintenance consolidates periodically.
Background graph evolution (zero LLM cost) vs LLM-driven page rewrites
Compounding loop: Currently explicit (user/agent calls remember() after synthesizing answers). Auto-write-back of synthesized answers is intentionally opt-in to keep noise low.
Adaptive Memory: Two Search Paths
Kagura separates precision search and discovery into two independent paths, each optimized for its purpose:
recall() โ Precision search. Hybrid (semantic 60% + BM25 40%) with optional AI reranking. Returns the most relevant memories.
explore() โ Discovery. Traverses the Neural Memory graph to find related memories that keyword search would miss.
Hebbian learning โ Every recall() silently strengthens edges between co-retrieved memories. No explicit training needed โ the graph grows organically as you use the system.
This separation is intentional: mixing graph signals into recall degrades precision (validated via benchmarks). Instead, each path does what it's best at.
Data isolation: All data is filtered by workspace_id โ context_id โ user_id. Memories never leak across boundaries. Single Qdrant collection with payload filtering.
Vector backend: Qdrant by default. A single-process self-hosted / CLI / edge deployment can instead run the embedded LanceDB backend โ "Kagura Lite" (preview) with no separate Qdrant server (KAGURA_VECTOR_BACKEND=lance, pip install '.[lite]'). Not for multi-worker / SaaS (LanceDB is single-writer). See Deployment โ Embedded Vector Backend.
Quick Start
System Requirements
Minimum
Recommended
CPU
2 cores
4+ cores
RAM
4 GB
8+ GB
Disk
10 GB free
20+ GB free
Prerequisites
Docker & Docker Compose
Python 3.11+
Node.js 20+
OpenAI API key (for embeddings) โ or a self-hosted inference server (e.g. Ollama) for local embeddings
OAuth2 credentials (optional โ password + MFA login available without OAuth)
Setup
One-line setup:
bash
git clone https://github.com/kagura-ai/memory-cloud.git
cd memory-cloud
./setup.sh
With Claude Code:
bash
git clone https://github.com/kagura-ai/memory-cloud.git
cd memory-cloud
claude # then run /setup
Step-by-step setup:
bash
# 1. Clone
git clone https://github.com/kagura-ai/memory-cloud.git
cd memory-cloud
# 2. Configure environment (generates secrets, prompts for API keys)
(cd backend && python3 -m src.cli.setup_env)
# 3. Start all services
docker compose up -d
# 4. Run migrations
(cd backend && alembic upgrade head)
# 5. Create admin account (interactive โ sets password, MFA, API key, embedding provider)
(cd backend && python3 -m src.cli.create_admin)
# Backend API: http://localhost:8080# Frontend UI: http://localhost:3000# API docs: http://localhost:8080/redoc
.env.local settings (auto-configured by setup_env):
NEXT_PUBLIC_PLAN_FREE_DISPLAY_NAME / BASIC / PRO / PROMAX โ plan display name customization (default: S/M/L/XL)
Connect an MCP Client
Works with Claude Code, Claude Desktop, Claude Chat, ChatGPT, Gemini CLI, and any Streamable-HTTP MCP client.
Claude Code (3 steps):
Start services and open http://localhost:3000/workspace/integrations/api-keys to create an API key
Copy .mcp.json.example to .mcp.json and fill in your workspace ID and API key:
bash
cp .mcp.json.example .mcp.json
# Edit .mcp.json โ set workspace_id (from URL bar) and API key
.mcp.json.example ships with the all-tools URL. Set "url" to one of:
All tools (default):http://localhost:8080/mcp/w/{workspace_id}
Core tools only โ smaller tool list:http://localhost:8080/mcp/w/{workspace_id}?profile=core
Pick core when your client loads every tool schema at session start (it is about 65% smaller). It lists the 12 memory and context tools and leaves out Sleep, analyses, files, edges, secrets, resources and the agent control plane โ those stay callable, they are just not listed; switch back to the default URL to see them. See Tool Profiles.
Restart Claude Code and verify:
code
You: "Remember: our API uses JWT with 1h expiry and refresh token rotation"
โ AI calls remember() โ stored permanently
You: "What do we know about auth?"
โ AI calls recall() โ finds it instantly, even months later
.mcp.json is in .gitignore โ never commit it (contains API keys).
Full setup guide โ every client, the memory-sync hook, the ready-to-use .claude/ templates, the kagura-memory Claude Code plugin (skills + tool-guardrail hooks), and the WSL2 networking note: MCP Client Setup
MCP Tools
64 tools across 13 categories: Memory (remember / recall / explore โฆ), Agent Substrate (pinned + time-triggered delivery, state, measurements, feedback), Agent Control Plane (preview), Neural Edges, Contexts, Tags, Files (R2), Analyses (Memory Analysis), Resources, Secrets (zero-knowledge), Sleep Maintenance, Usage, and API-Key Bindings โ each with per-role access control.
A client does not have to list all 64: the core URL above (?profile=core) lists 12, and ?tools=remember,recall lists exactly the tools you name โ see Tool Profiles.
REST API
In addition to MCP tools, a full REST API is available:
Admin: Users, plan management, neural config (/api/v1/admin/*)
Secrets: Zero-knowledge secret store โ ciphertext-only, server never decrypts (/api/v1/config/secrets/*)
Full API documentation: http://localhost:8080/redoc
Authentication
Two OAuth2 providers are supported:
Google OAuth2 โ Optional. Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET
GitHub OAuth2 โ Optional. Set GITHUB_CLIENT_ID and GITHUB_CLIENT_SECRET
Users with the same email address across providers share a single account. Password + MFA login is available without any OAuth provider (see Quick Start).
Plan Tier Customization
Plans control per-workspace resource limits (contexts / memories / MCP calls per day). Four tiers ship by default: S (free), M (basic), L (pro) and XL (promax). For self-hosted single-user setups, assign the XL (promax) plan to your workspace โ it is the only tier that may create resources, connectors and public contexts (numeric limits are env-overridable; a tier's feature set is not). Defaults, environment-variable overrides, and optional Stripe self-service billing: Deployment โ Plan Tiers
Development with Claude Code
This project is designed to be developed with Claude Code and Kagura Memory Cloud itself โ pre-configured slash commands, safety hooks, sub-agents, and rules load automatically from .claude/. Setup and the full tooling reference: Contributing โ Development with Claude Code
Documentation
API reference โ two complementary entry points:
Concepts (markdown): API Reference โ auth, base URLs, MCP endpoint, request/response examples
Endpoint reference (live): http://localhost:8080/redoc โ auto-generated from FastAPI, always in sync with the running backend