Skip to main content

Claude Code + Memanto

Claude Code Connect Claude Code to Memanto so it can store facts, decisions, and preferences and recall them across sessions, projects, and compactions. The recommended path is the official Memanto plugin for Claude Code. It bundles the Memanto skill, twelve slash commands, a memory-scout subagent, auto-sync hooks, and a status line, and installs from the plugin marketplace.

Quick Start

1

Install the plugin

Inside Claude Code:
Or from your terminal:
2

Install and configure the Memanto CLI

The plugin drives the memanto CLI, so it must be on your PATH:
Get a free API key at console.moorcheh.ai, or export it yourself with export MOORCHEH_API_KEY="...". You can also run on-prem with no key at all.
3

Create an agent for your project

4

Start Claude Code

On the first session, the SessionStart hook refreshes MEMORY.md and installs the status line.
Prefer to be guided? After installing the plugin, run /memanto:quickstart and Claude walks you through steps 2–4, then verifies the round trip with a test remember, recall, and answer.

Features

  • Memory on its own — the memanto skill loads automatically when you state a decision worth keeping or ask what was decided earlier, and it forbids answering “I don’t have context on that” without checking memory first.
  • Always-current MEMORY.md — synced when a session starts or resumes, and again before compaction, so context about to be summarized away is written to memory first.
  • Readable transcript — memory operations show up as plain English instead of raw shell commands.
  • Status line — shows the active agent, memory count, memories added this session, and sync freshness.
  • memory-scout subagent — gathers deep background from memory before substantial work.
  • Twelve slash commands — for when you want to drive memory explicitly.
Once installed, just talk to Claude:
“Remember that we decided to use React for the frontend” “What do you remember about our authentication approach?” “What are my pending commitments?” “That’s wrong — we switched to DynamoDB last month”

Architecture

The plugin is built entirely from Claude Code plugin primitives. It ships no MCP server; its only network access is the memanto CLI talking to Moorcheh under your own API key. Each Python hook is registered under both python and python3, because neither spelling exists on every platform. A lock file ensures only the first process produces output, so you never see a notice twice. The skill and every memory command declare allowed-tools: Bash(memanto:*), so they cannot run arbitrary shell commands on your behalf.

Transcript summaries

The PostToolUse hook turns memory operations into one-line summaries:
It stays silent on anything it cannot describe confidently, and never runs for non-Memanto commands.

Status line

It is added to ~/.claude/settings.json on the plugin’s first session, and only if you have no statusLine set — an existing status line is never overwritten. It degrades honestly rather than lying: not configured, no active agent, session expired, or stale 2d ago when MEMORY.md has drifted.

Commands

Memory Scout

memory-scout is a subagent for deep background. It runs several recalls at once — task terms, standing conventions, past decisions, known traps, open commitments, recent changes — and returns a short, sourced brief instead of a memory dump. It also surfaces contradictions rather than silently picking a winner. Ask for it by name, or let Claude delegate to it before a refactor:
“Use memory-scout to get background before we touch the auth module”

Configuration

The plugin has no config file of its own. Everything is controlled by the Memanto CLI and your Claude Code settings.

API key and backend

The CLI reads MOORCHEH_API_KEY from the environment or from ~/.memanto/.env (written by the memanto setup wizard). To run against a self-hosted backend, see On-Prem Configuration.

Per-project memory

Memory is scoped to the active agent. Create one agent per project and switch between them with:
Or from inside Claude Code, with /memanto:session. MEMORY.md is written into the project directory, so each repository keeps its own snapshot.

Status line

Optional: capture memory automatically at session end

/memanto:capture is deliberately manual, because storing memories costs API calls and writes data you may not want. If you would rather it happen on its own, add a Stop hook to your own settings — the plugin will not do this for you:

What the Plugin Touches

Everything happens on your machine — nothing is written outside your project, ~/.memanto, and ~/.claude unless you ask for it.

Local Development

To work on the plugin itself, load it from a checkout instead of the marketplace:

Alternative: Connect via CLI

If you’d rather not install a plugin, memanto connect writes a CLAUDE.md instruction file, the memanto-memory skill, and the same auto-sync hooks directly into your project:
Add --global to install to ~/.claude/ for every project:
Output:
Use the plugin or memanto connect claude-code, not both — they install the same hooks, so running both syncs MEMORY.md twice. If you’re moving to the plugin, run memanto connect remove claude-code first.

Alternative: Connect via MCP

Claude Code is an MCP client, so you can also register Memanto as an MCP server instead of using a plugin or skill file. See the MCP integration guide for the memanto-mcp server reference and config.

Troubleshooting

Run /plugin inside Claude Code and check that memanto is listed and enabled. If it isn’t, re-run /plugin marketplace add moorcheh-ai/claude-memanto and /plugin install memanto@moorcheh-ai, then restart Claude Code.
The SessionStart hook stays quiet when it can’t sync, rather than nagging you every session. Check each piece:
If memanto isn’t found, install it with pip install memanto and make sure it’s on the PATH Claude Code inherits. If there’s no active agent, run memanto agent create <project-name>.
The status line appears the next time Claude Code starts after it’s installed. If you already had a statusLine in ~/.claude/settings.json, the plugin leaves yours in place — run /memanto:statusline install to switch.
Run memanto status to check the session, then memanto agent activate <agent> (or /memanto:session) to start a fresh one.
Memory is per agent. Make sure the agent you’re recalling from is the one that stored the memories — memanto agent list shows every agent, and /memanto:status shows what is stored.

Requirements

  • Claude Code
  • Python 3.10+
  • A Moorcheh account and API key — or on-prem with no key

Next Steps