
Deploy MemPalace Remote MCP Hub
Shared AI memory over MCP: token auth, local embeddings, no API keys
MemPalace
Just deployed
Deploy and Host MemPalace Remote MCP Hub on Railway
MemPalace is an open source AI memory system. Agents file what matters into a "palace" of wings, rooms and drawers, store it verbatim, and recall it later with semantic search and a temporal knowledge graph. This template runs it as a remote MCP server so every agent and teammate shares one memory over HTTPS.
About Hosting MemPalace Remote MCP Hub
Hosting MemPalace is a single container. This template runs the official ghcr.io/mempalace/mempalace:3.10.0 image with upstream's own network server command, mempalace serve --host 0.0.0.0 --port 8765, and a Railway volume at /data that holds the ChromaDB palace, the knowledge graph, the write ahead log and the cached embedding model. A bearer token is generated at deploy and required on every route except /healthz; without it the server refuses to start, so the memory store is never open to the internet. PORT is pinned to 8765 so the Railway healthcheck hits /healthz, RAILWAY_RUN_UID=0 lets the non root image write the root owned volume, and the idle watchdog that upstream uses to reap desktop sessions is turned off so the server stays up.
Common Use Cases
- Shared memory for coding agents: Claude Code, Cursor, Codex and other MCP clients read and write the same palace
- Long term memory across sessions: decisions, preferences and project facts survive restarts and machine changes
- Team knowledge base: one hub for a team, with verbatim storage instead of lossy summaries
- Agent coordination: the built in logstream lets agents hand tasks and patches to each other
- Memory backend for agents on Railway: OpenClaw, Hermes or your own agent in the same project
Dependencies for MemPalace Remote MCP Hub Hosting
- Railway volume at
/data(included) - No API keys: embeddings run locally on CPU with the
minilmONNX model, downloaded once (about 80 MB) on the first write - No database service: the default ChromaDB backend lives on the volume. Qdrant is an optional upgrade
Deployment Dependencies
- Remote / Team Server guide
- MCP integration and tools
- Configuration reference
- MemPalace GitHub repository
Implementation Details
The start command is docker-entrypoint.sh serve --host 0.0.0.0 --port 8765, the same command as upstream's deploy/docker-compose.server.yml. Key variables:
PORT=8765
MEMPALACE_MCP_HTTP_TOKEN=${{secret(32)}}
MEMPALACE_MCP_IDLE_HOURS=0
RAILWAY_RUN_UID=0
MEMPALACE_CONFIG_DIR=/data/.mempalace
MEMPALACE_EMBEDDING_MODEL=minilm
First steps after deploy
- Wait for
https:///healthzto returnok. - Copy
MEMPALACE_MCP_HTTP_TOKENfrom the service variables. - Connect Claude Code:
claude mcp add --transport http mempalace https:///mcp --header "Authorization: Bearer ". Other clients use the same URL and header. - Ask your agent to remember something. The first write downloads the embedding model, so give it up to a minute; later calls are fast.
Keep one replica: the palace has a single writer. The token grants full read and write access; set MEMPALACE_MCP_READ_ONLY=1 for a recall only server. Choose the embedding model before the first write, since switching later means rebuilding the index. About 300 MB of RAM is used once the model is loaded, so the Hobby plan is recommended.
Why Deploy MemPalace Remote MCP Hub on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying MemPalace Remote MCP Hub on Railway, you get a pinned, health checked, token protected memory server with persistent storage, managed TLS and private networking to the rest of your Railway project.
Template Content
MemPalace
ghcr.io/mempalace/mempalace:3.10.0