The cloud backend enables you to sync your memories across devices and collaborate with team members using MemoryGraph Cloud.
- Multi-device sync: Access your memories from any device
- Team collaboration: Share memories with your team
- Automatic backups: Your data is safely stored in the cloud
- Usage analytics: Track your memory usage and patterns
- Sign up at https://app.memorygraph.dev
- Go to Settings → API Keys
- Click Generate New Key
- Copy your API key (starts with
mg_)
Set the environment variable and backend type:
export MEMORYGRAPH_API_KEY=mg_your_api_key_here
export MEMORY_BACKEND=cloudOr configure in your Claude Code settings:
claude mcp add --scope user memorygraph \
--env MEMORYGRAPH_API_KEY=mg_your_key_here \
--env MEMORY_BACKEND=cloud \
-- memorygraphAsk Claude to store and recall a memory:
You: Store a memory about setting up cloud backend
Claude: ✓ Stored memory in cloud: mem_xxxxx
You: Recall memories about cloud
Claude: Found 1 memory about cloud backend setup...
| Variable | Required | Default | Description |
|---|---|---|---|
MEMORYGRAPH_API_KEY |
Yes | - | Your API key (starts with mg_) |
MEMORY_BACKEND |
No | sqlite |
Set to cloud for cloud backend |
MEMORYGRAPH_API_URL |
No | https://graph-api.memorygraph.dev |
API endpoint URL |
MEMORYGRAPH_TIMEOUT |
No | 30 |
Request timeout in seconds |
Basic cloud setup:
export MEMORYGRAPH_API_KEY=mg_xxxxx
export MEMORY_BACKEND=cloudCustom timeout for slow connections:
export MEMORYGRAPH_API_KEY=mg_xxxxx
export MEMORY_BACKEND=cloud
export MEMORYGRAPH_TIMEOUT=60Development with staging API:
export MEMORYGRAPH_API_KEY=mg_test_xxxxx
export MEMORY_BACKEND=cloud
export MEMORYGRAPH_API_URL=https://staging-api.memorygraph.devThe cloud backend supports all standard MCP tools:
store_memory(
type="solution",
title="Fixed Redis timeout issue",
content="Increased timeout to 30 seconds...",
tags=["redis", "timeout", "fix"]
)
recall_memories(query="Redis timeout solutions")
search_memories(
query="redis",
memory_types=["solution"],
limit=10
)
create_relationship(
from_memory_id="mem_solution",
to_memory_id="mem_problem",
relationship_type="SOLVES"
)
Error: Invalid API key
Solution: Verify your API key is correct and hasn't expired. Generate a new key at https://app.memorygraph.dev/settings.
Error: Usage limit exceeded. Upgrade at https://app.memorygraph.dev/pricing
Solution: You've reached your plan's limits. Either:
- Delete unused memories
- Upgrade to a higher tier
Error: Rate limit exceeded. Please slow down requests.
Solution: The cloud backend automatically retries with exponential backoff. If you see this frequently, consider:
- Batching operations
- Adding delays between requests
- Contacting support for rate limit increase
Error: Cannot connect to Graph API
Solution:
- Check your internet connection
- Verify the API URL is correct
- Try again - transient errors are automatically retried
To migrate your local memories to the cloud:
# Export from local backend
memorygraph export --output memories.json
# Switch to cloud backend
export MEMORY_BACKEND=cloud
export MEMORYGRAPH_API_KEY=mg_xxxxx
# Import to cloud
memorygraph import --input memories.json- Continue using local backend alongside cloud
- Gradually re-store important memories to cloud
- Switch to cloud-only when ready
The API key environment variable is not set. Export it before starting:
export MEMORYGRAPH_API_KEY=mg_your_key_hereMemoryGraph API keys always start with mg_. Ensure you're using the correct key from your dashboard.
- Check your internet connection
- Increase timeout:
export MEMORYGRAPH_TIMEOUT=60 - The first request may be slower due to connection establishment
- Verify you're using
MEMORY_BACKEND=cloud - Check that the same API key is used across devices
- Look for error messages in logs
| Feature | Local (SQLite) | Cloud |
|---|---|---|
| Setup | Zero config | Requires API key |
| Multi-device | ❌ | ✅ |
| Team sharing | ❌ | ✅ |
| Offline access | ✅ | ❌ (planned) |
| Backups | Manual | Automatic |
| Cost | Free | Free tier + paid plans |
- All data is encrypted in transit (TLS 1.3)
- API keys can be rotated at any time
- Per-user data isolation
- No memory content is logged
- Documentation: https://memorygraph.dev/docs
- Issues: https://github.com/gregorydickson/memory-graph/issues
- Email: support@memorygraph.dev