Palace (palace Rs)

MCP文档知识

提供方 未标注

文档知识 未标注 API Key 社区 / 第三方 Claude DesktopClaudeCursorVS Code

面向编码代理的本地优先记忆,采用一个 Rust 二进制文件 + 一个 SQLite 文件。无需 API 密钥,无需云服务。

一句话选型结论

按资料字段整理

Palace (palace Rs) 属于文档知识类 MCP 服务器,传输方式未标注,API Key,可直接接入 Claude Desktop、Claude、Cursor 等,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式未标注 鉴权API Key 部署方式未标注
GitHub 星标 未标注 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

支持客户端

适用场景

记忆

安装与配置

未标注 API Key
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 已适配 Claude Desktop、Claude、Cursor,换客户端不用重新研究配置。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好API Key对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Palace (palace Rs)当前 未标注 未标注 未标注 无 2026-11-20
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方未标注上游标注的维护方 未标注
分类文档知识本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式API Key远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-11-20上游最后核验时间

详细介绍

39.5 KB
来自项目仓库与上游目录的原文,未做删改

Local-first memory for coding agents.

Your agent remembers decisions, fixes, commands, and preferences between sessions.

One binary, one SQLite file, no API keys, no cloud.

Quick start ·
Install ·
How it works ·
Clients ·
CLI ·
MCP tools ·
FAQ


Palace gives Claude Code, Codex, Cursor, Gemini CLI, VS Code, OpenCode,
Cline, Zed, Goose, Windsurf, and Claude Desktop a memory that
lasts between sessions. It stores what happened verbatim, recalls it
automatically when it's relevant, and cites where each answer came from.```text
You: why did we switch the queue to SQLite last month?
Agent: [palace_search → wing my_api, room decisions, filed 2026-09-03]
You dropped Redis because the deploy target had no persistent volume.
The benchmark you ran is in the same drawer.


**Using Palace? Tell me.** One line in
Show and tell
about which agents you use it with and what it remembers for you helps more
than a star. Prefer email? Write to contact@palacememory.com.

---

## 🧭 Why Palace

Every new agent session starts with no memory. You explain the architecture
again. The agent repeats a fix you rejected last week. It greps the whole repo
to rediscover a convention you settled months ago.

Palace fixes that by:

- **Storing text verbatim.** Code, notes, and conversations are stored as
  written, not as an LLM summary that loses detail.
- **Running locally.** Embeddings come from `all-MiniLM-L6-v2` (or another
  supported model) on ONNX Runtime, on your CPU. Nothing leaves your machine unless you turn on
  remote mode.
- **Recalling without being asked.** Hooks inject relevant memory when a
  session starts, when you send a prompt, and while the agent investigates.
  The agent does not need to remember to search.
- **Citing sources.** Every result carries its wing, room, source file, drawer
  id, and score breakdown, so you can check where an answer came from.
- **Shipping as one binary.** No Python, no vector database, no Docker. One
  `palace` executable and one `palace.db` file.

It also works outside software projects. The `creative` and `personal`
profiles adapt it for worldbuilding, fiction, coaching, or
household notes.

---

## 📦 Install

Pick one. Each method installs the `palace` binary. Run `palace install`
afterwards to connect your agents.

**macOS / Linux**```bash
curl -fsSL https://raw.githubusercontent.com/AncientiCe/palace-rs/main/scripts/install.sh | sh

Windows (PowerShell)```powershell
irm https://raw.githubusercontent.com/AncientiCe/palace-rs/main/scripts/install.ps1 | iex


The scripts download the matching GitHub Release binary, verify its SHA-256
checksum, and install it. To upgrade later, run the same command again.
The Linux binary needs glibc 2.39 or newer (Ubuntu 24.04+, Debian 13+);
on an older system, build from source.

**Homebrew (macOS Apple Silicon / Linux)**```bash
brew tap AncientiCe/palace
brew install palace

To upgrade, refresh the tap first. Without brew update, Homebrew can keep
reporting the old version as already installed:```bash
brew update && brew upgrade palace


When a release changes the memory protocol rule (the CHANGELOG says so), run
`palace install` again afterwards so your agents get the new rule text.

**MCP registry / MCPB bundle.** Palace is listed in the official
MCP registry as
`io.github.ancientice/palace-rs`. Each release also ships a `palace-.mcpb`
bundle (Linux x86_64, macOS arm64, Windows x86_64) for one-click install in
MCPB-aware hosts such as Claude Desktop.

**From source**```bash
git clone https://github.com/AncientiCe/palace-rs && cd palace-rs
cargo build --release   # binary at target/release/palace
Platform Status
Linux x86_64 Supported (glibc 2.39 or newer)
macOS Apple Silicon Supported
Windows x86_64 Supported
macOS Intel Not supported (no ONNX Runtime build)

The embedding model (~23 MB) downloads from Hugging Face the first time you
mine or search, then stays cached in ~/.cache/huggingface.


⚡ Quick start```bash

palace install # connect every supported agent on this machine
palace doctor # check that every client is wired up
palace init ~/my-project --yes --auto-mine # detect rooms, write palace.yaml, mine


Restart your agent app so it reloads its MCP config. Then try:

> "What do we know about how this project handles database migrations?"

The agent should call `palace_search` and answer from memory, citing the
drawer it used. You can also search from the terminal:```bash
palace search "how did we decide on the database schema"

From then on, the agent writes a diary entry after substantial work and stores
durable decisions as facts. Tomorrow's session, from any of your agents, picks
up where today's left off.


🔍 How it works

The palace

Memory is organised like a building, which keeps search focused:

Figure 1. One palace holds many wings. Rooms group drawers, and the knowledge graph and diaries sit alongside them.

Concept What it is Example
Wing A project or a topic my_api, sales_notes
Room An area inside a wing backend, testing, decisions
Drawer One chunk of verbatim text plus its embedding and metadata a paragraph of db.rs, a diary entry
Knowledge graph Time-stamped facts: subject → predicate → object my_api → uses_queue → SQLite (valid from 2026-09-03)
Diary Per-agent session notes for continuity "Fixed the flaky migration test by…"
Tunnel A link between rooms in different wings my_api/auth ↔ my_web/login

Wings are either project wings (a folder on disk, created by palace mine)
or topic wings (no folder, such as chat history or meeting notes, created
with palace_create_wing).

Retrieval```mermaid

flowchart LR
Q["💬 Question<br/>from you or the agent"] --> S["Sanitize<br/>strip pasted dumps"]
S --> I["Classify intent<br/>decision · how_to · preference …"]
I --> H["Hybrid search<br/>BM25 + cosine"]
H --> B["Coding boosts<br/>+ preference pass"]
B --> R{"Rerank?<br/>optional"}
R --> OUT["📎 Results<br/>scores + source + neighbours"]
DB[("palace.db<br/>local embeddings")] -.-> H


Figure 2. What happens to a query. Everything runs locally on your CPU.

Search fuses BM25 keyword scoring with cosine similarity over local
embeddings. It then applies intent boosts for coding questions. Each query is
classified as `preference`, `decision`, `how_to`, `definition`, `temporal`, or
`unknown`. Preference-shaped questions (&quot;how do I like my commits?&quot;) get a
dedicated pass against tagged preference spans. A local cross-encoder
reranker is available as an option (`--rerank` or `PALACE_RERANK=1`).

### Embedding models

Palace ships with `all-MiniLM-L6-v2` and can switch a palace to another
local model. Every vector is rebuilt from the stored text, so switching never
loses memory.

| Model id | Model | Precision | Notes |
|---|---|---|---|
| `minilm-l6-v2-q8` | all-MiniLM-L6-v2 | int8 | Default for new palaces: same recall as fp32, faster indexing, 23 MB download |
| `minilm-l6-v2` | all-MiniLM-L6-v2 | fp32 | Palaces created before 0.19 run on it (90 MB download) |
| `bge-small` | bge-small-en-v1.5 | fp32 | Experimental, about 2x slower indexing |
| `bge-small-q8` | bge-small-en-v1.5 | int8 | Experimental |
| `bge-base-q8` | bge-base-en-v1.5 | int8 | Experimental, 768-dim |

Experimental models scored below MiniLM on the coding-agent eval and about
level on probes from a real palace (see the
bake-off). You can try them on your own palace:
verification decides whether it switches.```bash
palace embeddings list                       # models, which is active, which are downloaded
palace embeddings estimate minilm-l6-v2-q8   # time, disk and latency, measured on this machine
palace embeddings migrate minilm-l6-v2-q8    # build, verify, switch (e.g. an older fp32 palace)
palace embeddings rollback                   # back to the previous model, instantly
palace embeddings cleanup                    # drop the previous model&#x27;s vectors

migrate builds the new vectors in batches while search keeps using the
current model, so it is safe to interrupt and rerun. When the vectors are
built, it checks the new model against the current one on 200 known-item
probes taken from your palace (hybrid and vector-only recall@1/@5, plus query
latency). It switches only if recall@5 drops by at most 0.01 and p95 query
latency stays within budget. The budget is twice the current model's p95, and
at least 25 ms. Run palace embeddings cutover --force to switch anyway, or
palace embeddings cancel to keep the current model.

Setting embedding_model in config.json (or PALACE_EMBEDDING_MODEL)
picks the model for a new, empty palace. An existing palace never switches
on its own. palace status, palace_status, and palace_session_context
report the pending migration until you run migrate. Nothing migrates on
its own: you run migrate, or ask your agent to, which uses the
palace_embeddings MCP tool (it runs the same steps in the background of
the server). In remote mode the server owns the model, so these commands run on the server.

Agent-generated query dumps are cleaned up before retrieval. Results come back
with score provenance (combined, cosine, bm25, coding_boost,
preference_match, mined_discount, repeat_discount, rerank_score,
intent) and the
chunks right before and after each hit in its source file. Pass
context: false to palace_search to leave those out.

A question in plain words favours memories you or your agent filed over mined
project files that share its words. A query that names code (an identifier, a
path, a file name) ranks filed and mined drawers alike.

Automatic recall (hooks)

palace install registers user-level hooks, so memory works in every project
without editing per-project files:

Figure 3. Three hooks read memory into the session. The fourth makes sure the session's lessons get written back.

Hook What it does
Session start Injects the memory protocol, your standing rules from general/preferences (verbatim, in every project), recent diary entries for this project (from any agent), and the top drawers of the project's wing.
Prompt submit Searches Palace with your actual question and injects matching drawers before the agent answers. If a history question finds nothing, it tells the agent to run palace_search. In Claude Code it also adds a one-line reminder until the session calls a Palace tool. Skips short prompts and slash commands. Claude Code and Codex only.
Post tool use While the agent greps and reads files, recalls related memory so earlier decisions surface without a search. In Claude Code it also records the session's Palace calls.
Stop If the session did real work but saved nothing, asks the agent once to write a diary entry and record decisions before it finishes. In Claude Code this is judged per session, including sessions that never used Palace; other agents use a recent-activity window.

Auto-recall is limited to the current project. Drawers from your other
project wings and diaries from other projects stay out. Topic wings still
appear.

All hooks fail open: if the palace is missing or empty, the agent works as
normal.

The memory protocol

palace install also writes a short rule into each client's instruction file.
The rule tells the agent when to use memory:

  1. Session start: palace_status → palace_session_context → palace_diary_search.
  2. Before answering a question about past decisions, preferences, or
    history: palace_search and palace_kg_query, before grep.
  3. After work: palace_diary_write, plus palace_kg_add for durable facts.

Grep remains the right first tool for current symbols, exact definitions, and
code that may have changed since it was mined.

The nine protocol tools are marked _meta.&quot;anthropic/alwaysLoad&quot; = true, so
Claude Code 2.1.121 and later keeps them loaded instead of deferring them
behind tool search.

Memory layers

Layer Name Contents
L0 Identity ~/.palace/identity.txt, always loaded (~100 tokens)
L1 Essential story Top drawers by importance, grouped by room (~600–900 tokens)
L2 On demand Wing- and room-filtered retrieval
L3 Deep search Full hybrid search across the palace

palace wake-up prints L0 and L1. Agents reach L2 and L3 through MCP tools.


🔌 Supported clients

palace install configures every supported client by default
(--client all). Gemini CLI, VS Code, Windsurf, OpenCode, Cline, Zed and
Goose are included only when their config folder exists, so Palace never sets up an agent you don't
have. Use --client to configure one explicitly.

Client --client MCP config Rule file Hooks
Claude Code claude ~/.claude.json ~/.claude/CLAUDE.md ~/.claude/settings.json
Codex codex ~/.codex/config.toml ~/.codex/AGENTS.md ~/.codex/hooks.json (run /hooks once in the Codex CLI to trust them)
Cursor cursor ~/.cursor/mcp.json ~/.cursor/rules/palace.mdc ~/.cursor/hooks.json
Gemini CLI gemini ~/.gemini/settings.json ~/.gemini/GEMINI.md ~/.gemini/settings.json (run only in folders you trust in Gemini)
VS Code (Copilot) vscode Code/User/mcp.json Code/User/prompts/palace.instructions.md ~/.copilot/hooks/palace.json (no prompt-time recall: VS Code can't inject there)
OpenCode opencode ~/.config/opencode/opencode.json ~/.config/opencode/palace.md, listed under instructions ~/.config/opencode/plugins/palace.js
Cline cline ~/.cline/data/settings/cline_mcp_settings.json ~/.cline/rules/palace.md Documents/Cline/Hooks (prompt and post-tool recall; Cline can't continue after a task, so no save nudge). Your own hook scripts are never overwritten.
Zed zed Zed settings.json (context_servers) Zed's global AGENTS.md None. Zed's agent has no hooks; external agents in Zed use their own Palace setup.
Goose goose Goose config.yaml (extensions) Goose .goosehints ~/.agents/plugins/palace (save nudge only; Goose hooks can't inject context; needs sh on Windows)
Windsurf windsurf ~/.codeium/windsurf/mcp_config.json ~/.codeium/windsurf/memories/global_rules.md None. Cascade hooks can't inject context. Devin Local reuses the Claude Code hooks.
Claude Desktop claude-desktop claude_desktop_config.json ~/.claude/CLAUDE.md None. Use the MCP prompts instead.

Rule files are written as a managed block. Your existing content is kept.```bash
palace install --client claude # one client only
palace install --scope project --path ./my-project # project-level rule files
palace install --no-rule # MCP wiring only, no rule
palace install --dry-run # preview the changes
palace uninstall # undo everything


With `--scope project`, rules go to `/CLAUDE.md`, `/AGENTS.md`
(Codex, OpenCode, Cline, Zed and Goose), `/GEMINI.md`, `/.github/copilot-instructions.md`,
`/.windsurf/rules/palace.md`, and `/.cursor/rules/palace.mdc`.
Cursor, VS Code and OpenCode also get a project MCP config
(`.cursor/mcp.json`, `.vscode/mcp.json`, `opencode.json`).

Manual MCP config

Any MCP client can run Palace as a stdio server with `palace mcp`.

JSON clients (Claude Code, Cursor, Claude Desktop):```json
{
  &quot;mcpServers&quot;: {
    &quot;palace&quot;: { &quot;command&quot;: &quot;palace&quot;, &quot;args&quot;: [&quot;mcp&quot;] }
  }
}

Codex (~/.codex/config.toml):```toml
[mcp_servers.palace]
command = "palace"
args = ["mcp"]


Claude Code CLI:```bash
claude mcp add palace -- palace mcp

MCP prompts

Claude Desktop cannot run hooks, so the server offers two prompts in its
prompt picker:

Prompt What it does
continue-session Loads warm-start context so the agent picks up where you left off
save-session Saves the session to memory so it carries over next time

Profiles

A profile changes the agent rule, the protocol text, and which rooms
palace init looks for:

Profile For Typical rooms
coding (default) Software projects frontend, backend, testing, docs, config
creative Worldbuilding, D&D, fiction characters, places, lore, factions, timeline
personal Coaching, caregiving, household, client notes people, health, finances, home, schedule
palace install --profile creative

The profile is saved to ~/.palace/config.json. Set PALACE_PROFILE to
override it for one process.

Remote mode (shared team memory)

By default, palace mcp serves your local palace. Remote mode turns it into a
stdio-to-HTTP bridge to a shared Palace Server,
the commercial, self-hosted team edition. Client registrations do not change.```bash
palace remote set --endpoint https://palace.yourco.com # prompts for the ps_… API key
palace remote on
palace remote test # runs the MCP handshake and reports the tool count
palace remote status # mode, endpoint, masked key
palace local # back to the local palace


Try this with one teammate and one ticket. Give both agents access to the
same investigation on your own infrastructure. The team trial includes 10
seats for 60 days, with no credit card:
Start the team trial.

---

## 🧰 CLI reference

Run `palace  --help` for every flag.

**Setup**

| Command | What it does |
|---|---|
| `palace install` | Register the MCP server, rules, and hooks with your agents |
| `palace uninstall` | Remove them again |
| `palace doctor` | Check the binary, database, MCP configs, and rules |
| `palace seed-adoption-facts` | Seed knowledge-graph facts that make agent recall measurable |
| `palace feedback` | Open a pre-filled public GitHub discussion to share feedback (`--no-open` prints the link) |

**Adding memory**

| Command | What it does |
|---|---|
| `palace init ` | Detect rooms and write `palace.yaml` (`--yes` skips prompts, `--auto-mine` mines straight after) |
| `palace mine ` | Chunk, embed, and store project files. Re-runs only process changed files. |
| `palace watch ` | Re-mine changed files automatically as you work |
| `palace mine-convos ` | Ingest chat exports: Claude Code and Codex JSONL, Claude.ai, ChatGPT, Slack |
| `palace sweep ` | Store transcript JSONL files as one drawer per message |
| `palace split` | Split concatenated Claude Code transcripts into one file per session |

**Finding memory**

| Command | What it does |
|---|---|
| `palace search ` | Hybrid search (`--wing`, `--room`, `--limit`, `--rerank`) |
| `palace wake-up` | Print the L0 identity and L1 essential story |
| `palace status` | Drawer counts by wing and room |
| `palace wings` | Registered wings, with kind, drawer count, and last mined time |
| `palace rename-wing  ` | Rename a wing, or merge it into an existing wing |
| `palace timeline` | Knowledge-graph facts in time order (`--entity` to filter) |
| `palace gain` | How much your agents use Palace, and what it saves |

**Maintenance**

| Command | What it does |
|---|---|
| `palace export` / `palace import ` | Back up or restore drawers as JSON (embeddings are rebuilt on import) |
| `palace prune --older-than-days ` | Delete old drawers (`--dry-run` to preview) |
| `palace repair` | Re-embed drawers that are missing vectors |
| `palace upgrade-embeddings` | Re-embed everything with the active model (`--refresh-preferences` for preference spans) |
| `palace embeddings …` | List, estimate, migrate to, verify, cut over to, or roll back embedding models |
| `palace migrate [path]` | Import Python MemPalace (default `~/.mempalace`) or another palace database (migrating) |
| `palace compress` | Compress drawers to the AAAK dialect |

**Servers**

| Command | What it does |
|---|---|
| `palace mcp` | Start the MCP stdio server |
| `palace remote …` / `palace local` | Configure and toggle remote mode |
| `palace hook  --client ` | Hook runner called by the installed hooks |

### Mining a project```mermaid
flowchart LR
    DIR[&quot;📁 Your repo&quot;] --&gt; F[&quot;Filter&lt;br/&gt;.gitignore + skip build dirs&quot;]
    F --&gt; C{&quot;Changed since&lt;br/&gt;last mine?&quot;}
    C -- no --&gt; SKIP[&quot;Skip&quot;]
    C -- yes --&gt; CH[&quot;Chunk + pick room&lt;br/&gt;using palace.yaml&quot;]
    CH --&gt; E[&quot;Embed locally&lt;br/&gt;all-MiniLM-L6-v2&quot;]
    E --&gt; DB[(&quot;palace.db&quot;)]

Figure 4. Mining only touches files that changed, so re-running it is cheap.

palace mine respects .gitignore and skips .git, node_modules,
target, build, dist, vendor, and other build output. It reads common
text and source formats: md, txt, rs, py, js, ts, tsx, go,
java, rb, sh, sql, json, yaml, toml, html, css, csv, and
more.```bash
palace mine ~/my-project \
--wing my_project # override the wing name
--limit 100 # process at most 100 new or changed files
--dry-run # preview without storing
--no-gitignore # ignore .gitignore rules
--include vendor,third_party # force-include these paths


`--limit` runs can be resumed: the next run continues from where the last
one stopped.

### Measuring value with `palace gain````bash
palace gain                       # last 30 days
palace gain --project my_project --since 7d
palace gain --history             # recent tool calls
palace gain --json
palace gain --record &lt;query_id&gt; &lt;drawer_id&gt; useful   # or not_useful / wrong_answer
``````text
palace gain - last 30d (my_project)
  Tool calls         : 412   (sessions: 27)
  Hit rate           : 88%   (search hits 142/162)
  Precision@1        : 92%
  Precision@5        : 95%
  Tokens saved (est) : ~78,400
  Re-index skipped   : 31    (duplicate drawers avoided)
  KG facts recalled  : 56
  Diary recalls      : 8
  Repeat Qs avoided  : 19
  p95 latency        : 41 ms
  Prompt recall      : 230 prompts (96 with past sessions or decisions, 71 code only, 63 nothing found)

Prompt recall counts what the prompt hook injected, apart from MCP tool
calls. Many "code only" or "nothing found" prompts mean agents work without
the earlier sessions in front of them.

Usage metadata stays in your local palace.db. Set PALACE_GAIN_DISABLED=1
to turn recording off.


🧩 MCP tools

All 50 tools

Status and health

Tool Description
palace_status Palace overview: drawer and wing counts, recent sessions (verbose adds rooms, protocol text, AAAK spec)
palace_verify Check MCP tools, database health, embeddings, and model cache
palace_recall_check Run project-memory probes and report expected hits
palace_gain Usage gains and savings. Accepts an optional record payload for feedback.
palace_memory_report Readable inventory: profile, per-wing and per-room counts, recent activity

Wings and taxonomy

Tool Description
palace_project_status Is this project mined, registered but unmined, or unknown?
palace_mine Mine a code repository on demand (after the user agrees)
palace_create_wing Declare a topic or project wing
palace_rename_wing Rename a wing, or merge it into an existing wing
palace_list_wings Registered wings with kind, path, last mined time, and counts
palace_list_rooms Rooms within a wing
palace_get_taxonomy Full wing → room → count tree

Search

Tool Description
palace_search Hybrid search with score provenance and source context
palace_preference_search Dedicated pass for preference and convention questions
palace_check_duplicate Check whether content already exists

Drawers

Tool Description
palace_add_drawer Store content in a wing and room
palace_remember Store a key fact with importance 5
palace_get_drawer Fetch a drawer by id
palace_list_drawers List drawers, with optional wing and room filters (verbose adds hall, metadata, detected entities)
palace_update_drawer Update content and refresh metadata
palace_delete_drawer / palace_forget Remove a drawer
palace_explain Full provenance: who stored it, when, from where, importance
palace_prune Remove stale or low-value drawers
palace_export / palace_import Export or import palace data
palace_upgrade_embeddings Re-embed drawers and refresh preference vectors
palace_embeddings List models, estimate, and migrate to another embedding model when you ask

Knowledge graph

Tool Description
palace_kg_query Query an entity's relationships
palace_kg_add Add a fact (subject → predicate → object)
palace_kg_invalidate Mark a fact as no longer true
palace_kg_timeline Facts in time order
palace_kg_stats Graph overview
palace_conflicts Find stale or contradictory facts
palace_seed_adoption_facts Seed adoption and quality-gate facts

Graph and tunnels

Tool Description
palace_traverse Breadth-first walk from a room
palace_find_tunnels Rooms that bridge two wings
palace_create_tunnel / palace_list_tunnels / palace_delete_tunnel Manage stored tunnels
palace_follow_tunnels Follow tunnels from a wing and room
palace_graph_stats Graph summary

Diaries and sessions

Tool Description
palace_diary_write Write a diary entry
palace_diary_read Read recent entries
palace_diary_search Search diaries. all_agents: true searches every agent's diary.
palace_session_context Warm-start context. Falls back to other agents' recent work on the project.
palace_list_agents List agent diaries

Internal

Tool Description
palace_get_aaak_spec The AAAK compressed-memory dialect spec
palace_hook_settings Hook settings
palace_memories_filed_away Acknowledgement used by the stop hook

🔧 Configuration

Settings load in this order: environment variables, then
~/.palace/config.json, then defaults.

Env var Default Description
PALACE_PALACE_PATH ~/.palace/palace Data directory. The database is palace.db inside it.
PALACE_PROFILE coding coding, creative, or personal
PALACE_RERANK off 1 turns on the local reranker for every search
PALACE_RERANK_MODEL built-in Override the reranker model
PALACE_ENTITY_LANGUAGES en Comma-separated languages for entity detection
PALACE_GAIN_DISABLED off 1 turns off usage recording
PALACE_FEEDBACK_DISABLED off 1 stops the feedback-link hint in palace_session_context
PALACE_PROJECT auto Project name used for gain attribution when a call names no project_path or project wing
PALACE_SOURCE_DIR ~/Desktop/transcripts Default source for palace split
PALACE_MINE_TRACE off 1 prints per-stage mining timings
PALACE_BUSY_TIMEOUT_MS 10000 How long to wait, in milliseconds, for another palace process that is writing to the database. 0 turns waiting off (fail at once); it does not mean "no limit"
PALACE_MCP_MODE local local or remote
PALACE_EMBEDDING_MODEL minilm-l6-v2-q8 Embedding model for new palaces (see embedding models)
PALACE_EMBEDDING_LATENCY_BUDGET_MS 2x current p95 Query-latency budget for palace embeddings verify
PALACE_EMBED_THREADS all cores ONNX threads used for embedding
PALACE_REMOTE_ENDPOINT none Palace Server URL (host, base URL, or full /mcp URL)
PALACE_API_KEY none Palace Server API key (ps_…)

config.json takes the same settings as keys: palace_path, profile,
entity_languages, topic_wings, people_map, mcp_mode,
remote_endpoint, remote_api_key, embedding_model,
embedding_latency_budget_ms. Palace writes this file with owner-only
0600 permissions.

palace.yaml (per project)

palace init creates this file. Edit it to tune how files map to rooms:```yaml
wing: my_project
rooms:
- name: backend
description: Server and API code
keywords: [api, server, routes, models]
- name: frontend
description: UI components
keywords: [ui, components, pages, views]
- name: general
description: Everything else
keywords: []


---

## 📊 Benchmarks

### Coding-agent memory eval

A fixture of realistic project memories (decisions, past failures, commands,
conventions, preferences, current direction) with 51 questions such as:

- why did we choose bundled sqlite?
- how did we fix the migration test failure last time?
- what clippy command should I run?```bash
cargo test --test coding_agent_eval -- --nocapture

The test reports recall@1 and recall@5, and fails if retrieval drops below
a fixed threshold. It answers the question that matters: can a coding agent
find the right project context when it needs it?

This eval is partly tuned, on purpose. The ranker's coding-agent boosts
include a handful of phrases taken from the eval's own questions (such as
"explain themselves", "proof priority" and "release theme"), so the tuned
scores here and in the bake-off below are higher than general ranking alone
would give. We keep them until general improvements reach the same numbers, then
remove them. Measured on the same code with those phrases removed:

Mode With the eval phrases (tuned) R@1 / R@5 Without them R@1 / R@5
Keyword-only (this test) 0.863 / 1.000 0.804 / 0.961
minilm-l6-v2 0.902 / 1.000 0.902 / 1.000
minilm-l6-v2-q8 0.922 / 1.000 0.902 / 1.000

…(正文过长,页面只展示前面部分,完整内容见仓库)

常见问题

6 问
答案由本站依据条目字段整理,不引用上游原文
Palace (palace Rs) 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

Palace (palace Rs) 怎么在 Claude Desktop、Claude、Cursor 里配置?

它的传输方式未标注,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

Palace (palace Rs) 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Palace (palace Rs) 需要 API Key 吗?

资料标注需要API Key认证,使用前准备好对应凭据,并按最小权限配置。

Palace (palace Rs) 支持哪些客户端?

资料标注支持 Claude Desktop、Claude、Cursor、VS Code、Windsurf、Cline;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

Palace (palace Rs) 能提供哪些能力?

资料显示能力标签包括 记忆。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-11-20。