# feedback-memory [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/ssap-pa/self-learning-agent-setup  
**GitHub Stars:** 1  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/feedback-memory

## Description
Remembers why you approved, edited or rejected your agent's drafts; recalls the closest corrections

## Tools
Capabilities this server exposes over MCP:

- **recall_corrections** — Call this BEFORE you draft anything the user will review (posts, replies, emails, docs, commit messages, UI copy, code in a style they care about). Returns the user's standing rules and their past approve / edit / reject decisions on similar tasks, most similar first. Follow them.
- **record_decision** — Call this right AFTER the user approves, edits or rejects something you drafted. Pass the user's reason in one line when they give one: the reason is what makes the next draft better. For an edit, pass the final text the user wanted.
- **add_rule** — When the user states a preference that should ALWAYS apply ("never use exclamation marks", "prices only from the database"), save it as a rule. Rules come back first in every recall_corrections.
- **list_memory** — Show the active rules, the most recent decisions with their ids, and how many approve / edit / reject decisions were stored in the last 7 days. Use it when the user asks what you remember, or to check that decisions are actually being stored.
- **forget** — Delete one rule or one stored decision by id (ids come from list_memory). Use when the user says a rule or a past correction no longer applies.

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

```json
"mcpServers": {
  "feedback-memory": {
    "command": "npx",
    "args": ["-y","github:ssap-pa/self-learning-agent-setup"],
    "env": {
      "OPENAI_API_KEY": "",
      "FEEDBACK_MEMORY_DIR": ""
    }
  }
}
```

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

## Documentation

## What feedback-memory does

feedback-memory records how a user responds to agent-generated work and makes that history available during later drafts. Approvals, edits, and rejections can be stored with the situation and the reason behind the decision. A final edited version can also be saved so future responses can follow the wording the user chose.

Standing preferences are stored separately as rules. These are intended for instructions that should apply broadly, such as avoiding exclamation marks or using database values for prices. Rules are returned before situation-specific corrections.

The server is suited to agents that produce material for review, including posts, replies, emails, documentation, commit messages, and style-sensitive code.

## How it works

Before drafting, the agent sends the task to `recall_corrections`. The server returns active rules and the most similar past decisions, ordered from the closest match onward. After the user approves, edits, or rejects the result, the agent calls `record_decision` to preserve the outcome and any stated reason.

Feedback is searched by embedding similarity rather than only exact keywords. The default offline mode hashes words and applies light stemming, so related forms such as “shipping” and “ship” can match when they share usable terms. An optional OpenAI embedding mode uses `text-embedding-3-small` instead.

The repository also contains a Postgres schema with tables for runs, feedback, and rules, plus a similarity-search function using pgvector. The included demo can run with PGlite or `pg` and shows the feedback loop across multiple days of example decisions.

## Setup and configuration

For Claude Code, install the plugin with:

```text
/plugin marketplace add https://github.com/ssap-pa/self-learning-agent-setup.git
/plugin install feedback-memory@ssap-pa
```

The MCP server can also be added directly with `claude mcp add`, or configured through the `mcpServers` JSON format used by Cursor and Claude Desktop. Claude Desktop also has a downloadable `.mcpb` bundle.

The direct server command uses `npx -y github:ssap-pa/self-learning-agent-setup`. Its local database is kept under `~/.feedback-memory`. Set `FEEDBACK_MEMORY_DIR` when separate running clients need separate database folders. Set `OPENAI_API_KEY` to enable OpenAI embeddings; leaving it unset uses the offline embedding implementation.

Add workflow instructions to the agent, such as calling `recall_corrections` before reviewable drafts and `record_decision` after an approval, edit, or rejection. Avoid installing the plugin and a separate MCP instance for the same client, because both use the same local memory directory by default.

## Tools and capabilities

- `recall_corrections`: Retrieves standing rules and similar past decisions for a proposed task.
- `record_decision`: Stores an approval, edit, or rejection, including a reason or the final edited text.
- `add_rule`: Saves a preference intended to apply in every relevant recall.
- `list_memory`: Displays active rules, recent decision IDs, and seven-day approval, edit, and rejection counts.
- `forget`: Removes one rule or stored decision by its ID.

## Limitations and notes

The server stores memory locally, so each client normally uses its own database folder unless configured otherwise. Offline matching is based on hashed words and light stemming; corrections expressed with no meaningful overlap may not be retrieved as reliably as they are with OpenAI embeddings.

The agent must call the relevant tools, or use the provided Claude Code hooks and plugin behavior, for feedback to affect later work. The repository’s broader pattern also distinguishes durable rules from situation-specific memories: a recurring correction can inform a proposed rule, but stored feedback is not automatically described as an active rule. The demo uses in-memory PGlite and does not require a database or API key.

_Full upstream README: https://allmcps.com/mcp/feedback-memory/readme_

