🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@shodh/memory-mcp

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shodh/memory-mcp

MCP server for persistent AI memory - store and recall context across sessions

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

Shodh-Memory

Shodh-Memory MCP Server

v0.1.90 | Persistent cognitive memory for AI agents

npm License

Documentation | GitHub | Python SDK | Rust Crate

Features

  • Cognitive Architecture: 3-tier memory (working, session, long-term) based on Cowan's model
  • Hebbian Learning: "Neurons that fire together wire together" - associations strengthen with use
  • Semantic Search: Find memories by meaning using MiniLM-L6 embeddings
  • Knowledge Graph: Entity extraction and relationship tracking
  • Memory Consolidation: Automatic decay, replay, and strengthening
  • Idempotent: Content-hash dedup — identical memories are never stored twice
  • 1-Click Install: Auto-downloads native server binary for your platform
  • Offline-First: All models auto-downloaded on first run (~38MB total), no internet required after
  • Fast: <200ms API response, sub-millisecond graph lookup, 30-50ms semantic search
  • GTD Task Management: Full todo system with projects, subtasks, comments, and reminders

Installation

Add to your MCP client config:

Claude Desktop / Claude Code (claude_desktop_config.json):

{
  "mcpServers": {
    "shodh-memory": {
      "command": "npx",
      "args": ["-y", "@shodh/memory-mcp"],
      "env": {
        "SHODH_API_KEY": "your-api-key-here"
      }
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Codex CLI (.codex/config.toml):

[mcp_servers.shodh-memory]
startup_timeout_sec = 60
command = "npx"
args = ["-y", "@shodh/memory-mcp"]
env = { SHODH_API_KEY = "your-api-key-here" }

Note: First run downloads the server binary (~15MB) plus embedding model (~23MB). The startup_timeout_sec = 60 ensures enough time for initial setup.

For Cursor/other MCP clients: Similar configuration with the npx command.

Environment Variables

VariableDescriptionDefault
SHODH_API_KEYRequired. API key for authentication-
SHODH_API_URLBackend server URLhttp://127.0.0.1:3030
SHODH_USER_IDUser ID for memory isolationclaude-code
SHODH_NO_AUTO_SPAWNSet to true to disable auto-starting the backendfalse
SHODH_STREAMEnable/disable streaming ingestiontrue
SHODH_PROACTIVEEnable/disable proactive memory surfacingtrue

MCP Tools (47 total)

Memory — Store, search, and manage memories
ToolDescription
rememberStore a memory with optional type, tags, and metadata
recallSemantic search to find relevant memories
proactive_contextAuto-surface relevant memories for current context
context_summaryGet categorized context for session bootstrap
list_memoriesList all stored memories
read_memoryRead full content of a specific memory by ID
forgetDelete a specific memory by ID
reinforceReinforce a memory (boost importance)
Todos (GTD) — Task management with projects and subtasks
ToolDescription
add_todoCreate a task with priority, due date, project, contexts
list_todosList/search todos with semantic or GTD-style filtering
update_todoUpdate task properties (status, priority, notes)
complete_todoMark a task as done (auto-creates next for recurring)
delete_todoPermanently delete a task
reorder_todoMove a task up or down within its status group
list_subtasksList subtasks of a parent todo
add_todo_commentAdd a comment to a task (progress, resolution)
list_todo_commentsList all comments on a task
update_todo_commentEdit an existing comment
delete_todo_commentDelete a comment
todo_statsGet todo statistics by status, overdue items
Projects — Organize todos into groups
ToolDescription
add_projectCreate a project with optional parent (sub-projects)
list_projectsList all projects with todo counts
archive_projectArchive a project (hidden but restorable)
delete_projectPermanently delete a project
Reminders — Time, duration, and context-triggered reminders
ToolDescription
set_reminderSet a reminder (time, duration, or keyword trigger)
list_remindersList pending/triggered/dismissed reminders
dismiss_reminderAcknowledge a triggered reminder
System — Health, backups, and diagnostics
ToolDescription
memory_statsGet statistics about stored memories
verify_indexCheck vector index integrity
repair_indexRe-index orphaned memories
token_statusGet current session token usage
reset_token_sessionReset token counter for new session
consolidation_reportView memory consolidation activity
backup_createCreate a backup of all memories
backup_listList available backups
backup_verifyVerify backup integrity (SHA-256)
backup_restoreRestore from a backup
backup_purgePurge old backups, keep most recent N

REST API (for Developers)

The server exposes a REST API at http://127.0.0.1:3030:

// Store a memory
const res = await fetch("http://127.0.0.1:3030/api/remember", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "your-api-key"
  },
  body: JSON.stringify({
    user_id: "my-app",
    content: "User prefers dark mode",
    memory_type: "Observation",
    tags: ["preferences", "ui"]
  })
});

// Semantic search
const results = await fetch("http://127.0.0.1:3030/api/recall", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-Key": "your-api-key"
  },
  body: JSON.stringify({
    user_id: "my-app",
    query: "user preferences",
    limit: 5
  })
});

Key Endpoints

EndpointMethodDescription
/healthGETHealth check
/api/rememberPOSTStore a memory
/api/recallPOSTSemantic search
/api/recall/tagsPOSTSearch by tags
/api/recall/datePOSTSearch by date range
/api/memoriesPOSTList all memories
/api/memory/{id}GET/PUT/DELETECRUD operations
/api/context_summaryPOSTGet context summary
/api/relevantPOSTProactive context surfacing
/api/batch_rememberPOSTStore multiple memories
/api/upsertPOSTCreate or update by external_id
/api/graph/{user_id}/statsGETKnowledge graph statistics
/api/consolidation/reportPOSTMemory consolidation report
/api/index/verifyPOSTVerify index integrity
/metricsGETPrometheus metrics

Cognitive Features

Hebbian Learning

Memories that are frequently accessed together form stronger associations. The system automatically:

  • Forms edges between co-retrieved memories
  • Strengthens connections with repeated co-activation
  • Enables Long-Term Potentiation (LTP) for permanent associations

Memory Consolidation

Background processes maintain memory health:

  • Decay: Unused memories gradually lose activation
  • Replay: High-value memories are periodically replayed
  • Pruning: Weak associations are removed
  • Promotion: Important memories move to long-term storage

3-Tier Architecture

Based on Cowan's working memory model:

  • Working Memory: Recent, highly active memories
  • Session Memory: Current session context
  • Long-Term Memory: Persistent storage with vector indexing

How It Works

  • Install: npx -y @shodh/memory-mcp downloads the package
  • Auto-spawn: On first run, downloads the native server binary (~15MB) and embedding model (~23MB)
  • Connect: MCP client connects to the server via stdio
  • Ready: Start using remember and recall tools

The backend server runs locally and stores all data on your machine. No cloud dependency.

Usage Examples

"Remember that the user prefers Rust over Python for systems programming"
"Recall what I know about user's programming preferences"
"What context do you have about this project?"
"List my recent memories"
"Show me the consolidation report"

Platform Support

PlatformArchitectureStatus
Linuxx64Supported
macOSx64Supported
macOSARM64 (M1/M2)Supported
Windowsx64Supported
  • Python SDK: pip install shodh-memory - Native Python bindings
  • Rust Crate: cargo add shodh-memory - Use as a library

License

Apache-2.0

Keywords

mcp

FAQs

Package last updated on 09 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts