# @stackmemoryai/stackmemory [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/stackmemoryai/stackmemory  
**GitHub Stars:** 2  
**npm Downloads (last month):** 1039  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/stackmemoryai-stackmemory

## Description
Lossless, project-scoped memory for AI coding tools. Durable context across sessions with MCP tools, FTS5 search, cloud sync, trace optimization, Claude/Codex/OpenCode/Gemini wrappers, skill packs, and automatic hooks.

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

```json
"mcpServers": {
  "stackmemory": {
    "command": "npx",
    "args": ["-y","croissant-ai"]
  }
}
```

## Documentation

## What @stackmemoryai/stackmemory does

@stackmemoryai/stackmemory gives AI coding tools durable, project-scoped context instead of relying on a single chat history. It records events, tool calls, decisions, constraints, and other project facts, then organizes them into nested frames representing scoped work. Active frames form a call-stack-like structure, while anchors preserve important facts such as decisions, interfaces, and constraints.

The server exposes MCP tools for context retrieval, task management, planning, traces, discovery, team coordination, providers, and Linear workflows. It is primarily integrated with Claude Code, but also includes wrappers for Codex and OpenCode that preload StackMemory context. Claude Code command packs and skills add session lifecycle commands, specification generation, and task execution workflows.

## How it works

Editors call StackMemory through MCP during an interaction. The editor remains responsible for the coding session, while StackMemory stores project memory and returns a compiled context bundle for the active work. Frames can continue across chat turns, tool calls, and separate sessions, and persisted context remains available after a `/clear` operation.

Retrieval uses FTS5 full-text search with BM25 scoring, hybrid retrieval, and relevance thresholds. Automatic hooks can save context, track tasks, synchronize Linear work, update prompt plans, and record cord traces. Snapshot capture records post-run changes, commits, and decisions for session handoff. The pre-flight command checks for likely file overlap before parallel task dispatch.

## Setup and configuration

StackMemory requires Node.js 20 or newer. Install the package globally, initialize it from the target project, configure the MCP connection, and run the diagnostic command:

```bash
npm install -g @stackmemoryai/stackmemory
cd your-project
stackmemory init
stackmemory setup-mcp
stackmemory doctor
```

After restarting Claude Code, its StackMemory MCP tools become available. The command-pack installer can add session commands to `~/.claude/commands/`; it supports listing packs, previewing changes, reinstalling, and removing installed commands.

Linear support accepts either an API key or OAuth. The package also ships with the `claude-sm`, `codex-sm`, and `opencode-sm` wrappers, plus variants that launch Claude Code with permissions bypassed.

## Tools and capabilities

- Persistent project context using frames, anchors, decisions, events, and retrieval.
- FTS5 search with BM25 ranking and hybrid retrieval.
- MCP tools covering context, tasks, Linear, traces, planning, discovery, cord, team, and related workflows.
- Claude Code skills for progressive specification generation and Linear-backed task execution.
- Hooks for context saving, task tracking, Linear synchronization, prompt-plan updates, and trace capture.
- Snapshot and pre-flight commands for handoffs and parallel-work conflict checks.
- Conductor orchestration that polls Linear, creates worktrees, and starts agents with bounded concurrency and automatic team detection.
- Loop/watch polling for CI, deployment, log, or other shell-command conditions.
- Memory monitoring and periodic auto-save services.
- Integrations with Linear, DiffMem, Browser MCP, and log-mcp.

## Limitations and notes

The initial project model is one GitHub repository. Claude Code receives the deepest workflow integration through its command packs, skills, and hooks. StackMemory also provides wrappers for Codex and OpenCode, while the MCP interface is used by editors to request context rather than storing that memory inside the editor itself.

_Full upstream README: https://allmcps.com/mcp/stackmemoryai-stackmemory/readme_

