Give Claude Code Persistent Memory with MCP

Claude Code and Cursor support MCP (Model Context Protocol) servers that extend what your AI assistant can do. This guide shows how to add the REM Labs MCP server so Claude remembers your project context, decisions, and preferences across sessions. One JSON config, no code changes.

What MCP Does

MCP is a protocol that lets AI assistants call external tools. When you configure an MCP server in Claude Code or Cursor, the assistant gains new capabilities -- in this case, the ability to store, search, and recall memories through REM Labs. The assistant can decide when to save something important and when to check its memory for relevant context, all through natural language.

Step 1: Get an API Key

Sign up at remlabs.ai/console to get a free API key, or run this in your terminal:

npx @remlabs/memory

This starts the server, opens the console, and gives you an API key. The free tier includes 1,000 memories and 60 requests per minute -- more than enough for individual use.

Step 2: Add the MCP Config

For Claude Code

Add the following to your .claude/mcp.json file (create it if it does not exist):

{ "mcpServers": { "remlabs": { "command": "npx", "args": ["@remlabs/mcp-server"], "env": { "REMLABS_API_KEY": "your-api-key" } } } }

For Cursor

The config is identical. Add it to .cursor/mcp.json in your project root or your global Cursor settings.

{ "mcpServers": { "remlabs": { "command": "npx", "args": ["@remlabs/mcp-server"], "env": { "REMLABS_API_KEY": "your-api-key" } } } }

Replace your-api-key with the key from your console. Restart Claude Code or Cursor after saving the file.

Step 3: Use It

Once configured, your AI assistant gains persistent memory across sessions. You can interact with it naturally:

# Session 1 You: "We decided to use PostgreSQL for the auth service and Redis for session caching. Remember this." Claude: [stores the architectural decision via REM Labs] # Session 2 (days later, new conversation) You: "What database are we using for auth?" Claude: [recalls from REM Labs] "You decided to use PostgreSQL for the auth service and Redis for session caching."

The assistant decides when to store and when to recall based on the conversation. You can also be explicit -- "remember this" or "what do you know about the deployment setup" -- and the MCP server handles the storage and retrieval.

What the MCP Server Provides

The @remlabs/mcp-server package exposes the core REM Labs API as MCP tools:

Behind the scenes, every stored memory is automatically indexed for semantic search, full-text search, and entity graph queries. When the assistant recalls, all retrieval paths run in parallel and results are fused with neural reranking -- the same pipeline that scores 90% on LongMemEval.

Practical Uses

Memory Persists Across Machines

Because memories are stored in the REM Labs cloud (or your self-hosted instance), they are available everywhere you use the same API key. Configure the MCP server on your laptop and your desktop, and both sessions share the same memory. This also means memories survive OS reinstalls, machine swaps, and terminal resets.

Privacy: All memories are encrypted at rest and in transit. Your API key scopes access to your account only. REM Labs does not train on your data. For full details, see the privacy policy.

Give Claude a memory that lasts

Free tier. One config file. Memory across every session.

Get started free →