Open-source · MCP memory server · Apache-2.0

Sovereign memory for your MCP agents.

A self-hostable, production-grade memory server for MCP — row-versioned concurrent writes, principal-derived isolation, full audit. Runs in your own Postgres, and never phones home.

kosha · कोश — a sheath, a layer. Memory, held in living layers.
preview · coming soon
# run Kosha against your own Postgres
services:
  kosha:
    image: ghcr.io/kosha-mcp/kosha:latest
    ports: ["7070:7070"]
    environment:
      DATABASE_URL: postgres://…@db:5432/kosha
    restart: unless-stopped
// point your MCP client at Kosha
{
  "mcpServers": {
    "kosha": {
      "url": "http://localhost:7070"
    }
  }
}
Why Kosha

Writes that never clobber

Two-call commits guarded by a row-version. No lost updates, even under heavy concurrency.

Isolation by default

Access is principal-derived — every caller sees only its own memory. No manual scoping, no leaks.

Pagination that holds

Opaque, spec-compliant cursors. Stable across writes, with no internals leaked to the client.

One scoped table

One table with a scope enum — not a schema you outgrow. Simple to reason about, simple to operate.

And the essentials, done properly — an audit log with diffs · quotas & rate limits.
How it fits
Your MCP agents Claude · Cursor · custom Kosha row-version guard principal-scoped · audited Your Postgres your infrastructure MCP SQL
Self-hosted by default — runs on your infrastructure, against your own database. No external telemetry; it never phones home.
Writes that never clobber — proven
1 propose client → write 2 version Kosha → row_version v 3 commit · v client confirms with v version guard match → write ✓ stale → reject ⟲
Two calls, one guard — a write commits only if the row-version is unchanged. A stale writer is rejected, never silently lost.
Built to be trusted
Apache-2.0 Self-hostable MCP-spec compliant GDPR / DPDP / CCPA-ready Backups & PITR Circuit breakers Observability built in

Run it yourself — or let us host it.

Hosted Kosha is on the way. Leave your email and we'll tell you the moment it's ready.

Early-access sign-up opens shortly — the door's open, the list is next.