MCPClaudeTutorial

Set Up MCP Memory for Claude Desktop

8 min readBy Mohammad Saquib Daiyan

Claude Desktop is powerful, but every conversation starts from zero. By connecting PersistMemory as an MCP server, Claude gains persistent memory that survives across sessions. Your preferences, project context, and past decisions are always available. Setup takes less than two minutes.

What You'll Build

After completing this tutorial, your Claude Desktop will have three new capabilities:

Store Memories

Claude saves important facts, preferences, and decisions automatically.

Search Context

Claude searches past memories before answering, giving it relevant context.

Organize by Space

Separate memories by project so work context never bleeds into personal chats.

Prerequisites

  • Claude Desktop installed — download from claude.ai/download
  • Node.js 18+ installed — required to run the MCP bridge
  • PersistMemory account (free) — sign up at persistmemory.com

Step 1: Get Your API Key

Sign up at persistmemory.com if you have not already. After signing in, navigate to your dashboard settings. Your API key will be displayed there. Copy it — you will need it in the next step.

The free tier includes generous limits for personal use. No credit card is required.

Step 2: Configure Claude Desktop

Claude Desktop reads its MCP server configuration from a JSON file. Open the config file in your text editor. The location depends on your operating system:

# macOS
~/Library/Application Support/Claude/claude_desktop_config.json

# Windows
%APPDATA%\Claude\claude_desktop_config.json

# Linux
~/.config/Claude/claude_desktop_config.json

If the file does not exist, create it. Add the PersistMemory MCP server to themcpServers object:

{
  "mcpServers": {
    "persistmemory": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.persistmemory.com/mcp"
      ]
    }
  }
}

That is the complete configuration. The npx mcp-remote command acts as a bridge between Claude Desktop's local stdio transport and PersistMemory's remote MCP endpoint. It downloads automatically the first time it runs.

If you already have other MCP servers configured, just add the "persistmemory" entry alongside them:

{
  "mcpServers": {
    "existing-server": {
      "command": "node",
      "args": ["path/to/existing/server.js"]
    },
    "persistmemory": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.persistmemory.com/mcp"
      ]
    }
  }
}

Step 3: Restart Claude Desktop

Quit Claude Desktop completely and reopen it. On macOS, make sure to use Cmd+Q to fully quit — just closing the window leaves it running in the background.

When Claude Desktop restarts, it reads the updated config and connects to the PersistMemory MCP server. You should see the MCP tools icon (a hammer) appear in the bottom-left of the chat input. Click it to verify that store_memory, search_memory, and list_memories tools are available.

On first launch, npx mcp-remote will open a browser window for authentication. Log in with your PersistMemory account to authorize the connection. This is a one-time step.

Step 4: Test Memory Tools

Open a new conversation in Claude Desktop and try these prompts to verify everything works:

# Prompt 1: Store a memory
"Remember that I prefer TypeScript over JavaScript and I use
Vim keybindings in all my editors."

# Claude will call store_memory and confirm it saved the info.

# Prompt 2: Test retrieval (in a NEW conversation)
"What are my coding preferences?"

# Claude will call search_memory and find the stored preference.

# Prompt 3: Store project context
"Remember that Project Atlas uses Next.js 15 with the App Router,
deployed on Vercel, and the database is Supabase PostgreSQL."

# Prompt 4: Recall project context (in yet another conversation)
"What tech stack does Project Atlas use?"

# Claude will search memory and return the full stack details.

The key test is Prompt 2: open a brand new conversation and ask about something you stored in a previous conversation. If Claude recalls it, your persistent memory is working correctly.

Step 5: Using Memory Spaces

Memory spaces let you organize information by project or context. Instead of dumping everything into a single pool, you can tell Claude which space to use:

# Store to a specific space
"Store in the 'project-atlas' space: The API rate limit is
1000 requests per minute per API key."

# Search within a specific space
"Search the 'project-atlas' space for rate limit information."

# List memories in a space
"Show me all memories in the 'project-atlas' space."

Spaces are created automatically. You can have as many as you need. Common patterns include one space per project, one space for personal preferences, and one space for team knowledge.

Troubleshooting

If things are not working, check these common issues:

Node.js Not Found

The npx command requires Node.js. Verify it is installed by running node --version in your terminal. If not installed, download it from nodejs.org. You need version 18 or later.

Config File Location

The most common mistake is putting the config file in the wrong directory. Double-check the path for your operating system. On macOS, the full path is typically /Users/yourname/Library/Application Support/Claude/claude_desktop_config.json.

MCP Tools Not Appearing

If the hammer icon does not appear after restarting Claude Desktop, check the JSON syntax in your config file. A missing comma or bracket is the most common cause. You can validate your JSON at jsonlint.com.

Authentication Popup Not Appearing

If the browser authentication window does not open on first launch, try running the MCP bridge manually in your terminal to see error output:

npx mcp-remote https://mcp.persistmemory.com/mcp

This will show any connection errors or firewall issues directly in your terminal.

Related Tutorials

Connect Claude Desktop to PersistMemory

Sign up for free and give Claude persistent memory across every conversation. Two minutes from now, Claude will never forget again.