PluginBench
MCP Server
Active
Apache-2.0

ChatCrystal MCP Server

io.github.ZengLiangYi/chatcrystal

Local-first AI PKM that turns coding conversations into searchable notes and MCP memory for agents.

What is the ChatCrystal MCP server?

ChatCrystal is a local-first AI personal knowledge management (PKM) app for developers that imports AI coding conversations, distills them into structured notes, and exposes them via MCP tools so agents can recall and reuse experience. It provides semantic search, tag knowledge graphs, and Markdown exports, running entirely on your machine with configurable LLM and embedding providers.

ChatCrystal captures and organizes your AI-assisted coding work—conversations from Claude Code, Cursor, Codex CLI, and GitHub Copilot—into a searchable knowledge base. It distills scattered chats into structured notes with summaries, tags, and code snippets, then lets your AI agents query and write back to this memory via MCP, creating a feedback loop that makes your agents smarter over time.

How to install ChatCrystal

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
Environment / auth
  • CHATCRYSTAL_BASE_URL

    Optional ChatCrystal Core URL. Leave empty to use the local default at http://localhost:3721.

  • CHATCRYSTAL_API_TOKEN
    secret

    Optional token for a protected ChatCrystal Cloud or remote instance.

~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "chatcrystal": {
      "command": "npx",
      "args": [
        "-y",
        "chatcrystal",
        "-y",
        "mcp"
      ],
      "env": {
        "CHATCRYSTAL_BASE_URL": "<YOUR_CHATCRYSTAL_BASE_URL>",
        "CHATCRYSTAL_API_TOKEN": "<YOUR_CHATCRYSTAL_API_TOKEN>"
      }
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • search — Semantic search across imported conversations and notes with relation-aware result expansion
  • notes list — Browse and filter notes by tag
  • notes get — Retrieve detailed note content by ID
  • import — Scan and import AI coding conversations from local tool data directories
  • summarize — Batch summarize conversations into structured notes
  • status — Check server status and database statistics
  • mcp — Start MCP stdio server for agent integration

Use cases

  • Search your past Claude Code and Cursor conversations to find solutions you've already built
  • Automatically distill long coding chats into tagged, reusable knowledge snippets
  • Let Claude or Cursor agents query your personal coding memory to avoid repeating work
  • Build a knowledge graph of your coding patterns and techniques across projects
  • Export your conversation history as structured Markdown for documentation or review

ChatCrystal MCP server FAQ

What is ChatCrystal?

ChatCrystal is a local-first AI PKM app that imports coding conversations from Claude Code, Cursor, Codex CLI, and GitHub Copilot, distills them into structured notes, and exposes them via MCP so your AI agents can search and reuse your experience.

Is ChatCrystal free?

Yes, ChatCrystal is open-source under the Apache 2.0 license. You run it locally and configure your own LLM and embedding providers (which may have their own costs).

How do I install ChatCrystal?

Download the Windows desktop app from GitHub Releases, or install via npm (`npm install -g chatcrystal`) and run `crystal serve`. It requires Node.js >= 24 and an LLM provider (e.g., Claude, GPT) plus an embedding provider for semantic search.

How do I use ChatCrystal with Cursor or Claude?

Run `crystal mcp` to start the MCP stdio server, then configure it in your Cursor or Claude client settings. Your agents can then call search, notes, and other tools to query your knowledge base.

Does ChatCrystal require authentication or API keys?

ChatCrystal is local-first and runs on your machine. You configure your own LLM and embedding provider API keys in Settings. For Docker cloud deployments, a shared API token secures multi-device access.

What conversations can ChatCrystal import?

ChatCrystal imports from Claude Code, Cursor, Codex CLI, Trae, and GitHub Copilot by scanning their local data directories. It parses conversations locally and distills them into notes with titles, summaries, conclusions, and tags.

README (reference)

Source of truth, from the repository.

<div align="center"> <img src="electron/icon.png" alt="ChatCrystal" width="120" />

ChatCrystal

Local-first AI PKM for coding conversations

GitHub release npm ChatCrystal MCP server License: Apache-2.0 Node.js Platform Website

Website · Download Desktop · npm · Docs · 简体中文

</div>
<div align="center"> <img src="docs/demo.webp" alt="ChatCrystal Demo" width="800" /> </div> <br>

ChatCrystal is a local-first AI PKM app for developers who solve real problems with Claude Code, Cursor, Codex CLI, Trae, and GitHub Copilot.

It turns scattered AI coding conversations into structured notes, semantic search, a tag knowledge graph, Markdown exports, and MCP memory your agents can reuse. If this fits your workflow, a star helps more builders find a private, local-first way to keep their AI work memory.

Quick Start

Desktop App (Recommended)

Download the latest Windows installer from GitHub Releases. After installing, launch ChatCrystal, configure your LLM and embedding providers in Settings, then click Import.

CLI / Web

npm install -g chatcrystal
crystal serve -d
crystal import

Then open http://localhost:3721 in your browser.

Docker Cloud

Prefer self-hosting ChatCrystal for multiple devices? See Docker Cloud Deployment after the product overview.

What It Does

  • Imports AI coding conversations from local tool data directories.
  • Distills conversations into structured notes with titles, summaries, conclusions, snippets, and tags.
  • Searches knowledge semantically with embeddings and relation-aware result expansion.
  • Builds a tag knowledge graph where knowledge points are tags and edges show normalized co-occurrence.
  • Exposes CLI and MCP tools so agents can recall and write back reusable experience.
  • Runs locally with configurable LLM and embedding providers.

Screenshots

<div align="center"> <table> <tr> <td align="center"><strong>Conversations</strong></td> <td align="center"><strong>Notes</strong></td> </tr> <tr> <td><img src="docs/screenshots/en/conversations.png" alt="Conversations" width="400" /></td> <td><img src="docs/screenshots/en/notes.png" alt="Notes" width="400" /></td> </tr> <tr> <td align="center"><strong>Semantic Search</strong></td> <td align="center"><strong>Knowledge Graph</strong></td> </tr> <tr> <td><img src="docs/screenshots/en/search.png" alt="Semantic Search" width="400" /></td> <td><img src="docs/screenshots/en/graph.png" alt="Knowledge Graph" width="400" /></td> </tr> </table> </div>

Common Commands

crystal status                          # Server status and DB stats
crystal import [--source claude-code]   # Scan and import conversations
crystal search "query" [--limit 10]     # Semantic search
crystal notes list [--tag X]            # Browse notes
crystal notes get <id>                  # View note detail
crystal summarize --all                 # Batch summarize
crystal config get                      # View config
crystal serve -d                        # Start server in background
crystal serve stop                      # Stop background server
crystal mcp                             # Start MCP stdio server

Documentation

TopicEnglish简体中文
User guidedocs/USER_GUIDE.mddocs/USER_GUIDE.zh-CN.md
Developmentdocs/DEVELOPMENT.mddocs/DEVELOPMENT.zh-CN.md
MCP and agentsdocs/MCP.mddocs/MCP.zh-CN.md
Experience quality gatedocs/EXPERIENCE_GATE.mddocs/EXPERIENCE_GATE.zh-CN.md
Agent skillsdocs/agent-skills.mddocs/agent-skills.zh-CN.md

Requirements

  • Node.js >= 24
  • An LLM provider for summarization
  • An embedding provider for semantic search

LLM and embedding providers are configured separately. Large language models such as Claude, GPT, and Qwen are not embedding models. See the user guide for provider examples.

ChatCrystal includes first-class OrcaRouter support for LLM generation. OrcaRouter is OpenAI-compatible; its Base URL is built in, so enter only your API Key and use Settings to fetch and select an available model.

Local Development

git clone https://github.com/ZengLiangYi/ChatCrystal.git
cd ChatCrystal
corepack enable
pnpm install
pnpm dev

Development server ports:

See docs/DEVELOPMENT.md for architecture, testing, build, and release details.

Docker Cloud Deployment

The default Compose deployment runs only the ChatCrystal service. It stores data in the chatcrystal-data volume mounted at /data inside the container.

git clone https://github.com/ZengLiangYi/ChatCrystal.git
cd ChatCrystal
docker compose up -d

The default docker-compose.yml pulls ghcr.io/zengliangyi/chatcrystal:latest from GitHub Container Registry. Set CHATCRYSTAL_IMAGE_TAG to pin a published version. To build from source instead, run docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build.

To update an existing Docker deployment, run docker compose pull && docker compose up -d. Maintainers only: after the first GHCR publish, make the ghcr.io/zengliangyi/chatcrystal package public in GitHub Packages; the release workflow verifies anonymous pull access before passing.

Compose binds ChatCrystal to 0.0.0.0:3721 by default so other devices can reach the cloud core through the host IP. Set CHATCRYSTAL_HOST_PORT to change the host port, or set BIND_ADDRESS=127.0.0.1 when a local-only reverse proxy fronts it. For public cloud access, an HTTPS reverse proxy is recommended for safer token transport.

On Windows Docker Desktop, a published port may still need extra host networking configuration before it is reachable through the host LAN IP. For cloud-mode testing, verify http://<host-ip>:<host-port>/api/health from the client device first; if it cannot connect, configure Windows port forwarding/firewall rules or deploy the cloud core on a real remote host.

On first start without CHATCRYSTAL_API_TOKEN, open the Web UI and enter the setup code printed in container logs or stored at /data/setup-code, then choose one shared API token for your devices.

To rotate or reset the Docker cloud token:

# If you still know the current token, rotate it online.
crystal --base-url https://chatcrystal.example.com token rotate "new-long-token-at-least-16-chars" --current "old-token"
crystal connect https://chatcrystal.example.com --token "new-long-token-at-least-16-chars"

# If you forgot the token and did not set CHATCRYSTAL_API_TOKEN, reset stored auth in the container.
docker compose exec chatcrystal crystal token reset --yes
docker compose logs chatcrystal --tail=80
docker compose exec chatcrystal cat /data/setup-code

If your deployment sets CHATCRYSTAL_API_TOKEN, that environment variable is the active token source. Change it in your .env or Compose environment and recreate the container with docker compose up -d --force-recreate.

To use an existing Ollama or external API, configure provider URLs in the Web UI or environment. In Docker, localhost means inside the container; use CHATCRYSTAL_DOCKER_LLM_BASE_URL and CHATCRYSTAL_DOCKER_EMBEDDING_BASE_URL for Compose-time provider URL overrides. Docker Desktop can reach host Ollama at http://host.docker.internal:11434, or you can use a remote HTTPS/OpenAI-compatible API.

Import from a Device into the Cloud Instance

Install or run the CLI on the device that has Claude Code, Cursor, Codex CLI, Trae, or GitHub Copilot history:

crystal connect https://chatcrystal.example.com --token "your-long-token"
crystal import --yes

The CLI scans local histories, parses them locally, and uploads normalized conversations to the cloud. The cloud never scans your local filesystem. Imported conversations are not summarized automatically; use the Web UI or crystal summarize --all when you are ready. HTTPS is recommended for cloud access, but HTTP works when that is the deployment you choose.

Contact Us

<img src="docs/wechat.png" alt="WeChat QR code" width="220" />

License

Apache License 2.0

Related MCP servers

Prompt injection + PII detection for LLM apps and agent pipelines. Deterministic, sub-25ms.

0
HTML
View repository →

AI agents replace the CEO of Toys R Us (2006-2017). 17 decisions, 44 quarters. Free entry.

0
JavaScript
View repository →

Sounding checks proposed decisions and returns structured proceed, revise, or pause assessments.

Simulated investment committee: 27 investor lenses read the same filings, debate, and a PM decides.

3
JavaScript
MIT
View repository →

Ziggs delegate MCP: chat, agreements, context, payments via OAuth or operator key.

View repository →

Agentic pipeline — 39 tools from idea to revenue for solo founders.

4
TypeScript
View repository →