PersistMemory gives your AI persistent, searchable memory via the Model Context Protocol (MCP). Connect it to any MCP-compatible client in under a minute.
You need:
Authentication: MCP connections use browser-based OAuth. On first connect, a browser window opens for you to sign in. Sessions last 20 days — no API keys needed for MCP setup.
Add this to your Claude Desktop config file:
{
"mcpServers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}Restart Claude Desktop after saving. On first launch, a browser window opens for OAuth login. After authenticating, your session lasts 20 days.
Add PersistMemory via the CLI:
claude mcp add persistmemory --transport http --url https://mcp.persistmemory.com/mcp
Or add it manually to your MCP config:
{
"mcpServers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}A browser window opens on first use for OAuth authentication. Session lasts 20 days.
Create a .cursor/mcp.json file in your project root:
{
"mcpServers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}Restart Cursor after saving. A browser window opens for OAuth authentication on first connection. Your session lasts 20 days.
Option 1 — User settings (applies to all projects):
Add to your VS Code settings.json:
{
"mcp": {
"servers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}
}Option 2 — Workspace config (per-project, shareable with team):
{
"servers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}Reload VS Code after saving. A browser window opens for OAuth authentication on first connection. Each team member authenticates with their own PersistMemory account.
Open Windsurf Settings, go to the MCP section (or Cascade > MCP), and add this configuration:
{
"mcpServers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}Restart Windsurf after adding the config. A browser window opens for OAuth authentication on first connection. Session lasts 20 days.
Open the Cline extension sidebar in VS Code, go to MCP Servers, and add a new server:
{
"mcpServers": {
"persistmemory": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.persistmemory.com/mcp"
]
}
}
}A browser window opens for OAuth authentication on first connection. Once connected, Cline will see PersistMemory's tools and can use them autonomously during tasks.
Once connected, your AI client has access to these tools:
authenticateAuthenticate with PersistMemory via browser-based OAuth (20-day session)
create_spaceCreate a new memory space to organize memories by project or topic
list_spacesList all memory spaces you have access to
switch_spaceSwitch to a different memory space by ID
get_current_spaceShow which memory space is currently active
add_to_memorySave a memory with a title and content to the current space
search_memorySemantic search across all memories in the current space
publish_messagePublish a message to the current space's chat
fetch_messagesRetrieve recent messages from the current space's chat
Tip: Add a custom instruction to your AI client to encourage proactive memory use: "Before starting any task, search memory for relevant project context. After completing a task with new discoveries, store them as memories."
MCP connections authenticate automatically through browser-based OAuth. On first connection, a browser window opens where you sign in with your PersistMemory account. Sessions last 20 days, after which you simply re-authenticate by calling the authenticate tool.
For direct API access outside of MCP clients, use your API key from the Settings page in your PersistMemory dashboard. Include it as a Bearer token:
curl -X POST https://backend.persistmemory.com/mcp/search \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"query": "authentication flow", "top_k": 5}'Generate your API key at Settings → API Keys.
Base URL: https://backend.persistmemory.com
/api/auth/signupCreate account/api/auth/loginLogin (returns API key)/api/auth/verify-emailVerify email address/api/auth/forgot-passwordRequest password reset/api/auth/reset-passwordReset password/api/auth/googleGoogle OAuth login/auth/meGet current user info/spacesList your spaces/spacesCreate a new space/api/spaces/allList all spaces with details/api/spaces/with-messagesList spaces with recent messages/api/spaces/mergeMerge two spaces/mcp/addMemoryStore a memory (title + content)/mcp/searchSemantic search memories/mcp/ingestUrlIngest content from a URL/mcp/uploadFileUpload and process a file/mcp/publishMessagePublish a message to a space/mcp/fetchMessagesFetch recent messages/api/chatAI chat with memory context/api/chatsList chat conversations/api/chatsCreate a new chat/api/chats/:idUpdate a chat/api/chats/:idDelete a chat/api/user/apikeyGet your API key/mcp/createApiKeyCreate a new API key/mcp/listApiKeysList all API keysAll authenticated endpoints require Authorization: Bearer YOUR_API_KEY header.
Restart your client (Claude Desktop, Cursor, etc.) after adding the config. Make sure Node.js 18+ is installed. Check that npx is available in your terminal.
Call the authenticate tool from your AI client. This triggers the OAuth flow and opens a browser window. If the browser doesn't open automatically, check the tool response for the login URL.
Sessions last 20 days. When a session expires, simply call the authenticate tool again to re-authenticate through the browser.
This means the OAuth flow hasn't completed. Call authenticate, complete the browser login, then try your action again.
Install Node.js 18+ from nodejs.org. After installation, restart your terminal and MCP client.