StackMemory

Lossless, project-scoped memory for AI coding tools.

StackMemory preserves full project context across sessions. Instead of a linear chat log, it organizes memory as a call stack of scoped work with intelligent retrieval.

npm install -g @stackmemoryai/stackmemory
npm version Tests Coverage
StackMemory setup demo

Why StackMemory

Memory is storage. Context is a compiled view.

Context survives sessions

Decisions, constraints, and progress persist across /clear operations and session restarts.

Call-stack organization

Nested frames with importance scoring. Only the active path is "hot" — the rest stays accessible but quiet.

Zero-config

stackmemory init just works. No database setup, no cloud account, no configuration files.

Features

56 MCP Tools

Context, tasks, Linear, traces, discovery, cord, team, planning, providers, DiffMem, Greptile, and more for Claude Code integration.

FTS5 Search

Full-text search with BM25 scoring, hybrid retrieval, and smart thresholds. Finds what matters.

Linear Integration

Bidirectional sync with API key and OAuth support. Tasks flow between Linear and your coding session.

Automatic Hooks

Context save, task tracking, Linear sync, and PROMPT_PLAN progress — all automatic, non-blocking.

Wrapper Scripts

claude-sm, codex-sm, opencode-sm — launch your tool with context pre-loaded.

Skills System

/spec for iterative specs, /linear-run for task execution via RLM orchestration.

Quick Start

Requires Node ≥ 20

# Install globally
npm install -g @stackmemoryai/stackmemory

# Initialize in your project
cd your-project
stackmemory init

# Configure Claude Code integration
stackmemory setup-mcp

# Verify everything works
stackmemory doctor

Restart Claude Code and StackMemory MCP tools will be available.

Core Concepts

Concept Meaning
Frame A scoped unit of work, like a function call. Can span multiple turns and sessions.
Call Stack Nested frames. Only the active path is "hot" — the rest stays accessible.
Event Append-only record: message, tool call, or decision.
Digest Structured return value when a frame closes.
Anchor Pinned fact — DECISION, CONSTRAINT, or INTERFACE.

Integrations

Claude Code Codex OpenCode Linear MCP Protocol Browser MCP

Runs as an MCP server. Editors call StackMemory on each interaction to fetch a compiled context bundle — editors don't store memory themselves.

Who is this for

Solo dev using Claude Code

Keep decisions, constraints, and progress across sessions.

Team using AI coding tools

Share project context across agents and teammates.

AI-first startup

Ship faster with persistent memory and automatic Linear sync.

Open-source maintainer

Onboard contributors and AI agents with durable project knowledge.