Skip to main content
MCP server CX Codex

alaya-mcp — Claude Code MCP server: what it does, how to install

Local memory engine for AI coding agents that builds a knowledge graph in SQLite and prunes stale memories using cognitive decay.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env ALAYA_LLM_API_KEY=<ALAYA_LLM_API_KEY> --env ALAYA_LLM_API_URL=<ALAYA_LLM_API_URL> --env ALAYA_LLM_MODEL=<ALAYA_LLM_MODEL> --env ALAYA_DB=<ALAYA_DB> --transport stdio alaya-mcp -- npx -y alaya-mcp
Open on GitHub

What alaya-mcp does

alaya-mcp runs an embeddable Rust memory core inside a local SQLite file at ~/.alaya/memory.db. It captures conversation episodes and maps extracted entities into an associative graph.

Memory handling mimics biological principles. Retrieved items form stronger associations through Hebbian rules, while unaccessed entries decay under Bjork dual-strength logic. The tool exposes operations like remember, recall, and neighbors.

External LLM credentials remain optional. When vector embeddings are missing, the engine falls back to BM25 search and lets the agent handle extraction.

What it helps with

  • retrieve relevant past facts without sending full conversation transcripts
  • organize assistant context into an associative SQLite graph
  • prune stale details automatically with dual-strength decay
  • inspect relationships between concepts using neighbors

Example prompts for the agent

  • Recall our previous decisions regarding authentication architecture via alaya.
  • Save this discussion into alaya and update concept links.
  • Run the alaya lifecycle routine to maintain memory weights.

How to install alaya-mcp

Platform CLI

claude mcp add --env ALAYA_LLM_API_KEY=<ALAYA_LLM_API_KEY> --env ALAYA_LLM_API_URL=<ALAYA_LLM_API_URL> --env ALAYA_LLM_MODEL=<ALAYA_LLM_MODEL> --env ALAYA_DB=<ALAYA_DB> --transport stdio alaya-mcp -- npx -y alaya-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about alaya-mcp

How to install alaya-mcp in Claude Code?

Run this command in your terminal: claude mcp add alaya-mcp -e ALAYA_LLM_API_KEY=<ALAYA_LLM_API_KEY> -- npx -y alaya-mcp. Replace <ALAYA_LLM_API_KEY> with your secret key.

What does alaya-mcp do?

It provides a structured local memory store for assistants. Conversations turn into graph entities with cognitive forgetting rather than flat files.

Are ALAYA_LLM environment variables required?

Those parameters are optional. Without external endpoints, the server runs BM25 text retrieval and relies on the client agent for fact extraction.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor