mcpField
A
Alaya Memory Engine

Alaya Memory Engine

Local
github.com/SecurityRoninMemory & Knowledge18Updated 15w ago

About Alaya Memory Engine

Alaya Memory Engine is a local memory engine for AI agents, storing conversation episodes and building a personal knowledge graph in SQLite. Its neuroscience-inspired lifecycle manages consolidation, associations, recall, and forgetting, with 10 MCP tools.

Key features

  1. 01Stores conversation episodes
  2. 02Semantic recall across memories
  3. 03Builds a personal knowledge graph
  4. 04Tracks emerging categories and preferences
  5. 05Consolidates, strengthens, and forgets memories
  6. 06Provides 10 MCP tools

Use cases

  1. 01Recall relevant details from past conversations
  2. 02Store facts and relationships for an agent
  3. 03Browse memory categories and preferences
  4. 04Maintain memory through lifecycle operations

MCP support

It exposes 10 tools to MCP clients for remembering, recalling, browsing knowledge, tracking preferences, and maintaining the memory system.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"alaya": {
"command": "npx",
"args": [
"-y",
"alaya-mcp"
],
"env": {
"ALAYA_LLM_API_KEY": "<ALAYA_LLM_API_KEY>",
"ALAYA_LLM_API_URL": "<ALAYA_LLM_API_URL>",
"ALAYA_LLM_MODEL": "<ALAYA_LLM_MODEL>",
"ALAYA_DB": "<ALAYA_DB>"
}
}
}
}
Run commandnpx -y alaya-mcp
Environment variables to set
ALAYA_LLM_API_KEYSecretAPI key for auto-consolidation (enables LLM-powered knowledge extraction)
ALAYA_LLM_API_URLOpenAI-compatible chat completions endpoint
ALAYA_LLM_MODELModel name (e.g. gpt-4o-mini, haiku, gemini-flash)
ALAYA_DBPath to SQLite database

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmalaya-mcp0.4.7

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

alaya-mcp

The only memory engine with neuroscience-grounded memory dynamics — Bjork dual-strength forgetting, retrieval-induced suppression, and Hebbian co-activation — in a zero-dependency embeddable Rust library.

Stores conversation episodes, consolidates knowledge through a cognitive lifecycle, and builds a personal knowledge graph — all in a local SQLite database.

Install

Claude Code

Add to ~/.claude/claude_code_config.json:

{
  "mcpServers": {
    "alaya": {
      "command": "npx",
      "args": ["-y", "alaya-mcp"]
    }
  }
}
Claude Desktop

Add to your Claude Desktop MCP config:

{
  "mcpServers": {
    "alaya": {
      "command": "npx",
      "args": ["-y", "alaya-mcp"],
      "env": {
        "ALAYA_LLM_API_KEY": "sk-...",
        "ALAYA_LLM_API_URL": "https://api.openai.com/v1/chat/completions",
        "ALAYA_LLM_MODEL": "gpt-4o-mini"
      }
    }
  }
}

The ALAYA_LLM_* env vars are optional — they enable automatic knowledge extraction. Without them, the agent extracts knowledge from its own context.

MCP Tools

ToolDescription
rememberStore a conversation episode
recallSemantic search across memories
statusMemory system health and stats
knowledgeBrowse extracted knowledge
learnStore pre-extracted facts and relationships
categoriesView emergent category taxonomy
preferencesTrack crystallized user preferences
neighborsExplore the knowledge graph
lifecycleTrigger maintenance (strengthen, transform, forget)
configureSet embedding provider and other options

How It Works

  1. Remember — store conversation episodes as they happen
  2. Consolidate — extract facts, relationships, and concepts from episodes
  3. Strengthen — co-retrieved memories strengthen their connections (Hebbian LTP); retrieving memory A actively suppresses competing memories B and C (retrieval-induced forgetting)
  4. Categorize — emergent categories form automatically from your knowledge
  5. Forget — Bjork dual-strength decay separates storage strength (how well-encoded) from retrieval strength (how easily found); weak memories fade, strong ones persist
  6. Crystallize — implicit preferences emerge from accumulated impressions (vasana), no LLM required

All data stays on your machine in ~/.alaya/memory.db.

Why Alaya

ProblemFile-based memoryAlaya
Token wasteFull-context injection (~35K tokens/msg)Ranked retrieval — only top-k relevant memories
No structureEverything in one fileThree typed stores: episodes, knowledge, preferences
No forgettingFiles grow until manually curatedBjork dual-strength decay + retrieval-induced forgetting
No associationsFlat files, no linksHebbian co-retrieval graph (LTP/LTD)
Brittle preferencesAgent-authored summary, driftsImplicit preferences emerge from impressions (vasana)
LLM requiredCan't function without oneGraceful degradation: no embeddings → BM25-only

Links

License

MIT

README image

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.