# Mnemo Plugin

> Universal memory plugin for OpenCode and Claude Code - bridges to mnemo-mcp via MCP protocol

- **Type:** MCP server
- **Install:** `agentstack add mcp-n24q02m-mnemo-plugin`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [n24q02m](https://agentstack.voostack.com/s/n24q02m)
- **Installs:** 0
- **Category:** [Integrations](https://agentstack.voostack.com/c/integrations)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [n24q02m](https://github.com/n24q02m)
- **Source:** https://github.com/n24q02m/mnemo-plugin
- **Website:** https://www.npmjs.com/package/@n24q02m/mnemo-plugin

## Install

```sh
agentstack add mcp-n24q02m-mnemo-plugin
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# [ARCHIVED] Mnemo Plugin

> **This repository has been archived.** The functionality of this plugin has been fully absorbed by [mnemo-mcp](https://github.com/n24q02m/mnemo-mcp). Use `mnemo-mcp` directly as your MCP server — no plugin layer needed.

---

**Universal memory plugin for OpenCode and Claude Code -- powered by mnemo-mcp**

[](https://github.com/n24q02m/mnemo-plugin/actions/workflows/ci.yml)
[](https://codecov.io/gh/n24q02m/mnemo-plugin)
[](https://www.npmjs.com/package/@n24q02m/mnemo-plugin)
[](LICENSE)

[](#)
[](#)
[](#)
[](https://github.com/python-semantic-release/python-semantic-release)
[](https://developer.mend.io/)

## Migration

Use [mnemo-mcp](https://github.com/n24q02m/mnemo-mcp) directly:

```jsonc
{
  "mcpServers": {
    "mnemo": {
      "command": "uvx",
      "args": ["mnemo-mcp@latest"]
    }
  }
}
```

## Features

- **Persistent Memory** -- Facts survive across sessions, restarts, and context compaction
- **Automatic Capture** -- Detects user preferences and constraints from chat (always/never/must/prefer patterns)
- **Adaptive Context Injection** -- Smart budget system scales memory injection to model context window
- **Project-Scoped** -- Memories auto-tagged with project name for relevant recall
- **Dual Platform** -- Works with both OpenCode and Claude Code

## Architecture

Full memory support requires **both** the plugin and the MCP server working together:

| Component | Role | Behavior |
|-----------|------|----------|
| **Plugin** (this package) | Proactive | Hooks: inject memories into system prompt, auto-capture constraints, preserve context on compaction |
| **MCP Server** ([mnemo-mcp](https://github.com/n24q02m/mnemo-mcp)) | Reactive | Tools: AI calls search/remember/forget when it decides to |

```
AI Coding Assistant
  |
  +-- mnemo-plugin (TypeScript) ........... hooks (proactive)
  |     |
  |     +-- bridge -> mnemo-mcp subprocess
  |
  +-- mnemo-mcp (Python, standalone) ..... tools (reactive)
        |-- SQLite FTS5 (keyword search)
        |-- Qwen3 embeddings (semantic search)
        |-- rclone sync (backup)
```

## Prerequisites

- [Node.js](https://nodejs.org/) >= 24
- [uv](https://docs.astral.sh/uv/) (for running mnemo-mcp via `uvx`)

## Installation

Both plugin **and** MCP server are required for full functionality.

### OpenCode

Add **both** to your `opencode.json`:

```json
{
  "plugin": ["@n24q02m/mnemo-plugin@latest"],
  "mcp": {
    "mnemo": {
      "type": "local",
      "command": ["uvx", "--python", "3.13", "mnemo-mcp@latest"],
      "environment": {
        "LOG_LEVEL": "WARNING"
      },
      "enabled": true
    }
  }
}
```

- **Plugin** provides hooks (system-prompt injection, auto-capture, compaction)
- **MCP server** provides tools (mnemo_memory_add, search, delete, etc.)

Restart OpenCode after configuration.

### Claude Code

The plugin bundles both MCP server and hooks in one install:

```
/plugin marketplace add n24q02m/mnemo-plugin
/plugin install mnemo-plugin@n24q02m
```

Restart Claude Code. The plugin automatically registers:
- MCP server (`uvx mnemo-mcp`) for memory tools
- SessionStart hook for health check

## Tools (via MCP server)

The MCP server provides three mega-tools. See [mnemo-mcp](https://github.com/n24q02m/mnemo-mcp) for full documentation.

| Tool | Actions | Description |
|------|---------|-------------|
| `memory` | add, search, list, update, delete, export, import, stats | Persistent memory CRUD and management |
| `config` | status, sync, set | Server configuration and cloud sync |
| `help` | -- | Full documentation for all tools |

## Hooks (via plugin)

| Hook | Trigger | Description |
|------|---------|-------------|
| `system-prompt` | Session start | Injects relevant memories into system prompt with adaptive budget |
| `auto-capture` | Session idle | Buffers chat messages and extracts constraints automatically |
| `compaction` | Context compaction | Preserves memory context during session compaction |

## Development

```bash
# Setup
mise run setup

# Development
bun run dev

# Quality checks
bun run check        # biome + tsc
bun run test          # vitest
bun run build         # tsc + cli bundle

# Shortcuts
mise run lint
mise run test
mise run fix
```

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

## License

MIT - See [LICENSE](LICENSE)

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [n24q02m](https://github.com/n24q02m)
- **Source:** [n24q02m/mnemo-plugin](https://github.com/n24q02m/mnemo-plugin)
- **License:** MIT
- **Homepage:** https://www.npmjs.com/package/@n24q02m/mnemo-plugin

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** yes
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-n24q02m-mnemo-plugin
- Seller: https://agentstack.voostack.com/s/n24q02m
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
