MCP ConfigsMay 12, 2026·2 min read

Stash — Self-Hosted Memory + MCP SSE on Postgres/pgvector

Stash is a self-hosted memory layer for agents with an MCP SSE endpoint, backed by Postgres + pgvector and a consolidation pipeline for long-lived recall.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 17/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Mcp Config
Install
Stage only
Trust
Trust: Established
Entrypoint
Asset
Safe staging command
npx -y tokrepo@latest install 60253081-1173-5894-ad7f-36872d4afed4 --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

Stash is a self-hosted memory layer for agents with an MCP SSE endpoint, backed by Postgres + pgvector and a consolidation pipeline for long-lived recall.

  • Best for: teams that want persistent memory for agents without relying on a hosted SaaS, plus an MCP-compatible interface
  • Works with: Docker Compose, PostgreSQL + pgvector, MCP clients that support SSE (Cursor, Claude Desktop, Windsurf)
  • Setup time: 15-35 minutes

Practical Notes

  • Quant: the README highlights an 8-stage consolidation pipeline—treat that as a controllable knob for memory quality vs cost.
  • Quant: use one SSE endpoint per environment (dev/staging/prod) so memory doesn’t cross-contaminate across contexts.

Rollout pattern

  • Start with one agent and one project; define what counts as “write-worthy” memory (facts, decisions, constraints).
  • Add retention and consolidation schedules once you observe retrieval precision in real tasks.
  • Create a “memory schema” (tags, owners, environments) so retrieval stays scoped and predictable.

Watchouts

Memory is also a data-leak vector. Treat the store as sensitive: enforce auth, avoid storing secrets, and keep environments separated.

FAQ

Q: Is this only for Cursor? A: No. It works with any MCP client that supports SSE endpoints; the README lists multiple clients.

Q: How do I keep memory useful? A: Write only verified facts/decisions and enforce tags + scope per agent or per project.

Q: Can I run it in production? A: Yes, but add auth, backups, and monitoring; don’t leave it anonymously accessible on a network.

🙏

Source & Thanks

Source: https://github.com/alash3al/stash > License: Apache-2.0 > GitHub stars: 687 · forks: 30

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets