# SecurityRonin/alaya [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/SecurityRonin/alaya  
**GitHub Stars:** 20  
**npm Downloads (last month):** 336  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/securityronin-alaya

## Description
Neuroscience-inspired memory engine for AI agents. Stores episodes, consolidates knowledge through a Bjork-strength lifecycle (strengthening, transformation, forgetting), and builds a personal knowledge graph with emergent categories, preferences, and semantic recall. Local SQLite, zero config, 10 MCP tools. Install via npx alaya-mcp.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "alaya": {
    "command": "npx",
    "args": ["-y","alaya-mcp"],
    "env": {
      "ALAYA_DB": "",
      "ALAYA_LLM_API_KEY": "",
      "ALAYA_LLM_API_URL": "",
      "ALAYA_LLM_MODEL": ""
    }
  }
}
```

**Requires environment variables:** `ALAYA_DB`, `ALAYA_LLM_API_KEY`, `ALAYA_LLM_API_URL`, `ALAYA_LLM_MODEL` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What SecurityRonin/alaya MCP server does

SecurityRonin/alaya MCP server adds persistent memory to MCP-compatible agents through a local SQLite database. It separates raw conversation episodes from distilled knowledge and learned preferences, allowing an agent to save interactions and retrieve relevant information later instead of injecting an ever-growing text file into every prompt.

The server also maintains relationships between memory nodes. Repeated retrieval can shape those relationships, while lifecycle operations can reduce duplication, weaken stale or competing memories, and identify emergent categories. Data remains in one SQLite file, with no external service required for the basic setup.

## How it works

An agent records messages with `remember`, searches stored material with `recall`, and can submit extracted facts through `learn`. Retrieval combines search methods and can apply category information. The `status`, `knowledge`, and `preferences` tools expose the current state of the memory store, including episode counts, distilled facts, categories, graph links, and preference impressions.

Memory maintenance is explicit through the `maintain` tool. The underlying lifecycle can consolidate episodes into knowledge, transform or deduplicate records, and forget stale material. Graph-oriented tools expose neighboring nodes and category membership, supporting indirect associations rather than only direct text matches.

LLM assistance is optional. Without an LLM configuration, the server can accumulate episodes and operate in prompt mode, reminding the agent to call `learn` after 10 episodes. With the `llm` feature and the relevant environment variables, it can use an OpenAI-compatible chat-completions endpoint for automatic consolidation. Retrieval can also degrade to BM25 when embeddings are unavailable.

## Setup and configuration

SecurityRonin/alaya MCP server can be installed through npm without a Rust toolchain:

```json
{
  "mcpServers": {
    "alaya": {
      "command": "npx",
      "args": ["-y", "alaya-mcp"]
    }
  }
}
```

The default database path is `~/.alaya/memory.db`. Set `ALAYA_DB` to use another SQLite file. Optional automatic consolidation uses `ALAYA_LLM_API_KEY`, `ALAYA_LLM_API_URL`, and `ALAYA_LLM_MODEL`; the documented defaults target an OpenAI-compatible endpoint and `gpt-4o-mini`.

Building from source requires Rust and the MCP feature.

## Tools and capabilities

The MCP interface provides tools for:

- Storing and recalling conversation episodes
- Teaching extracted knowledge and reading distilled facts
- Inspecting memory statistics and learned preferences
- Running cleanup, decay, and deduplication
- Deleting data by session, age, or complete database scope
- Listing emergent categories and checking node membership
- Traversing graph neighbors through spreading activation
- Importing data from claude-mem databases and Claude Code JSONL history

## Limitations and notes

SecurityRonin/alaya MCP server is local and SQLite-based, so the documented deployment does not provide a hosted or shared memory service. Automatic consolidation depends on the optional LLM feature and compatible API configuration; without those settings, the agent must supply extracted knowledge or follow the prompt-mode reminder.

_Full upstream README: https://allmcps.com/mcp/securityronin-alaya/readme_

