← Back to Blog
Tutorials

How to Add Persistent Memory to Claude Code with MCP

Nexus Team August 5, 2026 7 min read

Claude Code is very good at understanding a codebase while you are working in it. The harder part is continuity.

Start a new session tomorrow and the model still has your files, but it may not know why you rejected one authentication design, which migration failed last week, or that the team agreed not to introduce another queue. Those decisions may exist in an old transcript, an issue, or your own memory. They are no longer part of the active conversation.

Persistent memory solves a different problem than a larger context window or a CLAUDE.md file. It gives Claude Code a place to retrieve relevant history from before it responds and a place to save durable decisions after the work is done.

This guide shows how to connect Claude Code to Nexus-Catalyst as a remote Model Context Protocol (MCP) server. The connection uses OAuth, so there is no API key to paste into a project file.

What persistent memory changes

Claude Code already has several useful forms of context:

  • The current conversation
  • Files in the repository
  • Instructions in CLAUDE.md
  • Tools and data exposed through MCP servers

Each serves a different purpose. Repository files describe the current code. CLAUDE.md provides stable instructions. Conversation history contains the active task. A memory layer preserves useful context that originated in earlier work and retrieves it when it becomes relevant again.

That context might include:

  • Architecture decisions and the reasons behind them
  • Bugs already investigated and approaches that failed
  • Naming, testing, and deployment conventions
  • Project-specific URLs or environments
  • Handoff notes from another AI tool
  • Preferences that apply across repositories

If you want the architectural explanation first, read How MCP-Based Persistent Memory Works. The short version is a loop: recall relevant context, do the work, and store what should survive the session.

Before you begin

You need:

  • Claude Code installed and signed in
  • A Nexus-Catalyst account
  • A browser available to complete OAuth authentication

Nexus-Catalyst’s remote MCP endpoint is:

https://mcp.nexus-catalyst.com

The server is attached to your Claude Code configuration, not to the application source code. You should not add credentials to the repository.

Step 1: Add the Nexus-Catalyst MCP server

From a terminal, run:

claude mcp add --transport http nexus-catalyst https://mcp.nexus-catalyst.com

This registers a remote HTTP MCP server named nexus-catalyst.

MCP is the open protocol Claude Code uses to connect to external tools and data sources. In this case, the external service is a private memory store with tools for recall, search, detail retrieval, storage, and personas.

Step 2: Authenticate

Start a Claude Code session and enter:

/mcp

Select nexus-catalyst, choose Authenticate, and complete the sign-in flow in your browser. Sign in with the same Nexus-Catalyst account you use for any other connected AI clients. That shared identity is what allows the same memory store to serve more than one tool.

OAuth is doing something important here: Claude Code receives authorized access to your account without placing a long-lived secret in a shell command, configuration file, or repository.

Step 3: Verify the connection

Back in the terminal, run:

claude mcp list

You should see a connected entry similar to:

nexus-catalyst: https://mcp.nexus-catalyst.com (HTTP) - Connected

Inside Claude Code, the MCP connection should expose memory tools including:

  • recall_context
  • search_memories
  • get_memory_detail
  • store_context
  • get_persona_definition

You can find the current tool list and parameters in the Nexus-Catalyst MCP tools reference.

Step 4: Store a useful test memory

A test is more useful when it represents real project context. Try something specific but not sensitive:

Store a memory that this project uses TypeScript strict mode and that new API routes require integration tests.

Claude Code should call the storage tool and confirm that the context was saved.

Do not treat memory as a secret manager. API keys, passwords, private keys, and tokens belong in purpose-built secrets storage, not in AI conversation memory.

Step 5: Recall it in a new session

End the session, start a new one, and ask:

What conventions have we established for this project? Use recall_context before answering.

The response should reference the TypeScript and testing decision you stored. That proves the information is coming from outside the original conversation.

For a second test, connect another supported MCP client to the same Nexus-Catalyst account and ask the same question. The goal is not merely continuity between Claude Code sessions. It is continuity across the tools you use to do the work.

A practical memory workflow

Persistent memory works best when it captures conclusions, not an indiscriminate transcript of everything that happened.

At the beginning of a session, ask Claude Code to recall context for the actual task:

Before changing the authentication flow, recall our prior auth decisions and any failed approaches.

During the session, search when you need something more specific:

Search our memories for the earlier refresh-token rotation bug.

At the end, store the durable result:

Store the final decision, the reason we chose it, the files changed, and the approach that failed.

This produces better memory than saving every turn. Future sessions usually need the decision, rationale, and outcome—not the entire path the conversation took to get there.

MCP memory versus CLAUDE.md

These tools complement each other.

Use CLAUDE.md for instructions that should be loaded predictably whenever Claude Code works in a particular scope:

  • Build commands
  • Code-style requirements
  • Repository layout
  • Review rules

Use persistent memory for context that accumulates through work:

  • Why a design changed
  • What was attempted before
  • Who owns a dependency
  • Which incident led to a new constraint
  • Decisions learned in another tool or repository

If a fact must always be present and is appropriate to commit with the project, put it in project documentation or CLAUDE.md. If it is evolving context that should be retrieved when relevant, memory is the better fit.

Troubleshooting

The server needs authentication

Run /mcp inside Claude Code, select nexus-catalyst, and complete the browser sign-in again. OAuth sessions can expire.

The server does not appear

Run claude mcp list and verify that the URL is exactly:

https://mcp.nexus-catalyst.com

You can also confirm that the server’s public OAuth metadata is reachable:

curl https://mcp.nexus-catalyst.com/.well-known/oauth-protected-resource

The tools are connected but nothing is recalled

First confirm that your account contains at least one stored memory. Then make the request specific. “What did we discuss?” provides little retrieval signal. “What database did we choose for the billing service, and why?” is much more useful.

Is recall automatic on every Claude Code prompt?

The remote MCP connection gives the model access to the memory tools. You can request recall explicitly and establish session instructions that encourage the normal recall–work–store pattern.

Nexus-Catalyst is also developing a Claude Code hook plugin for automatic recall and storage. That package is not publicly available yet, so this guide intentionally uses the working MCP route rather than an unpublished install command.

Memory that follows the work

Claude Code should not need to relearn your project every time you open a terminal. More importantly, the context established in Claude Code should not become trapped there.

A shared MCP memory layer gives coding sessions a durable history while keeping that history available to other compatible AI tools. That is the distinction between a longer conversation and genuine continuity.

For the broader cross-tool model, read How to Give ChatGPT and Claude the Same Memory. For a complete setup and troubleshooting reference, use the Claude Code setup guide.

Give your next session the context from this one

Connect Nexus-Catalyst to Claude Code, store one real project decision, and retrieve it from a fresh session. Start your 14-day Nexus-Catalyst trial to get started.