Claude Desktop + MCP Integration
Give Claude Desktop persistent memory across conversations. Once configured, Claude can remember facts, preferences, and context from previous chats — no copy-pasting required.
What You'll Build
By the end of this guide, Claude Desktop will be able to:
- Store information you tell it ("remember that my preferred language is Python")
- Recall that information in future conversations ("what's my preferred language?")
- Search semantically across everything it has remembered
Under the hood, Claude uses MemoryRelay's MCP tools — memory_store and memory_search — to persist and retrieve memories via the MemoryRelay API.
Prerequisites
- Claude Desktop installed
- Node.js 18+ installed
- A MemoryRelay API key
Step 1: Get Your API Key
- Sign up or log in at https://app.memoryrelay.ai.
- Navigate to Settings → API Keys.
- Click Create Key and copy the key (it starts with
mem_).
Your API key is shown only once. Store it in a password manager or secure location. If you lose it, you can always generate a new one from the dashboard.
Step 2: Install the MCP Server
Install the MemoryRelay MCP server globally:
npm install -g @memoryrelay/mcp-server
Verify the installation:
npx @memoryrelay/mcp-server --version
Step 3: Configure Claude Desktop
Open your Claude Desktop configuration file:
| OS | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
| Linux | ~/.config/Claude/claude_desktop_config.json |
Add the MemoryRelay MCP server to the mcpServers section:
{
"mcpServers": {
"memoryrelay": {
"command": "npx",
"args": ["@memoryrelay/mcp-server"],
"env": {
"MEMORYRELAY_API_KEY": "mem_your_key_here"
}
}
}
}
Replace mem_your_key_here with the API key you copied in Step 1.
If you already have other MCP servers configured, add "memoryrelay": { ... } alongside them inside the existing mcpServers object. Do not overwrite your other servers.
Step 4: Restart Claude Desktop
Quit Claude Desktop completely and reopen it. The MCP server connects during startup, so a full restart is required.
After restarting, you should see the MemoryRelay tools available in Claude's tool list (look for the hammer icon in the chat input area). The following tools will be available:
| Tool | Description |
|---|---|
memory_store | Save a new memory |
memory_search | Search memories by semantic similarity |
memory_list | List recent memories |
memory_get | Retrieve a specific memory by ID |
memory_update | Update an existing memory |
memory_delete | Delete a memory |
entity_create | Create a knowledge graph entity |
entity_link | Link a memory to an entity |
memory_health | Check MemoryRelay API connectivity |
Step 5: Test It Out
Store a memory
In a new conversation, type:
Remember that my preferred programming language is Python and I use VS Code as my editor.
Claude will call the memory_store tool behind the scenes:
Tool: memory_store
Arguments: {
"content": "User's preferred programming language is Python. Uses VS Code as their editor.",
"metadata": {
"type": "preference",
"category": "development"
}
}
Claude will confirm that it stored the memory.
Recall in a new conversation
Open a new conversation (this is the key part — memory persists across sessions) and ask:
What's my preferred programming language?
Claude will call memory_search:
Tool: memory_search
Arguments: {
"query": "preferred programming language"
}
The search returns the memory you stored earlier, and Claude responds with: Python — pulled from MemoryRelay, not from the current conversation.
How It Works
┌─────────────────┐ MCP Protocol ┌─────────────────────┐ HTTPS ┌──────────────────┐
│ Claude Desktop │ ◄──────────────────► │ @memoryrelay/ │ ◄───────────► │ MemoryRelay API │
│ (Chat UI) │ stdio transport │ mcp-server │ REST API │ (Cloud) │
└─────────────────┘ └─────────────────────┘ └──────────────────┘
- You say something Claude should remember.
- Claude decides to call
memory_storevia the MCP protocol. - The MCP server sends the memory to the MemoryRelay API, which generates an embedding and stores it.
- In a later conversation, Claude calls
memory_searchwith a natural language query. - MemoryRelay performs semantic (vector) search and returns the most relevant memories.
- Claude incorporates those memories into its response.
Tips for Effective Use
Claude is more reliable at storing memories when you say "remember that..." or "save this for later." You can also ask Claude to "remember everything important from this conversation" at the end of a session.
Ask Claude to create entities for people, projects, or concepts: "Create an entity for Project Atlas and link my notes to it." This builds a knowledge graph you can query later.
You can ask "What do you remember about me?" or "Search your memory for anything about Project Atlas" to see what has been stored.
Troubleshooting
| Issue | Solution |
|---|---|
| Tools not appearing in Claude | Restart Claude Desktop. Check that claude_desktop_config.json is valid JSON. |
| "Authentication failed" errors | Verify your API key starts with mem_ and is correctly set in the config. |
| MCP server not starting | Run npx @memoryrelay/mcp-server manually in a terminal to see error output. |
| Memories not being recalled | Ask Claude to "search memory for [topic]" to trigger an explicit search. |