# tempera [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/anvanster/tempera  
**GitHub Stars:** 6  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/tempera

## Description
Persistent episodic memory for AI coding: capture, retrieve, brief, dream cycle, cross-project.

## Tools
Capabilities this server exposes over MCP:

- **tempera_session_start** — Call ONCE at the very start. Returns any clarifying question tempera drafted after a previous failed/partial session in this project.
- **tempera_brief** — Call once the file set is known. Joins pending ask-back, reasoning template, top correction categories for these files, should-have-asked triggers, and calibration warning into one response. Pass `task_type` + `domain` for richer output. Set `cross_project=true` to supplement with rows from other p…
- **tempera_retrieve** — Search for similar past episodes. Set `scope="cross-project"` to include transferable claims from other projects.
- **tempera_template** — Pull the reasoning template stored for a `(task_type, domain)` pair. The step sequence past wins followed.
- **tempera_log_correction** — When the user corrects an assumption / decision / piece of code. Categorized log; the brief surface uses it.
- **tempera_log_should_have_asked** — When you realize mid-task you should have asked a question up front. Records the trigger context, the question, and the eventual answer.
- **tempera_capture** — Save session as an episode. Auto-detects session links and runs propagation. The intent-extraction LLM call also suggests a `ValidityScope` for cross-project routing.
- **tempera_feedback** — Mark retrieved episodes as helpful or not. Drives the utility-learning loop.
- **tempera_status** — Per-project memory health snapshot.
- **tempera_stats** — Statistics + trend analytics (helpfulness over time, domain growth, learning curve).
- **tempera_propagate** — Multi-hop Bellman propagation with convergence tracking. Periodic maintenance.
- **tempera_review** — Consolidate similar BKMs, cleanup. Run after related task series.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/anvanster/tempera), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
cargo install tempera
```

2. Configure:

```sh
tempera init
```

3. Add to Claude Code:

```sh
claude mcp add tempera --scope user -- /path/to/Tempera/target/release/tempera-mcp
```

## Documentation

## What the tempera MCP server does

The tempera MCP server gives coding agents a persistent episodic memory instead of treating every session as isolated. It stores completed sessions as episodes, indexes them for semantic search, and uses retrieval feedback to influence which memories are more useful later. The system is designed around coding work, including the files, task types, domains, corrections, failed assumptions, and successful reasoning patterns associated with previous sessions.

The tempera MCP server also maintains project-level memory health and learning statistics. It can track whether remembered claims are untested, tested, merged, or stable without reversion. Claims can have different validity scopes, allowing project-specific knowledge to decay sooner than broader language, crate, domain, or universal knowledge. Cross-project retrieval is available for transferable claims; project-scoped knowledge remains tied to its original codebase.

## How it works

A typical workflow begins with `tempera_session_start`, called once at the beginning of a task. This can return a clarifying question drafted after an earlier failed or incomplete session. Once the files are known, `tempera_brief` combines relevant preparation into one response, including pending questions, a matching reasoning template, correction categories for the files, missed-question triggers, and a calibration warning. `tempera_retrieve` searches for similar episodes, while `tempera_template` returns a stored step sequence for a task type and domain.

After the work is complete, `tempera_capture` saves the session as an episode and can detect session links for multi-step work. `tempera_feedback` records whether retrieved memories were helpful. That feedback affects utility scores and can propagate value through related episodes. A dream cycle can perform verification updates, decay, reflection, pattern detection, contradiction probing, and template extraction, while review consolidates related reusable knowledge.

## Setup and configuration

Build the Rust project from source with `cargo build --release`, which produces the `tempera` CLI and `tempera-mcp` MCP executable. The package can also be installed with `cargo install tempera`. On first use, initialization downloads the BGE-Small embedding model, approximately 128 MB, for semantic search. The model is cached at `~/.tempera/models/` and shared between projects.

For Claude Code, add the compiled MCP executable with its MCP command and restart Claude Code. Running `/mcp` verifies that the connection exposes the server's tools. The tempera MCP server uses the local embedding model for search; the provided setup material does not specify additional environment variables or required external services.

## Tools and capabilities

The available MCP tools cover these operations:

- Start sessions, assemble briefs, retrieve episodes, and load reasoning templates.
- Record corrections and situations where a question should have been asked earlier.
- Capture completed sessions, submit helpfulness feedback, and inspect status or statistics.
- Run propagation and review maintenance operations.
- Request cross-project context through retrieval or briefing options.
- Support calibration, validity scopes, decay, verification states, and generated ask-back questions.

Use `task_type` and `domain` with briefing or template-oriented workflows when that context is available. Cross-project behavior is opt-in, and legacy captures default to non-transferable until they are reclassified.

_Full upstream README: https://allmcps.com/mcp/tempera/readme_

