MemHeaven
Bring MemPalace-style long-term memory to ChatGPT and remote AI agents.
MemHeaven is a self-hosted remote MCP memory server that gives hosted AI clients searchable long-term memory you own.
Self-host on Cloudflare without a VM, Docker, or database admin. Free-tier limits apply, and heavier usage may require paid Cloudflare usage.
Why external memory?
Project context, preferences, and prior decisions often disappear between chats and sessions.
Local-first memory tools are useful, but hosted tools like ChatGPT and other remote agents need a network-accessible memory layer.
MemHeaven is built for searchable, inspectable, deletable, portable memory that is not hidden behind a third-party SaaS memory product.
Works with hosted MCP clients
ChatGPT is the primary hosted-client target today. Other remote clients are documented honestly in the compatibility matrix as expected, experimental, or unknown until they are verified.
How it works
- Cloudflare Worker exposes OAuth endpoints and the remote
/mcpendpoint. - D1 stores metadata and indexes.
- R2 stores full drawer and diary bodies.
- Workers AI generates embeddings and Vectorize powers semantic search.
- Access keys gate consent and tenant-scoped tokens control what each user can see.
Inspiration and credits
MemHeaven is inspired by MemPalace, the open-source local-first AI memory project that helped show how useful verbatim, searchable long-term memory can be for AI agents.
With respect and thanks to the MemPalace project for the original memory model inspiration. MemPalace repository: github.com/mempalace/mempalace
Documentation
Fastest happy path for self-hosting your own instance.
Copy-paste guidance for when agents should read or write memory.