
Security News
Insecure Agents Podcast: How to Keep AI Agents From Bypassing Security Controls
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.
@memstack/mcp
Advanced tools
MCP server for MemStack — persistent AI agent memory via the Model Context Protocol.
npm install -g @memstack/mcp
Add to your MCP client config (~/.claude/mcp.json or .cursor/mcp.json):
{
"mcpServers": {
"memstack": {
"command": "npx",
"args": ["-y", "@memstack/mcp"],
"env": {
"MEMSTACK_STORAGE": "memory",
"OPENAI_API_KEY": "sk-..."
}
}
}
}
All configuration is via environment variables. No config files needed.
| Variable | Values | Default |
|---|---|---|
MEMSTACK_STORAGE | memory, disk, markdown, postgres, sqlite, redis | memory |
In-memory (default — testing only, data lost on restart):
MEMSTACK_STORAGE=memory
Disk (JSON file per actor):
MEMSTACK_STORAGE=disk
MEMSTACK_DIR=/Users/me/.memstack
Markdown (zero infra, human-readable):
MEMSTACK_STORAGE=markdown
MEMSTACK_DIR=/Users/me/.memstack
Postgres (production):
MEMSTACK_STORAGE=postgres
DATABASE_URL=postgresql://user:pass@localhost/memstack
Redis:
MEMSTACK_STORAGE=redis
REDIS_URL=redis://localhost:6379
SQLite:
MEMSTACK_STORAGE=sqlite
SQLITE_PATH=./memory.db
| Variable | Purpose |
|---|---|
OPENAI_API_KEY | OpenAI LLM (default) |
ANTHROPIC_API_KEY | Anthropic (summarization) |
At least one of OPENAI_API_KEY or ANTHROPIC_API_KEY must be set. If both are set, Anthropic is preferred for summarization.
| Variable | Purpose |
|---|---|
OPENAI_API_KEY | OpenAI embeddings |
Without embedding config, retrieval falls back to keyword + importance search.
The MCP server exposes these tools to the agent:
| Tool | Description |
|---|---|
memory_process | Store with auto-enrichment (importance, tags) |
memory_store | Store a memory |
memory_retrieve | Retrieve memories by query, strategy, time range |
memory_compile_context | Assemble token-budgeted LLM-ready context |
memory_summarize | Compress old interactions via LLM |
memory_prune | Remove stale/low-importance memories |
memory_purge_actor | Delete all memories for an actor |
memory_merge | Merge multiple memories into one |
memory_stats | Memory diagnostics (counts, types, importance) |
memory_delete | Delete a single memory |
memory_health | Check storage/LLM/embedding connectivity |
memory_dry_run_prune | Preview what would be pruned |
| URI | Description |
|---|---|
memory://{actorId}/context | Compiled LLM context as markdown |
memory://{actorId}/stats | Actor memory stats as JSON |
| Prompt | Description |
|---|---|
memory_context | Auto-injected memory context for current actor |
By default, all memories belong to the "default" actor. Set MEMSTACK_ACTOR to identify the agent:
MEMSTACK_ACTOR=my-agent
This keeps memory isolated per agent. The agent can also override the actor with actorId in any tool call.
cd packages/mcp
pnpm build && pnpm check && pnpm test
npm publish --access public
After publishing, users install with:
npm install -g @memstack/mcp
MIT
FAQs
MCP server for MemStack — AI agent memory via Model Context Protocol
The npm package @memstack/mcp receives a total of 50 weekly downloads. As such, @memstack/mcp popularity was classified as not popular.
We found that @memstack/mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Socket CTO Ahmad Nassri discusses how to keep AI agents from bypassing package blocks, limit credential access, and monitor their actions.

Security News
GPT-6 Astra tried to plant malicious code in simulated open source projects using fake GitHub accounts and deceptive PRs during an assigned CTF challenge.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.