maludb-claude
A Claude Code plugin that ships every session — prompts, decisions, and tagged notes — to your local maludb-desktop so MaluDB has the memory of how your project got built.

What it does
Four moving parts, working together:
-
Forces a topic question at session start. Before Claude does anything else, it asks "What are we working on?" — or, if there's a tag from a previous session, "Are we still working on <last tag>?". The answer becomes the classification tag stamped on every memory created during the session.
-
Logs the session to disk. Every Claude turn rewrites docs/claude-log/<date>_<short-id>.md (and .full.md) — the same format as preserve-the-evidence, with the session tag added to the header.
-
Ships the log to maludb-desktop. On every Stop event, the markdown is POSTed to http://127.0.0.1:7878/v1/sessions (idempotent upsert by session ID).
-
Provides MCP tools and slash commands for live memory.
/noteit <thought> — Claude acknowledges and (if warranted) follows up with a short paragraph, then saves the pair to MaluDB as a tagged note.
/maludb <question> — Claude calls MaluDB's recall API and answers the user with citations. Defaults to cross-project; prefix with in:<project> to scope.
Prerequisites
| Requirement | Why | How to check |
|---|
| Claude Code | This is a Claude Code plugin | claude --version |
| Node.js ≥ 16 | The hooks and the bundled MCP server run on node | node --version |
maludb-desktop | Receives the logs, notes, and recall queries | See its own README |
If maludb-desktop isn't running, the plugin still works — logs land on disk; HTTP POSTs fail quietly to stderr. Once the desktop is back up, the next Stop event ships the full log.
Installation
/plugin marketplace add maludb/maludb-claude
/plugin install maludb-claude
The plugin is active immediately — no restart needed. The SessionStart hook fires on the next session; /noteit and /maludb appear in your slash-command list.
Local development
git clone https://github.com/maludb/maludb-claude.git
claude --plugin-dir ./maludb-claude/maludb-claude
The outer dir is the marketplace; the inner maludb-claude/ is the plugin itself.
Configuration
Configuration sources, first match wins for each setting:
- Environment variables (per-session override)
<project>/.maludb/config.json (per-project persistent)
- Built-in defaults
| Setting | Env var | Config file key | Default |
|---|
| Base URL | MALUDB_BASE_URL | base_url | http://127.0.0.1:7878 |
| Bearer token | MALUDB_TOKEN | token | (none) |
| Disable HTTP ship | MALUDB_SHIP=0 | disabled: true | enabled |
| Log mode | CLAUDE_LOG_MODE | .claude/log-mode | both |
Example <project>/.maludb/config.json:
{
"base_url": "http://127.0.0.1:7878",
"token": null,
"disabled": false
}
Local state (per-project)
The plugin keeps two files inside your project:
<project>/
├── .maludb/
│ ├── last-tag.json ← session tag, used for the "still working on?" prompt
│ └── config.json (optional)
└── docs/claude-log/
├── 2026-05-21_a1b2c3d4.md
└── 2026-05-21_a1b2c3d4.full.md
.maludb/ is project-local. Delete last-tag.json to force a fresh "what are we working on?" prompt on the next session.
MCP tools
The bundled MCP server (scripts/mcp-server.js) exposes three tools:
| Tool | Purpose |
|---|
maludb_set_session_tag | Persist the session tag locally and notify the desktop. Called from the SessionStart instruction. |
maludb_save_note | Save a tagged memory. Called from /noteit and /maludb. |
maludb_recall | Search MaluDB memories, cross-project by default. Called from /maludb. |