Integrations
MCP Server

MCP Integration

Use DeltaMemory with Claude Desktop, Cline, Cursor, and other Model Context Protocol (MCP) clients.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI assistants to securely access external tools and data sources. DeltaMemory provides an MCP server that exposes memory operations as tools.

Installation

npm install @deltamemory/mcp

Or run directly with npx:

npx @deltamemory/mcp

Configuration

Add to your MCP client configuration:

Claude Desktop

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

Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "deltamemory": {
      "command": "npx",
      "args": ["-y", "@deltamemory/mcp"],
      "env": {
        "DELTAMEMORY_API_KEY": "dm_your_api_key_here",
        "DELTAMEMORY_URL": "https://api-us-east-1.deltamemory.com",
        "DELTAMEMORY_COLLECTION": "claude-memory"
      }
    }
  }
}

Cline (VS Code Extension)

Add to Cline MCP settings:

{
  "mcpServers": {
    "deltamemory": {
      "command": "npx",
      "args": ["-y", "@deltamemory/mcp"],
      "env": {
        "DELTAMEMORY_API_KEY": "dm_your_api_key_here",
        "DELTAMEMORY_URL": "https://api-us-east-1.deltamemory.com",
        "DELTAMEMORY_COLLECTION": "cline-memory"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "deltamemory": {
      "command": "npx",
      "args": ["-y", "@deltamemory/mcp"],
      "env": {
        "DELTAMEMORY_API_KEY": "dm_your_api_key_here",
        "DELTAMEMORY_URL": "https://api-us-east-1.deltamemory.com",
        "DELTAMEMORY_COLLECTION": "cursor-memory"
      }
    }
  }
}

Environment Variables

VariableRequiredDescription
DELTAMEMORY_API_KEYYesAPI key from app.deltamemory.com (opens in a new tab)
DELTAMEMORY_URLYesYour endpoint URL (e.g., https://api-us-east-1.deltamemory.com)
DELTAMEMORY_COLLECTIONNoCollection name for memory isolation (default: "default")

Available Tools

Once configured, your AI assistant has access to these memory tools:

Core Operations

ToolDescription
deltamemory_ingestStore content with cognitive processing (extracts facts, concepts, profiles, events)
deltamemory_recallSearch memories with hybrid cognitive search
deltamemory_storeStore content without cognitive processing
deltamemory_getGet a specific memory by ID
deltamemory_deleteDelete a memory by ID

Memory Management

ToolDescription
deltamemory_statsGet collection statistics
deltamemory_decayApply salience decay to memories
deltamemory_consolidateMerge similar memories
deltamemory_reflectGenerate insights from recent memories
deltamemory_graphGet knowledge graph
deltamemory_purgeDelete all memories in a collection
deltamemory_healthCheck server health

Usage Examples

Once configured, your AI assistant can use memory naturally:

Storing memories:

  • "Remember that I prefer TypeScript over JavaScript"
  • "Save that my project deadline is March 15th"
  • "Note that I'm working on a React Native app"

Recalling memories:

  • "What do you know about my preferences?"
  • "What have we discussed about my project?"
  • "What's my deadline?"

Managing memories:

  • "Show me memory statistics"
  • "Generate insights from our recent conversations"

How It Works

  1. Ingest: When you share information, the MCP server processes it through DeltaMemory's cognitive pipeline, extracting facts, concepts, user profiles, and events.

  2. Recall: When you ask questions, the server performs hybrid search combining semantic similarity, recency, and salience scoring to find relevant memories.

  3. Context: The server returns pre-formatted context that helps the AI assistant provide personalized, contextual responses.

Tips

  • Use separate collections for different contexts (e.g., work-memory, personal-memory)
  • The AI will automatically decide when to store and recall memories based on conversation context
  • Memories persist across sessions, giving your AI assistant long-term memory

Troubleshooting

MCP Server Not Starting

Check logs:

Claude Desktop:

  • macOS: ~/Library/Logs/Claude/mcp*.log
  • Windows: %APPDATA%\Claude\logs\mcp*.log

Common issues:

  1. Node.js not installed or wrong version (need 18+)
  2. API key not set or invalid
  3. Network connectivity issues
  4. Invalid JSON in config file

Tools Not Appearing

  1. Restart Claude Desktop / Cline / Cursor
  2. Check config file syntax (valid JSON)
  3. Verify environment variables are set
  4. Check MCP server logs for errors

Memory Not Persisting

  1. Verify DELTAMEMORY_COLLECTION is consistent across sessions
  2. Check API key has write permissions
  3. Verify endpoint URL is correct
  4. Test connection: curl -H "X-API-Key: $DELTAMEMORY_API_KEY" $DELTAMEMORY_URL/v1/health

Multi-User Setup

For multi-user scenarios, use different collections:

{
  "mcpServers": {
    "deltamemory-alice": {
      "command": "npx",
      "args": ["-y", "@deltamemory/mcp"],
      "env": {
        "DELTAMEMORY_API_KEY": "dm_xxx",
        "DELTAMEMORY_URL": "https://api-us-east-1.deltamemory.com",
        "DELTAMEMORY_COLLECTION": "user-alice"
      }
    },
    "deltamemory-bob": {
      "command": "npx",
      "args": ["-y", "@deltamemory/mcp"],
      "env": {
        "DELTAMEMORY_API_KEY": "dm_xxx",
        "DELTAMEMORY_URL": "https://api-us-east-1.deltamemory.com",
        "DELTAMEMORY_COLLECTION": "user-bob"
      }
    }
  }
}

Best Practices

1. Use Descriptive Collection Names

# ❌ Generic
DELTAMEMORY_COLLECTION=memory1
 
# ✅ Descriptive
DELTAMEMORY_COLLECTION=alice-work
DELTAMEMORY_COLLECTION=bob-personal

2. Separate Collections by Context

# Work-related memory
DELTAMEMORY_COLLECTION=work-projects
 
# Personal memory
DELTAMEMORY_COLLECTION=personal

3. Use Specific Queries

The AI will get better results with specific queries rather than vague ones.

Security Considerations

API Key Protection

  • Never commit API keys to version control
  • Use environment variables
  • Rotate keys periodically
  • Use separate keys for different environments

User Isolation

  • Use unique collection names per user
  • Don't share collections across users
  • Collections provide complete data isolation

Data Privacy

  • Memory is stored on DeltaMemory servers
  • Data is encrypted in transit (HTTPS)
  • Follow your organization's data policies
  • Consider data retention requirements

Advanced Configuration

Using Bun Instead of Node

{
  "command": "bun",
  "args": ["x", "@deltamemory/mcp"]
}

Local Development

{
  "env": {
    "DELTAMEMORY_API_KEY": "dm_xxx",
    "DELTAMEMORY_URL": "http://localhost:6969",
    "DELTAMEMORY_COLLECTION": "dev-testing"
  }
}

Resources

Support

For MCP-specific issues: