Skip to content

Developer workflow

Claude Code Memory: CLAUDE.md, /memory, and MCP Context

Understand CLAUDE.md, Claude Code auto memory, /memory, and when to add Wenlan's local MCP memory for shared project context.

Qi-Xuan LuUpdated 7 min read

Article packet

01

Workflows

02

Developers using Claude Code, Cursor, and other AI coding agents

03

7 min read

01

Use CLAUDE.md for stable project instructions and auto memory for assistant-learned corrections and preferences.

02

Use /memory to inspect and edit native memory before adding another memory layer.

03

Add Wenlan when work context must be source-backed, reviewable, and shared with Cursor, Codex, and other MCP clients.

01

Quick answer

Start with Claude Code's native memory. Use CLAUDE.md for instructions you maintain, auto memory for learnings Claude saves, and /memory to inspect or edit both surfaces.

Auto memory is per repository and shared across worktrees. Claude Code loads the first 200 lines or 25 KB of its MEMORY.md entrypoint, whichever comes first, at the start of each conversation.

Add Wenlan only when the problem extends beyond native memory: evolving work context needs provenance, review, handoff, or access from Cursor, Codex, and other MCP-compatible tools.

  • Put stable rules, commands, and project architecture in CLAUDE.md.
  • Use Claude Code auto memory for repeated corrections and preferences Claude discovers.
  • Use Wenlan for source-backed decisions, gotchas, handoffs, wiki pages, and shared MCP memory.

02

How Claude Code memory works

Each Claude Code session starts with a fresh context window. Claude Code carries knowledge forward through CLAUDE.md files and auto memory, and both are loaded into new conversations as context.

Auto memory is machine-local. Worktrees and subdirectories in the same Git repository share one auto memory directory, while separate repositories do not.

Only the first 200 lines or 25 KB of auto memory's MEMORY.md loads at session start. Keep that index concise; detailed topic files can be read on demand.

03

Use CLAUDE.md for stable instructions

CLAUDE.md is excellent for project-level instructions: build commands, test commands, architecture notes, coding standards, and long-lived conventions the whole team should share.

It should not become a dumping ground for every transient observation from every coding session. When the file gets too large or contradictory, Claude has more context to scan and less room for the current task.

04

Use native memory before another layer

If Claude Code seems to forget something, run /memory first. It lists memory locations, opens files for review, and lets you inspect or toggle auto memory.

Use /context to verify which CLAUDE.md files loaded. The problem may be a missing file, the wrong scope, conflicting instructions, or an oversized memory index rather than a need for another tool.

05

When Wenlan adds value

Use Wenlan when project context needs provenance, review, deletion, handoff, distillation, and access from more than one MCP-compatible tool.

Useful Wenlan captures are specific and grounded: why a decision was made, what tradeoffs were considered, what command verifies a change, which module owns a behavior, or what gotcha should not be rediscovered next week.

Turn Claude Code memory into an LLM wiki

06

Install path for Claude Code

The Claude Code plugin is the most complete Wenlan path because it adds /setup, /brief, /capture, /recall, /handoff, /distill, and review workflows around the local daemon and MCP connector.

After installing, restart Claude Code if prompted, run /setup once, then verify a harmless capture and recall before relying on Wenlan for real project memory.

Claude Code plugin

/plugin marketplace add 7xuanlu/wenlan
/plugin install wenlan@7xuanlu-wenlan
/setup
/capture This project uses Wenlan for local AI work memory.
/recall local AI work memory

07

Share memory with Cursor and Codex

Wenlan exposes memory through its MCP server. Claude Code can write what it learns and recall relevant project context later. The same work context can also be available to Cursor, Codex, Claude Desktop, Gemini CLI, and other MCP clients when configured.

That makes Wenlan a shared local layer for AI-assisted development rather than a single-client note file.

Verify Claude Code memory locally

Install the Wenlan plugin, run /setup, then test one capture and recall before adding real project context.

FAQ

Should Claude Code memory replace CLAUDE.md?+
No. CLAUDE.md is best for stable project instructions. Wenlan is best for evolving memory across sessions, tools, and projects.
Can Cursor use the same memory?+
Yes. Wenlan is MCP-native, so multiple compatible tools can connect to the same local daemon and source-backed wiki when configured.