Self-hosted long-term memory for ChatGPT and AI agents
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.
When MemHeaven fits
Connect ChatGPT to your deployment when you need it to search decisions, preferences, notes, and other durable context across chats.
Use a remote MCP endpoint when hosted clients cannot depend on a laptop-local memory service.
Keep stored context in your own Cloudflare account with tenant-scoped access, searchable retrieval, and deletion tools.
Self-hosted ChatGPT memory over remote MCP
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.
ChatGPT long-term memory, under your control
Connect ChatGPT to your own MemHeaven /mcp endpoint. ChatGPT can then use its memory tools for searchable context that persists across chats and sessions.
No. MemHeaven is a separate, inspectable memory layer that you deploy and control. It complements ChatGPT's built-in memory rather than replacing or changing it.
You deploy the Worker and its storage bindings in your own Cloudflare account. There is no shared public MemHeaven instance; free-tier limits and service constraints still apply.
External memory, not a replacement for ChatGPT memory
MemHeaven does not change ChatGPT's built-in memory. It is a separate MCP service that your client can call for context you store in your own deployment.
There is no shared public MemHeaven instance. You operate the Worker, storage bindings, OAuth configuration, and access keys in your own Cloudflare account.
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.