Skip to main content

CLAUDE.md + MemClaw: The Complete Context Stack for Claude Code

· 4 min read

CLAUDE.md and MemClaw work together to give Claude Code complete project context. This guide explains how to use both effectively — static context in CLAUDE.md, dynamic context in MemClaw.

CLAUDE.md + MemClaw: The Complete Context Stack for Claude Code

Claude Code has two built-in mechanisms for project context: CLAUDE.md and MCP tools. Used together, they give Claude everything it needs to be genuinely useful on your project.

Complete your context stack with MemClaw → memclaw.me


The Two Layers of Context

Layer 1: CLAUDE.md (Static Context)

CLAUDE.md is a Markdown file in your project root. Claude reads it automatically at every session start. It's your project brief — the stable context that doesn't change often.

What goes in CLAUDE.md:

  • Tech stack and versions
  • Architecture rules and conventions
  • What NOT to do (rejected approaches)
  • Key file locations

Characteristics:

  • Static — you update it manually
  • Always loaded — every session, every time
  • Version controlled — part of your repo
  • Shared automatically — everyone who clones the repo gets it

Layer 2: MemClaw (Dynamic Context)

MemClaw is a persistent workspace that grows over time. It stores context that changes — session history, evolving decisions, sprint goals.

What goes in MemClaw:

  • Session history (what was built, when)
  • Decision log (what was decided and why)
  • Current sprint goals (updated each sprint)
  • Known issues (updated as they're resolved)

Characteristics:

  • Dynamic — grows automatically via /end command
  • Loaded on demand — Claude queries it at session start
  • Not version controlled — stored in MemClaw's cloud
  • Shareable — team members can share a workspace

How They Work Together

Session Start

Claude reads CLAUDE.md
↓ (stable context: tech stack, architecture rules)
Claude queries MemClaw workspace
↓ (dynamic context: session history, decisions, sprint goals)
Claude has complete project context

Productive session

/end command

Claude writes session summary to MemClaw

Context grows for next session

Setting Up the Complete Stack

CLAUDE.md

# Project Name

## Tech Stack
- Next.js 14 App Router, TypeScript, PostgreSQL 16
- Deployed on Railway; staging: staging.example.com

## Architecture Rules
- All DB access via Repository Pattern (/lib/repositories/)
- JWT auth, token in httpOnly cookie — never localStorage
- No GraphQL — REST only
- Error boundaries at route level, not component level

## Key Locations
- DB repositories: /lib/repositories/
- API routes: /src/app/api/
- Components: /src/components/
- Types: /src/types/

## DO NOT
- Direct DB queries in route handlers
- JWT in localStorage
- Business logic in React components

MemClaw Workspace

## Current Sprint (Sprint 8, ends 2026-04-04)
- Complete checkout flow (P0)
- Fix Stripe webhook duplicate trigger (P0)

## Decision Log
2026-02-15: Rejected GraphQL — team familiarity, simpler debugging
2026-03-01: Chose Prisma over raw SQL — type safety, migrations

## Known Issues
- Stripe webhook fires twice — check idempotency key
- Redis pool: max 10 connections in dev

## Session History
2026-03-30: Implemented cart calculation, started Stripe integration
2026-03-31: Fixed webhook idempotency, started order confirmation emails

MCP Config

{
"mcpServers": {
"memclaw": {
"command": "npx",
"args": ["-y", "@memclaw/mcp-server"],
"env": {
"MEMCLAW_API_KEY": "your_key",
"MEMCLAW_WORKSPACE_ID": "your_workspace_id"
}
}
}
}

What Each Layer Handles

Context TypeCLAUDE.mdMemClaw
Tech stack
Architecture rules
Current sprint goals
Session history
Decision log
Known issuesBothBoth
Team sharingVia gitVia workspace

Getting Started

  1. Create CLAUDE.md in your project root
  2. Create a workspace at memclaw.me
  3. Configure MCP in .claude/mcp_config.json
  4. Create /start and /end slash commands
  5. Run your first complete-stack session

Complete your context stack with MemClaw → memclaw.me


Written by the Felo Team. We have a business relationship with MemClaw — read our disclosure policy.