memoryai-mcp
v2.2.0
Published
MCP server for MemoryAI v2.0 — One brain. ∞ agents. Forever. Adds Brain Export/Import (vendor-neutral bundles), Public Benchmark (smart recall vs full context), Trust Graph (per-agent reputation), Cognitive Twin (simulate user voice). Plus the v1.5 base:
Readme
memoryai-mcp
MCP server for MemoryAI — a living brain for your AI agent.
Your AI agent gets persistent memory that works like a real brain:
- Remembers what matters, forgets what doesn't
- Strengthens memories you use often (Hebbian learning)
- Consolidates knowledge while idle (Sleep cycles)
- Protects core identity (DNA memories never fade)
- Adapts to your emotional state
Install once. Everything auto from there.
Quick Start (2 minutes)
1. Get an API Key
curl -X POST https://memoryai.dev/v1/admin/provision \
-H "Content-Type: application/json" \
-d '{"name": "my-agent", "tos_accepted": true}'Save the api_key from the response. You'll need it below.
2. Pick Your IDE/Tool
Choose your platform below. Config once — memory works automatically forever.
IDE Setup
Claude Code (CLI) — ~/.claude/settings.json
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Then create ~/.claude/CLAUDE.md for auto-bootstrap:
## Memory Protocol
At the start of every conversation, call `memory_bootstrap` to load context from MemoryAI.
Before context gets large (>100K tokens), call `memory_compact` to save important context.
Use `memory_store` to save important decisions, preferences, and facts.
Use `memory_recall` to search past memories when relevant.Cursor — ~/.cursor/mcp.json
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Auto-bootstrap — create .cursor/rules/memoryai.mdc:
At the start of every session, call memory_bootstrap to load context.
After completing tasks, call memory_compact to save context.
Store important decisions and preferences with memory_store.VS Code — .vscode/mcp.json
{
"servers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Kiro — .kiro/settings/mcp.json
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Windsurf — ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Claude Desktop — claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Antigravity — ~/.antigravity/mcp.json
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Any MCP-compatible tool
{
"mcpServers": {
"memoryai": {
"command": "npx",
"args": ["-y", "memoryai-mcp"],
"env": {
"HM_ENDPOINT": "https://memoryai.dev",
"HM_API_KEY": "hm_sk_your_key_here"
}
}
}
}Auto-Bootstrap (Make It Fully Automatic)
After MCP config, add a system rule so your agent auto-loads memory every session:
| Platform | Rule File | Content |
|----------|-----------|---------|
| Claude Code | ~/.claude/CLAUDE.md | See above |
| Cursor | .cursor/rules/memoryai.mdc | See above |
| Kiro | .kiro/rules/memoryai.md | Same content |
| Windsurf | .windsurfrules | Same content |
| VS Code | .github/copilot-instructions.md | Same content |
Rule content (copy-paste for any platform):
## Memory Protocol
At the start of every conversation, call `memory_bootstrap` to load context from MemoryAI.
Before context gets large, call `memory_compact` to save important context.
Use `memory_store` to save important decisions, preferences, and facts.
Use `memory_recall` to search past memories when relevant.How It Works
Open IDE → MCP auto-connects → Agent reads rules → Calls bootstrap
→ Loads your identity, preferences, recent work
→ Works normally (auto-stores important stuff)
→ Context getting full? Auto-compacts
→ Close IDE → Sleep workers consolidate overnight
→ Open IDE next day → Bootstrap loads everything back
→ Cycle repeats. Memory grows smarter over time.You do nothing. The agent handles everything automatically.
Tools Available
| Tool | What It Does |
|------|-------------|
| memory_bootstrap | Wake up with full context (identity + recent + preferences) |
| memory_store | Save a memory (fact, decision, preference, identity) |
| memory_recall | Search memories by meaning (semantic + graph + FTS) |
| memory_compact | Save conversation context before it's lost |
| memory_recover | Recover session after a break |
| memory_health | Check context pressure (safe/warning/critical) |
| memory_explore | Explore connections between memories |
| memory_clusters | View topic clusters in your knowledge graph |
| learn | Store action + result + lesson learned |
| entity_list | List tracked entities (files, people, packages) |
| reasoning_store | Deep reasoning memory (Pro+) |
| reasoning_recall | Recall reasoned insights (Pro+) |
| snapshot_create | Backup memory state |
| snapshot_restore | Restore from backup |
Context Guard (Built-in)
Context Guard monitors your session and prevents context loss:
| State | Meaning | Agent Action | |-------|---------|-------------| | SAFE | Context < 40% full | Continue normally | | COMPACT_SOON | Context 40-55% full | Prepare to compact | | COMPACT_NOW | Context > 55% full | Must compact immediately |
The agent handles this automatically when rules are configured. No manual intervention needed.
What Gets Remembered (DNA System)
| Memory Type | Example | Persistence |
|-------------|---------|-------------|
| preference | "I prefer Python over Java" | Forever (DNA-protected) |
| decision | "Chose PostgreSQL for this project" | Forever (DNA-protected) |
| identity | "Senior backend engineer, 10 years" | Forever (DNA-protected) |
| fact | "API endpoint is /v1/users" | Decays if unused |
| goal | "Launch v2.0 by June" | Decays if unused |
DNA memories (preference/decision/identity) never decay, never get deleted, never get overwritten by any background process. They define who you are.
Pricing
| Plan | Features | Price | |------|----------|-------| | Free | Basic store/recall, 100 memories | Free | | Pro | Full brain (reasoning, consolidation, personality) | Paid | | ProMax | Multi-agent mesh, advanced features | Paid | | God | Everything + deep graph traversal | Internal |
Get started free: https://memoryai.dev
Links
- Website: https://memoryai.dev
- Python SDK:
pip install hmc-memory - npm MCP:
npx memoryai-mcp - GitHub: https://github.com/memoryai-dev/memoryai
License
MIT
