One endpoint. Your existing tools.
Connect the Palace CLI to your server, then register its MCP tools with supported coding clients.
ps_… token.Create your organization
For the initial setup, configure a one-time PALACE_BOOTSTRAP_TOKEN on the server and restart it. Send the bootstrap request using your real server address and organization details. The response includes an API key shown only once; store it securely.
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]"}'Point your CLI at the server
Install the palace CLI on each developer’s machine (install options ↗). Set the endpoint below to your deployment. The command prompts for the API token and stores it once in an owner-only config file, instead of in each client’s config.
palace remote set --endpoint https://palace.yourco.com
palace remote on
palace install
palace remote testRestart your coding client
Restart Cursor, Claude Code, Codex, or another supported MCP client so it reloads its configuration. The palace_* tools become available. Ask the agent to check Palace status and save a short project convention, then recall it in another session.
Use palace remote status to inspect the selected mode and endpoint. palace remote off returns the machine to local memory. Automatic recall hooks differ between clients.
Add your team
Shared memory only works when each developer has their own token. Give every person their own user and key, and never share one ps_… token between people or machines. Never paste tokens into chat, tickets, or recordings. The commands below use the admin key and org_id from the bootstrap response.
role and expires_in_days when you create one.ADMIN=ps_... # api_key from the bootstrap response
ORG=... # org_id from the bootstrap responseAdd a developer
Each user takes one licensed seat. The response contains the new user and their first API key. The token is shown only once, so send it to the developer through your password manager.
curl -sf -X POST https://palace.yourco.com/api/v1/admin/orgs/$ORG/users \
-H "Authorization: Bearer $ADMIN" -H "Content-Type: application/json" \
-d '{"email":"[email protected]","display_name":"Dev B","role":"developer","expires_in_days":60}'role defaults to developer. Other roles are owner, admin, security-auditor, maintainer, and read-only-agent. expires_in_days defaults to 60. To give an existing user another key, for a second machine for example, send {"name":"dev-b-laptop","user_id":"<user id>"} to POST /api/v1/admin/orgs/$ORG/api_keys.
The developer connects
On their own machine, the developer runs the same commands as in step 02 and pastes their own token when prompted. To read it from a password manager instead, pipe it in.
your-password-manager get palace-dev-b | palace remote set --endpoint https://palace.yourco.com
palace remote on
palace install
palace remote testIf two people test with the same token, you have not tested the team path. Memories and the audit trail record which user filed each one, and palace_audit_explain shows it.
List, revoke, and check seats
List keys to find a key id. The list never includes tokens. Revoking one key stops only that token; everyone else keeps working. Key creation, revocation, and new users are written to the audit log.
# Users and keys (metadata only, never tokens)
curl -s https://palace.yourco.com/api/v1/admin/orgs/$ORG/users -H "Authorization: Bearer $ADMIN"
curl -s https://palace.yourco.com/api/v1/admin/orgs/$ORG/api_keys -H "Authorization: Bearer $ADMIN"
# Revoke one key; that token gets HTTP 401 from then on
curl -sf -X DELETE https://palace.yourco.com/api/v1/admin/orgs/$ORG/api_keys/<key id> \
-H "Authorization: Bearer $ADMIN"
# Seats in use against your license
curl -s https://palace.yourco.com/admin/overview -H "Authorization: Bearer $ADMIN"Manual alternative: wire the MCP server URL yourself
Each client is 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.
Agent rules
MCP exposes the tools, and the rule file tells the agent when to use them. palace install writes it for you. To add it by hand, paste the block below into .cursor/rules/palace.mdc, CLAUDE.md, AGENTS.md, or .windsurf/rules/palace.md.
Palace 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).