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/mcpOr run directly with npx:
npx @deltamemory/mcpConfiguration
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
| Variable | Required | Description |
|---|---|---|
DELTAMEMORY_API_KEY | Yes | API key from app.deltamemory.com (opens in a new tab) |
DELTAMEMORY_URL | Yes | Your endpoint URL (e.g., https://api-us-east-1.deltamemory.com) |
DELTAMEMORY_COLLECTION | No | Collection name for memory isolation (default: "default") |
Available Tools
Once configured, your AI assistant has access to these memory tools:
Core Operations
| Tool | Description |
|---|---|
deltamemory_ingest | Store content with cognitive processing (extracts facts, concepts, profiles, events) |
deltamemory_recall | Search memories with hybrid cognitive search |
deltamemory_store | Store content without cognitive processing |
deltamemory_get | Get a specific memory by ID |
deltamemory_delete | Delete a memory by ID |
Memory Management
| Tool | Description |
|---|---|
deltamemory_stats | Get collection statistics |
deltamemory_decay | Apply salience decay to memories |
deltamemory_consolidate | Merge similar memories |
deltamemory_reflect | Generate insights from recent memories |
deltamemory_graph | Get knowledge graph |
deltamemory_purge | Delete all memories in a collection |
deltamemory_health | Check 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
-
Ingest: When you share information, the MCP server processes it through DeltaMemory's cognitive pipeline, extracting facts, concepts, user profiles, and events.
-
Recall: When you ask questions, the server performs hybrid search combining semantic similarity, recency, and salience scoring to find relevant memories.
-
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:
- Node.js not installed or wrong version (need 18+)
- API key not set or invalid
- Network connectivity issues
- Invalid JSON in config file
Tools Not Appearing
- Restart Claude Desktop / Cline / Cursor
- Check config file syntax (valid JSON)
- Verify environment variables are set
- Check MCP server logs for errors
Memory Not Persisting
- Verify
DELTAMEMORY_COLLECTIONis consistent across sessions - Check API key has write permissions
- Verify endpoint URL is correct
- 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-personal2. Separate Collections by Context
# Work-related memory
DELTAMEMORY_COLLECTION=work-projects
# Personal memory
DELTAMEMORY_COLLECTION=personal3. 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
- MCP Specification (opens in a new tab)
- Claude Desktop (opens in a new tab)
- Cline Extension (opens in a new tab)
- DeltaMemory Docs (opens in a new tab)
- Troubleshooting Guide
Support
For MCP-specific issues:
- Check MCP server logs
- Verify configuration
- Test with direct SDK first
- Contact: support@deltamemory.com