MemoSift

memosift CLI.

Authentication, Claude Code integration, project management, API keys, and hook handlers. 10 commands total.

terminal
pip install memosift

Authentication

1 command

memosift login

Authenticate to MemoSift cloud. Saves credentials to ~/.memosift/config.json for all subsequent commands.

ArgumentRequiredDescription
--api-key <KEY>optionalAPI key to save. If omitted, prompts interactively.
--base-url <URL>optionalOverride the default API base URL.
terminal
$ memosift login --api-key msk_live_abc123
Saved API key to ~/.memosift/config.json

Claude Code

2 commands

memosift install-claude-code

Writes MCP server config into Claude Code's ~/.claude/settings.json. One command to wire MemoSift into your Claude Code environment.

terminal
$ memosift install-claude-code
MemoSift MCP server added to Claude Code settings.

memosift serve

Runs the MCP server over stdio transport. Exposes 4 tools: memosift_recall, memosift_explore, memosift_fetch, memosift_compress. Used by Claude Code, Cursor, or any MCP client.

terminal
$ memosift serve
MemoSift MCP server running on stdio...
Exposing 4 tools: memosift_recall, memosift_explore, memosift_fetch, memosift_compress

Project Management

1 command

memosift project create <name>

Create a new MemoSift project. Returns the project ID for use with other commands.

ArgumentRequiredDescription
<name>requiredName for the new project.
terminal
$ memosift project create my-app
Created project: my-app (id: proj_abc123)

API Keys

1 command

memosift key create

Create a new API key. Prompts for project_id interactively. The key is shown once on creation -- save it immediately.

ArgumentRequiredDescription
--scope {own|project}optionalKey scope. "own" for personal, "project" for shared. Defaults to "own".
--name <NAME>optionalHuman-readable label. Defaults to "Default".
terminal
$ memosift key create --name "production"
Project ID: proj_abc123
Created key: msk_live_... (shown once, save it)

Usage

2 commands

memosift usage

Show current usage metrics and rate limits for a project. Prompts for project_id interactively.

ArgumentRequiredDescription
project_idrequiredProject ID (prompted interactively)
terminal
$ memosift usage
Project ID: proj_abc123
Turns this minute: 12 / 60
Recalls this minute: 45 / 120

memosift sessions

List all sessions for a project. Prompts for project_id interactively.

ArgumentRequiredDescription
project_idrequiredProject ID (prompted interactively)
terminal
$ memosift sessions
Project ID: proj_abc123
ID          State    Turns  Last Turn
s1          active   25     2026-04-18 14:30
s2          closed   12     2026-04-17 09:15

Hooks

3 commands

memosift hook post-tool-use

PostToolUse handler for Claude Code's hook system. Intercepts tool results for classification, scanning, and storage. Not called directly by users.

terminal
$ memosift hook post-tool-use
# Called by Claude Code PostToolUse hook
# Reads tool result from stdin, intercepts, returns JSON

memosift hook pre-compact

PreCompact handler. Archives the full transcript before Claude Code runs context compaction. Not called directly by users.

terminal
$ memosift hook pre-compact
# Called by Claude Code PreCompact hook
# Archives full transcript before compaction

memosift hook session-start

SessionStart handler. Loads prior memories and project context when a new Claude Code session begins. Not called directly by users.

terminal
$ memosift hook session-start
# Called by Claude Code SessionStart hook
# Loads prior memories as additionalContext

Full Claude Code Configuration

Complete ~/.claude/settings.json with all hooks and the MCP server. Running memosift install-claude-code sets up the MCP server entry automatically.

~/.claude/settings.json
{
  "hooks": {
    "PostToolUse": [
      { "command": "memosift hook post-tool-use", "timeout": 5000 }
    ],
    "PreCompact": [
      { "command": "memosift hook pre-compact", "timeout": 10000 }
    ],
    "SessionStart": [
      { "command": "memosift hook session-start", "timeout": 10000 }
    ]
  },
  "mcpServers": {
    "memosift": {
      "transport": "stdio",
      "command": "memosift",
      "args": ["serve"]
    }
  }
}

MCP Server Config

The MCP server entry added by install-claude-code. Works with Claude Code, Cursor, or any MCP-compatible client.

mcpServers
{
  "memosift": {
    "transport": "stdio",
    "command": "memosift",
    "args": ["serve"]
  }
}

EXPOSED TOOLS

memosift_recall

Search memories by query, intent version, or turn snapshot.

memosift_explore

Walk entity graph connections from a known item.

memosift_fetch

Download full artifact content with metadata.

memosift_compress

Assemble structured session context. No LLM, <50ms.