Everything you need to get Palace Server running on your own infrastructure. For the open-source core, see palace-rs on GitHub.
Grab the starter kit, add your license key, and start:
curl -fsSLO https://github.com/AncientiCe/public-server-dist/releases/latest/download/palace-server-starter-kit.zip unzip palace-server-starter-kit.zip && cd starter-kit cp .env.example .env && $EDITOR .env # paste your license key docker compose up -d # palace-server + postgres on :8080
Install the static binary and point it at your Postgres:
curl -fsSL https://palacememory.com/install-server | sh export PALACE_LICENSE_KEY=... export DATABASE_URL=postgres://palace:***@localhost/palace export PALACE_JWT_SECRET=$(openssl rand -hex 32) palace-server # migrations apply on startup; listens on :8080
Palace Server is configured entirely via environment variables:
PALACE_LICENSE_KEY — Yes · Ed25519-signed license key issued at checkout; verified offline.DATABASE_URL — Yes · Postgres (pgvector) connection string for persistent storage.PALACE_JWT_SECRET — Yes · Secret for signing session tokens; use a long random value.PALACE_SERVER_BIND — No · TCP bind address. Defaults to 0.0.0.0:8080.Palace Server speaks the Model Context Protocol (MCP). Your license key stays on the server — clients authenticate with a separate API key (ps_…).
1. Mint an API key. Set a one-time bootstrap token on the server (add PALACE_BOOTSTRAP_TOKEN to your .env and restart), then request a key:
curl -X POST https://palace.yourco.com/bootstrap \
-H "X-Bootstrap-Token: $PALACE_BOOTSTRAP_TOKEN" \
-H "Content-Type: application/json" \
-d '{"org_name":"Your Co","org_slug":"yourco","admin_email":"[email protected]"}'
# response includes "api_key": "ps_…" — store it; it is shown only once2. Connect your clients with the palace CLI. Install the palace binary once, point it at your server, and let it wire up every AI client for you — no JSON to hand-edit:
brew install AncientiCe/palace/palace # or: curl -fsSL https://raw.githubusercontent.com/AncientiCe/palace-rs/main/scripts/install.sh | sh palace remote set --endpoint https://palace.yourco.com # prompts for your ps_ API key palace remote on # route MCP to the shared server palace install --all # register palace for Cursor, Codex, Claude Code & Desktop palace remote test # verify auth + list available tools
One palace install --all covers every supported client, and the API key is stored once (owner-only ~/.palace/config.json) instead of in each client's config. Restart your client and the palace_* tools appear. To switch a machine back to its local palace, run palace remote off (or palace local); palace remote status shows the current mode, endpoint, and masked key.
Prefer to edit client config directly? Each client is just a URL plus a bearer header. For Cursor (~/.cursor/mcp.json):
{
"mcpServers": {
"palace": {
"url": "https://palace.yourco.com/mcp",
"headers": { "Authorization": "Bearer ps_your_api_key" }
}
}
}Claude Code (~/.claude.json) and Windsurf use the same mcpServers shape; Codex (~/.codex/config.toml) uses the equivalent [mcp_servers.palace] table with url and headers.
Palace Server keeps a tenant-scoped wings registry — the source of truth for which workspaces exist in your organization. Each wing has a kind (project or topic) and a description. Wings auto-register the first time an agent writes a memory, and existing memories are backfilled lazily per tenant, so upgrading from an earlier release needs no manual setup.
palace_project_status — reports whether the current repo is a known project, a registered-but-unmined wing, or unknown, with a recommendation.palace_create_wing — declares a topic or project wing on demand (handy for non-repo users such as PMs or sales). A wing can be promoted from topic to project but never demoted.palace_list_wings — returns the full registry with per-wing drawer counts.On the local palace-rs CLI these are joined by palace wings (list registered wings) and palace_mine for on-demand mining of a code repository.
MCP exposes the tools, but your agent won't use them consistently unless you tell it to. Paste the rules below into your tool's rule file so every session reaches for Palace before repeating work:
.cursor/rules/palace.mdc (or project AGENTS.md)CLAUDE.mdAGENTS.md.windsurf/rules/palace.mdPalace Memory Protocol: - At session start, call palace_status and palace_session_context. - Before answering about prior decisions, preferences, people, projects, commands, or "what happened last time", call palace_search (and palace_kg_query for stable facts) BEFORE code search. - Use code search first only for current source symbols, exact definitions, and implementation details that may have changed. - Cite provenance: organization/project/repo/source, memory id, score, and visibility reason. - After substantive work, call palace_diary_write, and add durable facts with palace_kg_add (use palace_kg_invalidate when facts change).
For install commands, supported platforms, and common troubleshooting steps, see the self-hosted deployment guide. Still stuck? Reach us through the contact form.