search_knowledge
Semantic search across your AI conversation knowledge base. Returns matching notes ranked by relevance.
limitqueryrequired
io.github.ZengLiangYiPublished by GitHub account ZengLiangYiv0.6.2Updated Oct 30, 2026
Local-first AI PKM memory for coding conversations.
Local-first personal knowledge base for AI coding conversations, letting an assistant search distilled notes and recall or save reusable task memories.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
ChatCrystal collects conversations from AI coding tools (Claude Code, Cursor, Codex CLI, Trae, GitHub Copilot), uses LLM to distill them into searchable structured notes, and builds your personal knowledge base.
Requires Node.js >= 20 and an LLM service (Ollama, OpenAI, OrcaRouter, Anthropic, Google AI, or any OpenAI-compatible API).
The server auto-launches in background on first command. No manual setup needed.
For a Docker cloud instance, save the shared token once:
crystal import still scans and parses histories on the local device, then uploads normalized conversations to the cloud instance. The cloud server does not scan your local filesystem. crystal mcp reuses the same saved connection and token.
HTTPS is recommended for cloud connections, but HTTP works when that is the deployment you choose.
To manage a Docker cloud token:
If CHATCRYSTAL_API_TOKEN is set in the deployment environment, change that environment variable and recreate the container instead of using token reset.
Global options: --base-url <url> (server address), --token <token> (cloud API token), --json (force JSON output), --version
Output: TTY-aware — colored tables in terminal, JSON when piped.
Integrate with AI coding tools so they can retrieve knowledge from your conversation history during coding.
Add to settings.json:
Runtime configuration is stored in config.json under the active data directory. CLI, MCP, repo/dev checkouts, npm global installs, and Electron default to ~/.chatcrystal/data. Use crystal config set for persistent config. .env remains available only as an optional local override layer.
OrcaRouter uses ChatCrystal's built-in https://api.orcarouter.ai/v1 Base URL. Set llm.provider to orcarouter, provide an API Key, and select a discovered model in the Web UI; no llm.baseURL is required. Get an OrcaRouter API Key.
Automatically detects and imports from:
ChatCrystal also has a web UI and Electron desktop app. See the GitHub repository for details.
Source: server/README.md at commit 7642768
Semantic search across your AI conversation knowledge base. Returns matching notes ranked by relevance.
limitqueryrequiredGet the full content of a note including title, summary, key conclusions, code snippets, and tags.
idrequiredList note summaries for browsing and narrowing the ChatCrystal knowledge base. Use this when you need paginated notes filtered by tag or title/summary keyword. Use search_knowledge instead for semantic relevance ranking, and get_note when you already have an id and need the full note body. Returns note metadata and summaries, not full note content.
tagpagesearchGet related notes for a given note, including relationship type and confidence score.
noteIdrequiredRetrieve reusable task memories before starting substantive coding work. Use this at the beginning of implementation, debugging, migration, configuration, investigation, refactor, or optimization tasks to load project-scoped memories first and optional global lessons second. Use mode="debug" when the user reports an error, failing command, regression, or incident; include error_signatures and related_files when available. Use search_knowledge instead for ad hoc semantic note search that is not tied to the current task. This tool is read-only and returns ranked memories plus optional related-note context without writing anything.
modetaskrequiredoptionsDry-run validation for a candidate task memory before calling write_task_memory. Use this after meaningful work and before persisting a lesson to check whether the candidate is durable, specific, reusable, and shaped like a high-quality ChatCrystal note. It has no side effects and never writes to the knowledge base. Returns acceptance, rejection reason, warnings, and materialized note fields so agents can revise the candidate or skip weak work logs.
moderequiredtaskrequiredscopememoryrequiredsource_run_keyPersist a task memory only when it can become a high-quality ChatCrystal note: specific title, concrete summary, meaningful key conclusions, and a durable reusable lesson such as a pitfall, fix, decision, pattern, or symptom-to-resolution mapping. Do not write one-time environment checks, version/status reports, ordinary progress logs, or vague robustness claims. Weak auto writebacks are skipped by core validation and recorded only as receipts.
moderequiredtaskrequiredscopememoryrequiredsource_run_key90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
npm install -g chatcrystalcrystal import # Scan and import AI conversationscrystal summarize --all # Batch summarize into notescrystal search "React state" # Semantic search your knowledgecrystal connect https://chatcrystal.example.com --token "your-long-token"crystal import --yes# Rotate when you still know the current token.crystal --base-url https://chatcrystal.example.com token rotate "new-long-token-at-least-16-chars" --current "old-token"
# Reset stored auth from the Docker host when the token is lost.docker compose exec chatcrystal crystal token reset --yesdocker compose exec chatcrystal cat /data/setup-code# Knowledge retrievalcrystal search <query> [--limit 10] # Semantic searchcrystal notes list [--tag X] # Browse notescrystal notes get <id> # View note detailcrystal notes relations <id> # View note relationscrystal tags # List tags with counts
# Data managementcrystal import [--source claude-code] # Import conversationscrystal summarize <id> # Summarize one conversationcrystal summarize --all # Batch summarizecrystal summarize --retry-errors # Retry failed summariescrystal status # Server status and DB stats
# Configurationcrystal config get # View configcrystal config set llm.provider openai # Update configcrystal config test # Test LLM connection
# Server managementcrystal serve # Start server (foreground)crystal serve -d # Start server (daemon)crystal serve stop # Stop daemoncrystal serve status # Check if runningcrystal mcp # Start MCP stdio server{ "mcpServers": { "chatcrystal": { "command": "crystal", "args": ["mcp"] } }}# LLM (ollama/openai/orcarouter/anthropic/google/azure/custom)crystal config set llm.provider openaicrystal config set llm.model gpt-4ocrystal config set llm.apiKey sk-...
# Embedding (ollama/openai/google/azure/custom)crystal config set embedding.provider ollamacrystal config set embedding.model nomic-embed-text