Clexo

MCP文档知识

提供方 未标注

文档知识 HTTP · 远程 未标注 社区 / 第三方 ClaudeCursorVS CodeWindsurf
查看接入方式

基于本地SQLite FTS5索引的八个MCP工具(搜索、加载、保存、选择、标签、标签列表、取消标签、获取统计),用于管理过去的Claude Code和Codex会话。

一句话选型结论

按资料字段整理

Clexo 属于文档知识类 MCP 服务器,HTTP · 远程,鉴权方式未标注,可直接接入 Claude、Cursor、VS Code 等,有可直接复制的远程端点配置。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

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

工具与能力

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

能力标签

支持客户端

适用场景

记忆

安装与配置

HTTP · 远程 未标注
连远程 HTTPS 端点,通常为 Streamable HTTP
pipx install git+https://github.com/sankrant/clexo clexo install

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    确认你的客户端支持远程端点,并拿到服务地址。

  2. 2
    安装服务

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

  3. 3
    写入客户端配置

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

  4. 4
    验证是否可用

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

典型使用场景

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

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

知识库读写

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

内容整理

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

选择建议

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

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude、Cursor、VS Code,换客户端不用重新研究配置。

先想清楚的地方

  • 远程端点依赖网络与服务方可用性,注意密钥与调用额度。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

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

不太适合

  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Clexo当前 未标注 HTTP · 远程 远程部署 有 未标注
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

服务器档案

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

详细介绍

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

clexo

Session memory and cross-AI context for Claude Code and Codex

Claude Code forgets. clexo remembers.

Why •
Quick Start •
vs /compact /clear /resume •
CLI •
MCP •
How it works


> Inside a Claude Code session, type !clexo save. Then /clear.
> The next session auto-restores the snapshot — summary + memory preserved, raw context cleared.
> No /compact wait. No claude --resume reloading the full history. No /clear loss.


✨ Why

If you live in Claude Code or Codex, three context operations all hurt. clexo replaces all three.

The pain clexo replacement
🐢 /compact — 1-3 minutes on long sessions, blocks you in-session !clexo save — ~80 ms snapshot, then /clear and continue
💸 claude --resume — re-loads the entire history into context clexo load — restores the compact snapshot only
🪦 /clear — irreversible, loses everything /clear after !clexo save — auto-restored on next session

Plus one structural gap nothing else closes: Codex doesn't see Claude's history; Claude doesn't see Codex's. clexo indexes both into one archive — load a Codex session into Claude, or vice versa.

Zero daemon. No API key. Self-indexing on demand. Your AI sessions become a searchable meta-memory across every prior conversation.


🚀 Quick Start```bash

pipx install git+https://github.com/sankrant/clexo
clexo install


Two steps: `pipx` installs the `clexo` command into an isolated environment (no system-Python pollution, and no "python3 too old" — pipx picks a suitable interpreter); `clexo install` then wires it into Claude Code. Both are idempotent and safe to re-run.

> No `pipx`? Add it with `brew install pipx` (macOS) or `python3 -m pip install --user pipx`. Prefer `uv`? `uv tool install git+https://github.com/sankrant/clexo`. Working from a local checkout? `git clone … && cd clexo && ./install.sh` runs the same two steps.

### What the install does

Nothing hidden — two steps, each with one job:

| Step | What it does | What it touches |
|------|--------------|-----------------|
| **`pipx install …`** | Isolated venv with clexo + its one dependency (`mcp`); puts the `clexo` command on PATH. **Touches nothing in Claude Code.** | `~/.local/bin/clexo` |
| **`clexo install`** | Registers the MCP server and adds two hooks. Idempotent; backs up `settings.json` first; re-points an older install. | `~/.claude.json` (MCP), `~/.claude/settings.json` (hooks) |

The two hooks `clexo install` adds to `~/.claude/settings.json`:

- **`SessionStart` → `clexo session-start`** — restores a pending snapshot after `/clear` (the auto-restore behavior)
- **`SessionEnd` → `clexo sync`** — indexes the just-ended session in the background

It registers one MCP server: `claude mcp add --scope user clexo clexo serve`. Upgrading from an older install? `clexo install` re-points stale `server.py`-based hooks/MCP to the `clexo` command and removes the old `~/.local/bin/clexo` symlink.

clexo's own data — the search index, transcript archive, and snapshots — lives in **`~/.clexo/`**, created on first use. No daemon, no API key, nothing sent anywhere. (Hook details: docs/hooks.md.)

**To remove clexo:** `claude mcp remove --scope user clexo`, delete the clexo `SessionStart`/`SessionEnd` blocks from `~/.claude/settings.json`, then `pipx uninstall clexo` (and optionally `rm -rf ~/.clexo` to drop the index/archive).

### Try it```bash
# Inside a Claude Code session, drop a save and clear cleanly:
!clexo save            # snapshot the current session (~80 ms)
/clear                 # standard Claude Code; the next session auto-restores

# From any terminal:
clexo search "csrf token"        # FTS across every session, ever
clexo tag auth-fix               # name the current session
clexo load auth-fix              # launch a fresh claude, snapshot restored via hook
clexo resume auth-fix            # or reopen the original session (claude --resume; full rehydrate)
clexo stats                      # how many tokens you've saved so far

🔁 The three Claude Code operations clexo replaces

/compact → !clexo save

/compact re-summarises the entire conversation in place. On a long session it can take minutes — you sit and wait. !clexo save writes a compact snapshot to disk in milliseconds. You can /clear immediately and the next session auto-restores it.

The ! prefix matters: it runs clexo save as a bash command directly, bypassing the model entirely. Zero tokens consumed, no MCP round-trip, no AI cost — the fastest possible save. (You can also ask the agent to use the save MCP tool; that works but costs model tokens.)

claude --resume → clexo load

claude --resume rehydrates the full saved conversation back into context — every message, every tool call, every file read, up to the model's context window (200K on Sonnet, 1M on Opus). On a long session that's a slow rehydrate and your full context budget consumed before the first new turn. clexo load restores the saved snapshot (summary + recent exchanges + key file refs) — typically a few thousand tokens. Same continuity, a fraction of the context.

/clear → /clear (after !clexo save)

/clear is normally irreversible. After !clexo save, it isn't: the SessionStart hook reads the pending snapshot when the next session starts and injects it as additional context. You keep summary + memory; you only lose the verbose raw history.


🧰 What it does

  • Search every Claude Code and Codex conversation you've ever had (FTS5)
  • save the current session into a compact snapshot, load it later — context survives /clear and crosses between Claude and Codex
  • pick raw exchanges (including bash output and file reads) from any past session
  • tag sessions with friendly names — clexo resume my-auth-fix jumps straight back into claude --resume
  • Zero daemon — self-indexing via byte-offset tracking; one optional SessionEnd hook keeps the index fresh

⚙️ Manual install

clexo install does the Claude Code wiring for you. To do it by hand instead:```bash

1. Install the package (isolated)

pipx install . # from a checkout — or: pip install .

2. Register the MCP server with Claude Code

claude mcp add --scope user clexo clexo serve

3. (Recommended) install the hooks — enables auto-restore after /clear

clexo install-hooks

or merge the hooks block from settings.json.example into

~/.claude/settings.json manually


Verify the MCP server with `claude mcp list` — you should see `clexo: clexo serve ✓ Connected`.

### Upgrading```bash
pipx install --force git+https://github.com/sankrant/clexo   # or: pipx upgrade clexo
clexo install                                                # re-points hooks + MCP if needed

Upgrading from an older git-clone install? Same two commands — clexo install re-points the old server.py-based hooks and MCP registration to the clexo command (backing up settings.json first) and removes the stale ~/.local/bin/clexo wrapper symlink.


💻 CLI```

clexo stats Show usage stats
clexo sync Index new messages now
clexo search <query> Search chat history
clexo save [sid|tag] Snapshot the current (or given) session
clexo saved [--short] List saved snapshots, newest first, with the
id fragment to reload each

clexo tag <name> [--force] [sid] Tag the current (or given) session
clexo tags [--short|--keywords] List tags, newest first (--short: name+date)
clexo untag <name> Remove a tag
clexo load <name|sid> Set pending snapshot and launch a fresh claude
(SessionStart hook injects the snapshot)
clexo resume <name|sid> Exec 'claude --resume <uuid>' — reopens the
original session, full history (no snapshot)
clexo resume (no args) Interactive picker over recent
sessions; choose resume / load mode
clexo show <name|sid> Print the saved snapshot to stdout (inspect only)

clexo install Wire MCP server + hooks into Claude Code
(re-runnable; re-points an older install)
clexo install-hooks Wire just the SessionStart + SessionEnd hooks
(idempotent; backs up settings.json first)
clexo serve Run the MCP server (Claude Code invokes this)


`load` vs `resume`: `load` is the clexo path — fresh session, compact snapshot, cheap context. `resume` is a friendly-name wrapper around `claude --resume ` — same session, full rehydrate, no clexo summarization.

All commands work from anywhere — `!clexo tag my-fix` inside a Claude session tags that session.

---

## 🔌 MCP tools

When clexo is registered as an MCP server, Claude can invoke these directly. You usually don&#x27;t call them manually — just say &quot;search my history for X&quot;, &quot;load my last session&quot;, &quot;tag this as auth-fix&quot;.

Tool · What it does
`search` · FTS search across all sessions (filters: `project_filter`, `source_filter=&#x27;claude&#x27;\ · &#x27;codex&#x27;`, `pwd=true` to scope to the current directory). `sort=&#x27;time&#x27;` displays results oldest-first. Empty query = list recent.
`load` · Load a session&#x27;s snapshot (summary + recent exchanges) into context. Accepts UUID or tag.
`save` · Snapshot the current session for restore on the next start.
`pick` · Drill into a session&#x27;s raw exchanges (incl. tool output). FTS-anchored; supports `before`/`after` scroll. Accepts UUID or tag.
`tag` · Assign a friendly name to a session. Collisions return a &quot;exists, pass `replace=True` or pick a new name&quot; prompt.
`tags` · List all tags (newest first) with each session&#x27;s summary and opening/closing lines. `short=True` for just name+date; `keywords=True` to add TF-IDF keywords.
`untag` · Remove a tag mapping.
`get_stats` · Usage counters.

---

## 🛠️ How it works

- **Indexing** — SQLite FTS5 (porter tokenizer). Byte-offset tracking per JSONL file means syncs are O(new bytes), not O(file size). New messages are picked up on the next search; the optional `SessionEnd` hook runs `--sync` in the background.
- **Source files** —
  - Claude Code: `~/.claude/projects/**/*.jsonl` (`user`/`assistant` messages; `ai-title`, `custom-title`, `last-prompt` records)
  - Codex: `~/.codex/sessions/**/*.jsonl` (`event_msg`, `response_item`)
- **Snapshots** — `save` writes `~/.clexo/chain-.md` containing the summary, key file refs, and the most recent N tokens of exchanges. The `SessionStart` hook reads the pending snapshot, packs it under Claude Code&#x27;s 10K hook context cap, and injects it as `additionalContext`.
- **Tags** — small `tags` table mapping `tag → session_id`. One session can have many tags; tag names are `[a-z0-9_-]`, normalized to lowercase, and can&#x27;t look like a UUID. Wherever a UUID is accepted (`load`, `pick`, `save`, `resume`), a tag works too.
- **Keywords in `tags` listing** — TF-IDF over each session&#x27;s messages: user text weighted 3×, raw count threshold 2 (filters typos/one-offs), IDF computed against the full corpus and cached across the listing.

---

## Configuration

`~/.clexo/config.json` (created on first use):```json
{
  &quot;refresh_tokens_min&quot;: 4000,
  &quot;refresh_tokens_max&quot;: 8000
}
Key Default Description
refresh_tokens_min 4000 Minimum token budget for save's exchange window
refresh_tokens_max 8000 Maximum token budget (cap)
debug false If true, write hook + sync diagnostics to ~/.clexo/hook.log

Tokens are approximated at 4 chars/token.


Tests```bash

pip install pytest
pytest tests/
```


License

MIT — see LICENSE.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
Clexo 怎么安装?

在客户端按下面的安装命令接入:pipx install git+https://github.com/sankrant/clexo clexo install。装完在客户端配置里引用同一个包或端点。

Clexo 怎么在 Claude、Cursor、VS Code 里配置?

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

Clexo 收费吗?

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

Clexo 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

Clexo 支持哪些客户端?

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

Clexo 能提供哪些能力?

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

Clexo 需要什么运行环境?

属于远程端点,不需要在本地装运行时。

Clexo 是本地还是远程?

它是远程端点,连服务地址即可。传输方式为HTTP · 远程。

热门专题

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

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