# TT-Wang/cortex-plugin [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/TT-Wang/cortex-plugin  
**GitHub Stars:** 33  
**Views:** 13  
**Installs:** 0  
**Upvotes:** 1  
**Directory Page:** https://allmcps.com/mcp/tt-wang-cortex-plugin

## Description
Persistent, self-evolving memory plugin for Claude Code. Background miner extracts durable lessons (decisions, conventions, bug fixes) from completed sessions via Claude Haiku, stores them as human-readable markdown in an Obsidian vault, and assembles query-tailored context briefings at session start. Local-first, no cloud, no API keys. Self-healing install via uv bootstrap shim, /cortex-doctor preflight, graceful FTS-only degraded mode when claude CLI missing. MIT.

## 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/TT-Wang/cortex-plugin), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to Claude Code:

```sh
claude plugin marketplace add TT-Wang/memem
```

2. Install:

```sh
claude plugin install memem@memem-marketplace
```

3. Install:

```sh
git clone https://github.com/TT-Wang/memem.git
```

4. Run:

```sh
cd memem
```

## Documentation

## What TT-Wang/cortex-plugin MCP server does

TT-Wang/cortex-plugin MCP server adds persistent memory to Claude Code. It records durable information from conversations rather than requiring the user to repeat the same project details in every session. Extracted material can include technical decisions, project conventions, bug fixes, and user preferences.

The repository is now described as memem in its README, while the listing retains the `TT-Wang/cortex-plugin` name. Its storage model is local: memories are written as readable Markdown files under an Obsidian vault, including the default `~/obsidian-brain/memem/memories/` location. This makes the stored information inspectable outside the agent runtime.

The project belongs in the 🧠 Knowledge & Memory category because its primary function is retaining and recalling project-specific information over time.

## How it works

A Stop hook starts a detached `mine_delta` process after conversation activity. The miner examines new conversation material and identifies candidates that may remain useful beyond the current session. The resulting memories are saved in the vault and can be ranked for later retrieval.

At session start, the plugin assembles query-relevant context. Its default runtime path is an Active Memory Slice, which provides a focused working state rather than injecting the entire vault. Retrieval uses a unified ranking engine combining cosine similarity, BM25, and FTS5. Current-session path context can also be derived automatically from the Claude transcript, allowing memories associated with recently accessed files to receive a path-based ranking bonus.

Transcript search uses a persistent FTS5 database at `~/.memem/transcript_fts.db`. The index stores question-and-answer turn pairs and is updated incrementally during mining. The system can fall back to bounded grep-based searching when the FTS index is unavailable.

## Setup and configuration

TT-Wang/cortex-plugin MCP server is intended for Claude Code and requires Python 3.11 or newer. Installation uses a self-healing `uv` bootstrap shim. The `/cortex-doctor` command provides a preflight check for the installation and runtime. The project also exposes a `--doctor` canary check for diagnostic use.

No cloud service or API key is required. The repository describes the design as local-first, with the vault and transcript index stored on the local machine. If the `claude` CLI is unavailable, the plugin can continue in an FTS-only degraded mode rather than relying on remote services.

Consult the repository’s current setup instructions before deploying it.

## Tools and capabilities

The MCP surface was reduced to six tools in v2.9.0.

- `active_memory_slice` returns session-relevant working memory and accepts optional path context.
- `transcript_search` searches indexed conversation turn pairs.
- `memory_save` stores a memory and can accept associated paths.
- Path-scoped retrieval uses memory `paths` frontmatter and automatically derived session paths.
- The miner can reconcile candidates as additions, updates, supersessions, or no-ops, with safeguards around destructive changes.
- Profiles, working rules, and an episodic title index organize different kinds of retained context.

Several older MCP tools, including `memory_recall`, `memory_graph`, `memory_list`, `memory_import`, `context_assemble`, and `memory_remind`, were removed from the MCP layer in v2.9.0, although corresponding CLI or library functionality may remain.

## Limitations and notes

Memory quality depends on the miner identifying useful information from completed sessions. The system also needs local access to its vault and transcript data.

The fallback search mode is bounded and may provide less capability than the persistent FTS5 path. Retrieval derivation failures are designed not to propagate: path extraction can return an empty list while logging at debug or warning level. The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/tt-wang-cortex-plugin/readme_

