One endpoint. Your existing tools.

Connect the Palace CLI to your server, then register its MCP tools with supported coding clients.

Your server license and your developer API token are different credentials. The license stays on the server. Clients authenticate with a separate ps_… token.
01

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.

Bootstrap request · replace example values
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]"}'
02

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.

Connect the local CLI
palace remote set --endpoint https://palace.yourco.com
palace remote on
palace install
palace remote test
03

Restart 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.

Adding users, listing keys, and the role and expiry defaults need Palace Server v0.8.0 or newer. On v0.7.0, every key belongs to the admin user, so always send role and expires_in_days when you create one.
Keep the admin key and org id in your shell
ADMIN=ps_...   # api_key from the bootstrap response
ORG=...        # org_id from the bootstrap response
04

Add 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.

Add a user and issue their first key
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.

05

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.

Connect with a piped token
your-password-manager get palace-dev-b | palace remote set --endpoint https://palace.yourco.com
palace remote on
palace install
palace remote test

If 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.

06

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.

Manage users, keys, and seats
# 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):

~/.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
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).