@0xmemorylayer/mcp
v1.0.0
Published
MCP server that gives any AI tool persistent memory and automation access via the Memory Layer API
Maintainers
Readme
@memorylayer/mcp
An MCP (Model Context Protocol) server that gives any AI tool persistent memory and automation access via the Memory Layer API.
When an AI tool connects this MCP server, it gets session lifecycle management, persistent memory storage, corrections, handoffs, cross-session continuity, and full automation control — without needing any additional plugin.
Quick Start
Add this to your Claude Desktop MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"memorylayer": {
"command": "npx",
"args": ["-y", "@memorylayer/mcp"],
"env": {
"MEMORYLAYER_API_KEY": "ml_your_key_here"
}
}
}
}Environment Variables
| Variable | Required | Description |
|---|---|---|
| MEMORYLAYER_API_KEY | Yes | Your Memory Layer API key (ml_...) |
| MEMORYLAYER_API_BASE | No | Custom API base URL (advanced) |
Tools
Session Lifecycle
start_session — Start a persistent memory session. Loads project context, last handoff, corrections, and memory entries. Call at the beginning of every conversation.
end_session — End the active session with a handoff note. The handoff is what the next session sees.
Memory Operations
remember — Save information to persistent memory mid-session.
recall — Retrieve memories from cached session data, optionally filtered by scope and type.
Context Access
get_handoff — Get the handoff note from the previous session ("what should I do next?").
get_corrections — Get active corrections that override conflicting context.
get_project_info — Get project name, tier, and session count.
Status
memory_status — Check current session state: active session, session ID, memory count, active scopes.
Automations
ml_list_automations — List all automations in your account with their IDs, names, and status.
ml_trigger_automation — Trigger a specific automation by UUID. Returns a run_id for tracking.
ml_get_run_status — Check the status and output of a specific automation run.
ml_list_runs — List recent automation run history, optionally filtered to a specific automation.
Agent Sync (Hub)
sync_agent_install — Register a locally-installed agent with the Memory Layer hub dashboard.
log_agent_run — Log a completed agent run to the hub's Run History dashboard.
How It Works
- Start a conversation → AI calls
start_session→ gets project context + last handoff - Do work → AI calls
rememberto save knowledge mid-session - End the conversation → AI calls
end_sessionwith a handoff note - Start a NEW conversation → AI calls
start_session→ gets the handoff from step 3
That's persistent memory across conversations, powered by the Memory Layer API, delivered via MCP.
License
MIT
