How to Give Claude Code & Cursor Real Work Memory on Windows (No NPU Required)
CLAUDE.md only sees your repository. Learn how to give Claude Code, Cursor, and Codex structured local work memory on standard Windows 10/11 PCs via Contextberg MCP—including a sample get_activity Markdown output and a 100% local LM Studio option.
Read in Japanese →
Why CLAUDE.md and chat logs still leave your Windows agent blind
A well-maintained CLAUDE.md or .cursorrules file tells your coding agent how your repository is structured and which test commands to run. What it cannot tell the agent is what happened outside the repository in the last 45 minutes.
Before you asked Claude Code or Cursor to touch a file, you probably read a GitHub issue in Edge or Chrome, compared two documentation pages, hit a failing command in Windows Terminal, or discussed an architecture trade-off in Codex. Because none of that context lives inside your repo files, each fresh session forces you to re-explain the trail by hand.
CLAUDE.md vs. Raw Screen OCR vs. Contextberg MCP Output
Developers on Windows usually consider three ways to feed context into coding agents: static repo rules, raw screen/OCR dumps, or structured MCP work memory. They solve very different parts of the problem.
| Dimension | Static CLAUDE.md / .cursorrules | Raw Screen OCR Dump | Contextberg Structured MCP |
|---|---|---|---|
| What it sees | Repo conventions, build commands, committed docs | Unfiltered text scraped from every open window | 3-tier memory: Record evidence, Daily/AFK reports, Cross-agent turns, and editable LTM |
| Browser & cross-agent trail | None—misses docs, GitHub issues, and other agent sessions | Mixed into giant noisy text blocks with UI chrome | Structured app timeline, browser URLs, and get_agent_history across Claude Code, Cursor, and Codex |
| Token efficiency | High (small static prompt) | Low—raw OCR dumps waste context window on taskbar and sidebar noise | High—bounded get_activity Markdown slices and topic summaries on demand |
| Windows hardware requirement | Any PC | Often requires heavy local indexing or NPU/Copilot+ PCs | Standard Windows 10/11 PCs (no NPU or Copilot+ PC required) |
| Editability & control | Git-tracked Markdown | Usually append-only raw index | Inspect/delete in Record, exclude apps/URLs, pause anytime, and manually edit LTM |
What structured get_activity Markdown looks like
Instead of forcing Claude Code or Cursor to parse raw screenshots or 30,000 tokens of unfiltered OCR, Contextberg returns bounded Markdown shaped for reasoning. Below is an illustrative example of what an agent receives when calling get_activity for a recent window.
## Activity Context (14:00 - 15:15)
### Active Applications
- **Cursor** (38 min): `src/auth/refreshToken.ts`, `tests/auth/token-refresh.test.ts`
- **Windows Terminal** (11 min): `npm test -- token-refresh.test.ts` (1 failing: logout race condition)
- **Microsoft Edge / Chrome** (14 min):
- `github.com/org/repo/issues/418` — Parallel token refresh race condition
- `learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.protecteddata` — CurrentUser scope notes
### Recent Cross-Agent Context
- Prior Codex session checked token lock ordering; suggested making `logout()` clear pending refresh timers first.
### Suggested Starting Point
- Inspect `refreshToken.ts` mutex around `logout()` and re-run `token-refresh.test.ts`.
Alongside get_activity, the MCP bridge exposes get_daily_memory and get_weekly_memory for longer recaps, get_agent_history for Claude Code / Cursor / Codex turns, and read_ltm / update_ltm for durable project memory.
Step-by-step setup on Windows 10/11 (No NPU required)
You do not need a Copilot+ PC, a 40+ TOPS NPU, or a multi-gigabyte Foundry Local runtime download just to get started. Contextberg runs on standard Windows 10 and Windows 11 machines.
Step 1: Install Contextberg from Microsoft Store via the Contextberg download page, then launch the app and complete initial sign-in. The Free plan requires no credit card and includes local storage, MCP integration, and LM Studio support.
Step 2: Review Settings -> Recording and Excluded Apps before your first session. Toggle screens, browser history, typed input, or agent history individually, and exclude password managers, banking portals, or private chat tools before events enter Activity.
Step 3: Work normally for 10 to 15 minutes so Record has real timeline entries. Open the Record view to confirm foreground windows and browser URLs are appearing as expected.
Step 4: Connect Claude Code, Cursor, or Codex using the exact MCP command shown inside the Contextberg desktop app. On Windows, CLI clients typically launch npx via cmd /c while passing your local installation's CONTEXTBERG_API_URL (backed by the desktop app's local HTTP server on localhost:18080).
# Claude Code on Windows
claude mcp add --scope user -e CONTEXTBERG_API_URL=<URL_FROM_APP> --transport stdio contextberg -- cmd /c npx -y @contextberg/mcp-server
# Codex on Windows
codex mcp add contextberg --env CONTEXTBERG_API_URL=<URL_FROM_APP> -- cmd /c npx -y @contextberg/mcp-server
# Optional: teach agents when to check Contextberg first
npx skills add contextberg/skillsFor Cursor or Claude Desktop, copy the JSON mcpServers block generated in Settings / Export and restart the client. Keep Contextberg running in the background while working, since @contextberg/mcp-server is a thin bridge rather than the storage engine.
Step 5: Verify with a bounded prompt before trusting a larger task.
Use Contextberg to inspect my activity from the last 90 minutes.
List the exact files, terminal errors, and documentation URLs observed,
separate verified records from inferred intent, and suggest the first file to open.100% local privacy option with LM Studio (or flexible routing)
Work logs live on your Windows drive by default. When it comes to the AI model that generates Memory summaries or answers in Chat, Contextberg lets you choose the privacy and hardware trade-off that fits your machine:

Option A — 100% on-device with LM Studio: Point Contextberg's OpenAI-compatible local endpoint to LM Studio. Summarization and Chat stay completely inside your PC with zero external API calls. Note that LM Studio support currently covers text generation rather than tool use.
Option B — Contextberg Cloud or SelfAI on standard laptops: If you are on a 16 GB corporate laptop running Docker, Visual Studio, and Cursor at once, running a large local model all day can slow down builds. Using the Free plan, the optional $8/mo Lite plan, or SelfAI (your own OpenRouter / Gemini key or Codex sign-in) keeps desktop capture local while offloading summary generation without needing NPU hardware.
Compare tools and explore interruption recovery
Developer MCP workflows are only one side of work memory. The same local Record timeline and AFK return summaries help anyone whose day gets fragmented across Slack pings and browser tabs.