How to Give Claude Memory Across Chats and Machines

Updated · By the Cozy team

To get Claude memory across chats and machines, keep durable context in one hosted Markdown wiki that every Claude surface reaches over MCP. Built-in memory covers a single Claude account, and Claude Code's auto memory is stored per project on one machine. A shared MCP workspace lets claude.ai, Claude Desktop and Claude Code read and write the same pages.

What Claude remembers on its own

Claude has three separate memory mechanisms, and they do not talk to each other.

Anthropic's own docs describe CLAUDE.md and auto memory as context, not enforced configuration. Third-party write-ups also report that auto memory is machine-local and does not sync across machines, and recommend a tracked file for anything that must persist (MemoryPlugin). Check Anthropic's current docs, since these features change often.

Where the gaps show up

The gaps are the same ones people search for when they type "claude memory across chats" or "claude code memory across machines".

The approach: one wiki, reached over MCP

The Model Context Protocol lets each Claude surface connect to a remote server. If the server holds a Markdown wiki, every surface sees the same pages. Memory then lives in files you can read, not inside one vendor's store.

Cozy is a private wiki and cloud file space for each person and their AI agents. We make it, and it fits this job. Every account gets "My wiki" and one hosted MCP endpoint, https://cozy.cloud/mcp, that reaches all your workspaces. It is stateless Streamable HTTP, so there is no tunnel or local server to run. For the general idea see AI memory and the MCP server page.

Connect each Claude surface

claude.ai and Claude Desktop. In Settings (or Customize), open Connectors, choose Add custom connector and enter https://cozy.cloud/mcp. Claude signs in with OAuth 2.1 and you approve access on Cozy's consent page. Step by step: connect Claude.

Claude Code. Add the server once for your user, then sign in with /mcp:

claude mcp add --transport http --scope user cozy https://cozy.cloud/mcp

Do the same on each machine and the same wiki shows up in each. Tools use My wiki unless Claude passes a workspace argument, and cozy_workspaces lists the others. An agent gets no more access than you have in each workspace, capped by the scopes it was granted (wiki:read, wiki:write, sources:write). Connected agents are listed and can be disconnected under Connectors → Agents. For CI or headless runs, use the workspace URL https://cozy.cloud/wiki-mcp/WORKSPACE_UUID with a bearer credential from Agents. Those credentials are shown once, expire within 90 days, and carry the scopes read, wiki-write or source-write, with optional folder-prefix grants. See connect Claude Code.

How the memory is organized

The workspace has four folders.

FolderHolds
wiki/Curated pages and index.md
sources/Evidence from connectors and importers, treated as untrusted data
skills/Editable SKILL.md files
agents/Agent notes and handoffs

When Claude finishes work on one machine, it can write a handoff note under agents/. A session on another machine reads that note with cozy_read, or finds it with cozy_search. cozy_changes returns what changed since a timestamp, so a new session can catch up fast. cozy_context returns a page with its typed neighbors, excerpts, evidence and warnings.

Pages are plain Markdown, so links in a page become a graph on every save. Frontmatter fields such as type, description, aliases and tags are read, and links into sources/ count as citations. See typed links.

Safety for shared writes

Edits require expectedRevision (0 for a new page), and concurrent edits return a conflict instead of overwriting. Deletion is a tombstone. The last 50 revisions are readable and restorable with cozy_history and cozy_restore. Agents cannot see connector credentials or permanently purge.

Health checks cover broken links, duplicates, stale pages, conflicts, orphans and unsourced pages, and give a score with a prioritized list of fixes. Your own agent can also run a periodic "dream" pass that consolidates the wiki; see memory consolidation.

Where built-in memory is better

Built-in memory needs no setup, and Claude decides what to remember as you talk. Claude Code auto memory is automatic and fine for one repo on one machine. A short CLAUDE.md is still the right place for repo rules, and a tracked file works well for team conventions. Cozy complements these. Put cross-repo, cross-machine and cross-tool knowledge in the wiki, and have CLAUDE.md point to the MCP endpoint.

Cozy runs no model itself, so you bring your own agent. Search is lexical, with no embeddings or vector database. Cozy is operated by Coral Sourcing LLC and is not affiliated with Cozy Cloud (cozy.io) or Cozi.

A practical setup

  1. Sign in to Cozy. Your account gets My wiki.
  2. Add https://cozy.cloud/mcp as a custom connector in claude.ai and Claude Desktop.
  3. Add the same URL to Claude Code on each machine with claude mcp add, and approve only the scopes it needs.
  4. Add two lines to CLAUDE.md telling Claude to check the wiki first and write handoffs under agents/.
  5. Run a health check now and then and fix what it lists.

For the coding-specific version of this, see coding agent memory.

Frequently asked questions

Does Claude remember things between chats?

Claude has built-in memory in claude.ai, and Anthropic made it available on the free plan in March 2026. It stays inside Claude. For memory that Claude Code and other tools can also use, keep it in a shared wiki over MCP, as described in AI memory.

Does Claude Code memory sync across machines?

Third-party sources report that auto memory is machine-local and per repository, so it does not sync. A shared MCP workspace gives every machine the same pages; see connect Claude Code.

Can claude.ai and Claude Code share the same memory?

Yes, if both connect to the same remote MCP server. In Cozy, claude.ai and Claude Code both connect to https://cozy.cloud/mcp and sign in with OAuth.

Can I limit what Claude is allowed to write?

Yes. When you connect Claude, you approve the scopes it gets (wiki:read, wiki:write, sources:write), and it never gets more than your own access. Bearer credentials for scripts carry read, wiki-write or source-write, can be limited to folder prefixes and expire within 90 days.

Does Cozy replace CLAUDE.md?

No. Keep repo rules in CLAUDE.md and use Cozy for knowledge that spans repos, machines and tools. See coding agent memory.

Give your agents a memory worth keeping

Cozy gives every account a private wiki that Claude, Codex, ChatGPT and other MCP clients can read and maintain.

Start your wiki