compendium-mcp 0.6.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +26 -9
  2. package/package.json +13 -9
package/README.md CHANGED
@@ -8,6 +8,21 @@ MCP server that **minimizes LLM token usage** by compressing, summarizing, filte
8
8
 
9
9
  Built in Rust with the official [`rmcp`](https://crates.io/crates/rmcp) SDK.
10
10
 
11
+ ## Why / when to use Compendium
12
+
13
+ Use it when an agent is about to paste **large or noisy context** into the model (build logs, test dumps, API JSON, untrusted web/tool text, long chat, or a fresh workspace). The goal is a **smaller, safer, still-useful** prompt — not another planner or agent runtime.
14
+
15
+ | Situation | Call |
16
+ |-----------|------|
17
+ | Unsure which action | `catalog` → `help` + `id` (or read `cmp://skill/…`) |
18
+ | New task in a repo | `brief` with a short `query` |
19
+ | Noisy terminal / CLI dump | `filter` (generic) or `compress_output` (cargo/npm/docker/git/…) |
20
+ | Bulky text/JSON to densify | `compress` (small inputs bypass unless `force`) |
21
+ | Untrusted paste / secrets / IPI | `sanitize` (or `sanitize_input: true` on the next action) |
22
+ | Guided recipe | `playbooks` → `playbook` |
23
+
24
+ Heuristic paths work with **no local model**. Optional loopback LLM improves `summarize_smart` / hybrid `rerank` / smart `filter_relevant`.
25
+
11
26
  ## Quick start (Cursor)
12
27
 
13
28
  You need **Node.js 18+**. Compendium itself arrives via npm — no Rust install required.
@@ -90,14 +105,14 @@ Binary packaging details for maintainers: [npm/DISTRIBUTION.md](npm/DISTRIBUTION
90
105
 
91
106
  | Mode | Command | Notes |
92
107
  |------|---------|-------|
93
- | **stdio** (default) | `compendium` / `compendium stdio` | Cursor / Claude Desktop |
94
- | **Streamable HTTP/SSE** | `compendium http [BIND]` | Requires `--features http`. Endpoint: `http://{bind}/mcp` |
108
+ | **stdio** (default) | `compendium` / `compendium stdio` | Cursor / Claude Desktop — dual-compat (legacy initialize or modern connect) |
109
+ | **Streamable HTTP** | `compendium http [BIND]` | Requires `--features http`. Endpoint: `http://{bind}/mcp`. Sessionless (`2026-07-28`); JSON preferred, SSE fallback |
95
110
 
96
- Default HTTP bind: `127.0.0.1:8788` (override with arg or `COMPENDIUM_HTTP_BIND`).
111
+ Default HTTP bind: `127.0.0.1:8788` (override with arg or `COMPENDIUM_HTTP_BIND`). App cache (`COMPENDIUM_CACHE_DIR`) is not an MCP session — set it for multi-request HTTP. See playbook `http-transport`.
97
112
 
98
113
  ## Tools
99
114
 
100
- Single MCP tool: **`compendium`**. Choose the operation with `action`:
115
+ Single MCP tool: **`compendium`**. Choose the operation with `action`. Prefer the [Why / when](#why--when-to-use-compendium) table for the first call; use the full list below only when you need a specific field.
101
116
 
102
117
  | `action` | Purpose | Main fields |
103
118
  |----------|---------|-------------|
@@ -144,7 +159,7 @@ Optional on most text actions: `sanitize_input: true` scrubs before processing.
144
159
 
145
160
  `brief` walks `brief.root` (default: process cwd) with `.gitignore` / `.ignore`, BM25-ranks paths/chunks, window-reads oversized files (not head-truncate), and returns a structured `briefing`: **Task / Status / Evidence / Caveats / Sources / Read next**, plus `cache_key`. Status uses a local SLM when `COMPENDIUM_LOCAL_LLM_URL` is set (`backend: local_llm`); otherwise heuristic bullets. Caveats flag truncated files and docs older than selected code. **Read next** includes source paths plus suggested `cmp://skill/playbook/…` / action URIs. Optional `COMPENDIUM_BRIEF_ROOT` restricts allowed roots. Briefings are sanitized by default.
146
161
 
147
- Example:
162
+ Example — noisy log (canonical first call after install):
148
163
 
149
164
  ```json
150
165
  {
@@ -154,6 +169,8 @@ Example:
154
169
  }
155
170
  ```
156
171
 
172
+ Discover more without reading this README: `{"action":"catalog"}` then `{"action":"help","id":"compress_output"}`. Sample payloads: [`examples/`](examples/).
173
+
157
174
  Response envelope: `{ "ok": true, "action": "filter", "result_json": "{...}" }`. Parse `result_json` as JSON for the action-specific payload.
158
175
 
159
176
  ## Project layout
@@ -162,14 +179,14 @@ Response envelope: `{ "ok": true, "action": "filter", "result_json": "{...}" }`.
162
179
  assets/ # brand mark (SVG/PNG); baked into MCP icons via data URI
163
180
  docs/ # architecture notes
164
181
  examples/ # sample MCP tool-call JSON payloads
165
- testdata/ # eval fixtures (noisy logs, cargo fail, …)
182
+ testdata/ # eval fixtures (logs, audit, PR JSON, untrusted paste, …)
166
183
  src/
167
184
  main.rs # CLI: stdio | http
168
185
  lib.rs
169
186
  brand.rs # SEP-973 icons for serverInfo + tool
170
187
  config.rs # COMPENDIUM_* env config
171
188
  server/ # MCP tool + resources + action handlers (rmcp)
172
- http.rs # Streamable HTTP/SSE (feature = "http")
189
+ http.rs # Streamable HTTP, sessionless (feature = "http")
173
190
  pipeline/
174
191
  brief/ # workspace brief (walk / window / pack / synthesize)
175
192
  tokens.rs # heuristic or tiktoken BPE (feature = "real-tokens")
@@ -192,7 +209,7 @@ tests/
192
209
  e2e_smoke.rs # spawns binary, MCP handshake, tools + resources
193
210
  eval_regression.rs # B1 heuristic quality + latency smoke
194
211
  CHANGELOG.md
195
- REPORT.md # design essay + Shipped/Next/Deferred roadmap
212
+ REPORT.md # design essay + Shipped (A–C) / Next ops / Deferred roadmap
196
213
  ```
197
214
 
198
215
  ## Build
@@ -392,7 +409,7 @@ cargo test --test e2e_smoke
392
409
  cargo run --features http -- http 127.0.0.1:8788
393
410
  ```
394
411
 
395
- `e2e_smoke` spawns `CARGO_BIN_EXE_compendium`, completes the MCP initialize handshake over stdio, lists tools, then calls gateway actions. `http_smoke` (requires `--features http`) exercises streamable HTTP in-process.
412
+ `e2e_smoke` spawns `CARGO_BIN_EXE_compendium`, completes MCP connect (legacy initialize) over stdio, lists tools, then calls gateway actions. `http_smoke` (requires `--features http`) exercises sessionless streamable HTTP in-process.
396
413
 
397
414
  ## Design notes
398
415
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compendium-mcp",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "description": "MCP server that compresses, summarizes, and filters context to minimize LLM token usage",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -34,17 +34,21 @@
34
34
  "LICENSE"
35
35
  ],
36
36
  "scripts": {
37
- "prepack": "node npm/scripts/check-wrapper.js",
37
+ "check-npm-gates": "node npm/scripts/check-versions-selftest.js && node npm/scripts/check-versions.js && node npm/scripts/check-residual-npm.js",
38
+ "check-versions": "node npm/scripts/check-versions.js",
39
+ "check-versions-selftest": "node npm/scripts/check-versions-selftest.js",
40
+ "check-residual-npm": "node npm/scripts/check-residual-npm.js",
41
+ "prepack": "node npm/scripts/check-wrapper.js && node npm/scripts/check-versions.js",
38
42
  "prepare": "node npm/scripts/link-bins.js"
39
43
  },
40
44
  "optionalDependencies": {
41
- "compendium-mcp-darwin-arm64": "0.6.0",
42
- "compendium-mcp-darwin-x64": "0.6.0",
43
- "compendium-mcp-linux-x64": "0.6.0",
44
- "compendium-mcp-linux-x64-musl": "0.6.0",
45
- "compendium-mcp-linux-arm64": "0.6.0",
46
- "compendium-mcp-win32-x64": "0.6.0",
47
- "compendium-mcp-win32-arm64": "0.6.0"
45
+ "compendium-mcp-darwin-arm64": "0.6.2",
46
+ "compendium-mcp-darwin-x64": "0.6.2",
47
+ "compendium-mcp-linux-x64": "0.6.2",
48
+ "compendium-mcp-linux-x64-musl": "0.6.2",
49
+ "compendium-mcp-linux-arm64": "0.6.2",
50
+ "compendium-mcp-win32-x64": "0.6.2",
51
+ "compendium-mcp-win32-arm64": "0.6.2"
48
52
  },
49
53
  "preferUnplugged": true
50
54
  }