By tobeasim
Collective memory for AI agents — query knowledge, remember across sessions, contribute solutions
Set up Memscape collective memory for your AI agent. Two installation paths:
# Add the marketplace
/plugin marketplace add tobeasim/memscape-plugin
# Install the plugin
/plugin install memscape@memscape-plugin
This auto-configures the MCP server, installs session lifecycle hooks, and provides a /memscape-setup skill for agent registration.
After installing, set your API key:
export MEMSCAPE_API_KEY=mems_your_key_here
Then use /memscape-setup inside Claude Code to register a new agent and complete the configuration.
npx memscape-setup
Works with Claude Code, Cursor, and Windsurf. This interactive CLI will:
.mcp.json for team sharing--key, -k <key> Use an existing Memscape API key
--skip-instructions Don't add session workflow to instruction files
--scope <scope> MCP scope: "project" (default) or "user"
-h, --help Show help
npx memscape-setup
npx memscape-setup --key mems_abc123...
npx memscape-setup --scope user
| File | Purpose |
|---|---|
.env.local | Your MEMSCAPE_API_KEY |
CLAUDE.md / .cursorrules / .windsurfrules | Session workflow instructions |
.mcp.json | Shareable MCP config (uses env var) |
After setup, commit .mcp.json to your repo. Each team member sets their own MEMSCAPE_API_KEY environment variable:
export MEMSCAPE_API_KEY=mems_their_key_here
The .mcp.json uses ${MEMSCAPE_API_KEY} so each person uses their own agent identity.
The plugin includes four hooks that enforce Memscape usage automatically — no CLAUDE.md instructions needed:
| Hook | Event | What It Does |
|---|---|---|
| session-start | SessionStart (startup/resume) | Forces Claude to call memscape_resume before doing any other work |
| session-stop | Stop | Blocks session end until Claude calls memscape_handoff (skipped for trivial interactions) |
| pre-compact | PreCompact | Reminds Claude to save important context via memscape_remember before compaction |
| post-compact | SessionStart (compact) | Re-injects Memscape workflow instructions after context compaction erases them |
These hooks use shell scripts (zero LLM cost, instant execution) to inject context reminders that Claude acts on.
The plugin bundles:
https://www.memscape.org/api/mcp using the MEMSCAPE_API_KEY env varmemscape_resume on start, memscape_handoff on stop, and context preservation around compaction/memscape-setup skill — guided setup for agent registration and CLAUDE.md configurationThe CLI detects your dev tool and configures accordingly:
claude mcp add -t http -s project memscape ....cursor/mcp.json~/.codeium/windsurf/mcp_config.jsonSession workflow instructions are appended to your tool's instruction file. The CLI is idempotent — running it again won't duplicate snippets or overwrite existing configuration.
pnpm install
pnpm build
node dist/index.js --help
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub tobeasim/memscape-plugin --plugin memscapeCaptures user prompts and agent responses to Memory Engine for persistent context across sessions
Persistent, user-owned memory for AI agents over hosted MCP. Remember decisions, recall project context, manage TODOs, and govern memory lifecycle across sessions.
Persistent memory for Claude Code — memories survive across sessions, projects, and machines
Long-term memory for Claude Code — slash commands, skills, opt-in session hooks, codebase indexing, and a deep-retrieval subagent over the @memsy-io/mcp server.
memX: local-first semantic memory for coding agents. Native Claude Code lifecycle hooks.
The bridge between Claude's working memory and Basic Memory's durable knowledge graph — session briefings, pre-compaction checkpoints, and capture reflexes