@contextstream/mcp-server 0.4.82 → 1.0.1

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.
package/NOTICE ADDED
@@ -0,0 +1,25 @@
1
+ ContextStream MCP Server
2
+ Copyright (c) 2025-2026 ContextStream
3
+
4
+ This product is developed and maintained by ContextStream as part of the
5
+ ContextStream platform (https://contextstream.io).
6
+
7
+ ContextStream is an independently developed cloud service providing persistent
8
+ memory and cross-session context management for AI coding assistants. The
9
+ platform includes proprietary backend services not included in this repository.
10
+
11
+ This MCP server is a client library that connects to the ContextStream API.
12
+ It requires a ContextStream account and API key to function.
13
+
14
+ TRADEMARKS
15
+
16
+ "ContextStream" and the ContextStream logo are trademarks of ContextStream.
17
+ Use of these trademarks requires prior written permission.
18
+
19
+ THIRD-PARTY LICENSES
20
+
21
+ This software uses open-source Rust crates recorded in Cargo.lock. The npm
22
+ compatibility launcher has no runtime package dependencies. Release SBOMs and
23
+ license reports provide the exact dependency inventory for each release.
24
+
25
+ For questions about licensing or trademark usage, contact: legal@contextstream.io
package/README.md CHANGED
@@ -1,402 +1,286 @@
1
+ <!-- mcp-name: io.github.contextstream/mcp-server -->
2
+
1
3
  <p align="center">
2
- <img src="https://contextstream.io/400logo.png" alt="ContextStream — persistent memory and semantic code search for AI coding assistants" width="80" />
4
+ <img src="assets/contextstream-logo.png" alt="ContextStream" width="112" />
3
5
  </p>
4
6
 
5
7
  <h1 align="center">ContextStream MCP Server</h1>
6
8
 
7
9
  <p align="center">
8
- <strong>Persistent memory, semantic code search, and team context for Claude Code, Cursor, VS Code Copilot, Windsurf — and every MCP-compatible AI coding assistant.</strong>
10
+ <em>Intelligence without context is unreliable. Autonomy without context is chaos.<br/>
11
+ And context without trust becomes surveillance.</em>
9
12
  </p>
10
13
 
11
14
  <p align="center">
12
- 🏆 <b>90.0% on LongMemEval-S</b> — the full 500-instance suite with the official judge.<br/>
13
- Beats supermemory with statistical significance; matches Zep. <a href="https://contextstream.io/benchmarks">See the benchmarks →</a>
15
+ <strong>Give every coding agent persistent memory, semantic code search, and the right project context on every turn.</strong>
14
16
  </p>
15
17
 
16
18
  <p align="center">
17
- <a href="https://www.npmjs.com/package/@contextstream/mcp-server"><img src="https://img.shields.io/npm/v/@contextstream/mcp-server.svg" alt="npm version" /></a>
18
- <a href="https://www.npmjs.com/package/@contextstream/mcp-server"><img src="https://img.shields.io/npm/dm/@contextstream/mcp-server.svg" alt="npm downloads" /></a>
19
- <a href="https://github.com/contextstream/mcp-server/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@contextstream/mcp-server.svg" alt="MIT license" /></a>
20
- <img src="https://img.shields.io/node/v/@contextstream/mcp-server.svg" alt="node version" />
19
+ Works with Claude Code, Cursor, VS Code + Copilot, Windsurf, Cline, Roo Code, Kilo Code, Codex, OpenCode, Aider, Antigravity, and other MCP clients.
21
20
  </p>
22
21
 
23
22
  <p align="center">
24
- <a href="https://contextstream.io/docs">Documentation</a> •
25
- <a href="https://contextstream.io/pricing">Pricing</a> •
26
- <a href="#faq">FAQ</a>
23
+ <a href="https://www.npmjs.com/package/@contextstream/mcp-server"><img src="https://img.shields.io/npm/v/@contextstream/mcp-server.svg" alt="npm version" /></a>
24
+ <a href="https://github.com/contextstream/mcp-server/releases/latest"><img src="https://img.shields.io/github/v/release/contextstream/mcp-server" alt="latest release" /></a>
25
+ <a href="https://github.com/contextstream/mcp-server/actions/workflows/ci.yml"><img src="https://github.com/contextstream/mcp-server/actions/workflows/ci.yml/badge.svg" alt="CI status" /></a>
26
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT license" /></a>
27
27
  </p>
28
28
 
29
- ---
30
-
31
- ## Try it in 30 seconds
32
-
33
- ```bash
34
- npx --prefer-online -y @contextstream/mcp-server@latest setup
35
- ```
36
-
37
- That one command detects your AI editors, writes their MCP configs and rules, installs lifecycle hooks where supported, indexes your project in the background, and **verifies everything it just did** — then you restart your editor and your AI has memory. Free tier available.
38
-
39
- Automating it? Zero-prompt mode takes every default:
40
-
41
- ```bash
42
- npx --prefer-online -y @contextstream/mcp-server@latest setup --yes
43
- ```
44
-
45
29
  <p align="center">
46
- <img src="contextstream-mcp-comparison.gif" alt="Animated comparison of an AI coding assistant working without ContextStream versus with ContextStream project memory, search, and graph context" width="600" />
30
+ <a href="#install-in-30-seconds"><strong>Install in 30 seconds</strong></a> ·
31
+ <a href="https://contextstream.io/benchmarks">Benchmarks</a> ·
32
+ <a href="https://contextstream.io/docs/mcp">Documentation</a> ·
33
+ <a href="https://contextstream.io/signup">Start free</a>
47
34
  </p>
48
35
 
49
36
  ---
50
37
 
51
- ## We win on memory benchmarks — measured honestly
38
+ Your AI should not have to rediscover the repository, re-learn the architecture,
39
+ or repeat last week's mistake every time a chat starts. ContextStream gives MCP
40
+ clients a shared context layer that remembers decisions and lessons, searches
41
+ code by meaning, maps dependencies, and restores the thread after compaction.
52
42
 
53
- **ContextStream scores 90.0% on the full LongMemEval-S benchmark**, the standard test of conversational memory over ~115k-token multi-session histories. That's the complete 500-instance suite with the official GPT-4o judge — 450/500 correct (89.6% single-shot, 90.0% with self-consistency k=3; Wilson 95% CI [87.1%, 92.3%]). Published June 14, 2026.
43
+ The server in this repository is the canonical, MIT-licensed Rust
44
+ implementation. The recommended editor transport is the hosted MCP at
45
+ `https://mcp.contextstream.io/mcp`; a small local helper keeps explicitly linked
46
+ checkouts in sync.
54
47
 
55
- | System | LongMemEval-S | Notes |
56
- |---|:---:|---|
57
- | **ContextStream** | **90.0%** | Full 500 instances, official GPT-4o judge |
58
- | Zep | 90.2% | Vendor-published — a statistical tie (0.2 pt is inside measurement noise) |
59
- | supermemory | 85.4% | Vendor-published — ContextStream wins with statistical significance |
48
+ ## Benchmarks: strong memory, strong retrieval, published methodology
60
49
 
61
- On **multi-session recall** — the memory that actually matters for a coding agent working across days of sessions — ContextStream scores **81.2% vs Zep's published 57.9%** in the per-family comparison. And on the agentic project-memory benchmark, the same memory raises **agent task success from 58% to 96%**.
50
+ We publish the full method, confidence intervals, comparison caveats, and known
51
+ losses—not just the winning number. The product-level figures below are from
52
+ the published July 2026 report; the LongMemEval-S result was published June 14,
53
+ 2026.
62
54
 
63
- Full methodology, per-family breakdowns, and judge-comparability notes (competitor numbers are cited from each vendor's own publications): **[contextstream.io/benchmarks](https://contextstream.io/benchmarks)**
55
+ | Benchmark | ContextStream result | What was measured |
56
+ |---|---:|---|
57
+ | **LongMemEval-S** | **90.0%** | 450/500 correct on the full suite; ~115k-token multi-session histories; official pinned GPT-4o judge; `gpt-5.5` reader with self-consistency `k=3` (89.6% single-shot); Wilson 95% CI [87.1%, 92.3%] |
58
+ | **Pinned-repo code search** | **99.38% Recall@10** | 93.83% Primary@10 and 95 ms successful-response p50 over 177 judged-valid queries, averaged across two cold and two warm runs; 0/708 failed requests; no local checkout |
59
+ | **Agentic project memory** | **96% task success** | Up from 58% without the memory layer; one repository, one agent model, three trials per cell, so this result is directional |
64
60
 
65
- ---
66
-
67
- ## What is ContextStream?
68
-
69
- **ContextStream is a Model Context Protocol (MCP) server that gives AI coding assistants long-term memory and deep codebase understanding.** It indexes your code for semantic search, records your decisions, lessons, and plans across sessions, maps your dependency graph, and pulls in team knowledge from GitHub, Slack, and Notion — then delivers exactly the right slice of all that to your AI on every message.
70
-
71
- It works with any MCP client: Claude Code, Cursor, VS Code + GitHub Copilot, Windsurf, Cline, Roo Code, Kilo Code, Codex CLI, OpenCode, Aider, Antigravity, and Claude Desktop.
72
-
73
- ---
74
-
75
- ## Which ContextStream runtime am I using?
61
+ On the standard memory benchmark, 90.0% is statistically above supermemory's
62
+ published 85.4% and statistically tied with Zep's published 90.2%. Those
63
+ comparisons use each vendor's published result; they are not presented as a
64
+ private same-run head-to-head.
76
65
 
77
- ContextStream has independent release lines. A `0.5.x` hosted version and a `0.4.x` npm version are different runtimes, not evidence that either updater is broken.
66
+ **[Read the full benchmark report, methodology, per-category results, and losses →](https://contextstream.io/benchmarks)**
78
67
 
79
- | Runtime | How to identify it | Version line | Canonical release metadata and notes |
80
- |---|---|---|---|
81
- | **Hosted MCP** | Your editor config uses `https://mcp.contextstream.io/mcp`. `help(action="version")` reports `runtime_type: rust-mcp`. | Rust MCP `0.5.x` | `help(action="version")` returns release notes inline when published and links the [machine-readable R2 manifest](https://pub-68429b9f7857416c9484b75bf1887b96.r2.dev/mcp/latest/version.json). |
82
- | **Installed Rust MCP** | Your editor launches a `contextstream-mcp` binary installed by `https://contextstream.io/scripts/mcp.sh`; run `contextstream-mcp --version`. | Rust MCP `0.5.x` | The same [machine-readable R2 manifest](https://pub-68429b9f7857416c9484b75bf1887b96.r2.dev/mcp/latest/version.json); `help(action="version")` maps this runtime to that manifest. |
83
- | **Legacy npm MCP (this repository)** | Your editor launches `npx ... @contextstream/mcp-server` or a global npm install. `help(action="version")` reports `runtime_type: legacy-typescript-mcp`; `npm list -g @contextstream/mcp-server` shows the installed package. | TypeScript MCP `0.4.x` | [GitHub releases](https://github.com/contextstream/mcp-server/releases) and this repository's [CHANGELOG.md](CHANGELOG.md). |
84
- | **ContextStream Desktop** | Check the app's About/update UI. Desktop may run the local sync bridge, but that does not change the MCP runtime configured in your editor. | Desktop `0.3.x` (independent) | The in-app updater and the public [Desktop version JSON](https://api.contextstream.io/api/v1/desktop/version), which includes `release_notes` and platform downloads. |
68
+ The repository also includes Criterion suites for JSON-RPC parsing, tool
69
+ dispatch, response serialization, and stdio/HTTP transport primitives. Run
70
+ them locally with `cargo bench --locked -p mcp-server`.
85
71
 
86
- The `version` reported by `help(action="version")` is always the MCP process serving that tool call. Desktop's version is separate, even when Desktop added or indexed the local repository.
72
+ ## Install in 30 seconds
87
73
 
88
- ---
89
-
90
- ## Why do AI coding assistants forget everything?
91
-
92
- Because every conversation starts from zero. Your AI re-reads the same files, re-derives the same architecture, repeats last week's mistake, and loses the thread the moment the context window compacts. ContextStream fixes the whole class of problem:
93
-
94
- | Without ContextStream | With ContextStream |
95
- |--------|-------|
96
- | AI greps files one-by-one, burning tokens | **Semantic code search** finds code by meaning in milliseconds |
97
- | Context lost when conversations get long | **Pre-compaction capture** saves critical state before it's gone — and restores it after |
98
- | Same mistakes repeated across sessions | **Lessons system** surfaces past failures *before* your AI repeats them |
99
- | "Why did we choose X?" — nobody remembers | **Decisions and plans** persist and resurface when relevant |
100
- | Team knowledge scattered across tools | **GitHub, Slack, and Notion knowledge**, queried automatically |
101
- | Generic answers with no project awareness | **Workspace context** on every single message |
102
-
103
- ---
74
+ Pick the command for your platform. Each installer downloads the current native
75
+ release and launches the guided setup wizard.
104
76
 
105
- ## What your AI can do after setup
106
-
107
- ### 🔍 Find code by meaning, not keywords
108
- Ask *"where do we handle authentication?"* and get ranked, snippet-level answers instantly. Hybrid semantic + keyword search with exact-token fusion, so a symbol lookup like `resolveWriteScope` lands the definition — not lookalikes. Search works the moment setup finishes: keyword results come back immediately while the semantic index builds in the background.
109
-
110
- ### 🧠 Remember everything that matters
111
- Decisions, lessons, preferences, plans, tasks, docs, runbooks — captured during work and surfaced automatically on later turns, in later sessions, even after context compaction. Every prior session's transcript is indexed and queryable: *"what did we decide about the id format last week?"* just works.
112
-
113
- ### 💬 Ask the workspace when stuck
114
- The built-in **Agent Q&A** tool lets your AI ask your workspace's knowledge base — prior decisions, conventions, runbooks, guardrails — and get a grounded answer with citations for every claim.
115
-
116
- ### 🕸️ See the whole graph
117
- *"What depends on `UserService`?" "What breaks if I change this function?"* Dependency mapping, impact analysis, circular-dependency and dead-code detection over your whole codebase.
118
-
119
- ### 📦 Hand off context between agents
120
- **ContextCapsule** packages project state into a portable, shareable snapshot — bootstrap a fresh agent, hand off to a teammate, or share a token-gated link with an external agent.
121
-
122
- ### 🛡️ Survive long sessions
123
- Token pressure is tracked continuously (with thresholds sized to your model's context window). Before compaction hits, critical state is checkpointed; after it, context restores.
124
-
125
- ---
126
-
127
- ## Which AI editors and agents does it support?
128
-
129
- | Editor / Agent | Managed rules | MCP config | Lifecycle hooks |
130
- |---|:---:|:---:|:---:|
131
- | Claude Code | ✅ | ✅ | ✅ |
132
- | Cursor | ✅ (`.cursor/rules/*.mdc`) | ✅ | ✅ |
133
- | Windsurf | ✅ | ✅ | ✅ |
134
- | Cline | ✅ | ✅ | ✅ |
135
- | Roo Code | ✅ | ✅ | ✅ |
136
- | Kilo Code | ✅ | ✅ | rules-based |
137
- | VS Code + GitHub Copilot | ✅ | ✅ (incl. hosted OAuth) | rules-based |
138
- | Codex CLI | ✅ | ✅ | rules-based |
139
- | OpenCode | ✅ | ✅ | rules-based |
140
- | Aider | ✅ | ✅ | rules-based |
141
- | Antigravity | ✅ | ✅ | rules-based |
142
- | Claude Desktop | — | ✅ | — |
143
-
144
- Anything that speaks the Model Context Protocol can connect — the table just shows what the setup wizard configures automatically.
145
-
146
- ---
147
-
148
- ## Tools
149
-
150
- 36 tools in the default surface, organized as consolidated domains so they cost ~75% fewer tokens than individual registrations. The tools your AI gets:
151
-
152
- - **init** / **context** — workspace state + the right context on every message
153
- - **search** — semantic, hybrid, keyword, pattern, exhaustive, refactor modes
154
- - **memory** — events, decisions, docs, runbooks, tasks, todos, diagrams, transcripts
155
- - **session** — capture decisions & lessons, recall past sessions, plans, retroactive capture
156
- - **qa** — grounded Q&A over your workspace knowledge base, with citations
157
- - **graph** — dependencies, impact analysis, circular deps, unused code
158
- - **capsule** — portable, shareable context snapshots for agent handoffs
159
- - **entity** — tickets, incidents, releases, sprints, OKRs, risks
160
- - **project** / **workspace** — project indexing, scope, and workspace management
161
- - **skill** — reusable instruction + action bundles, portable across tools
162
- - **media** — index and search images, video, audio, and documents
163
- - **vcs** / **reminder** / **integration** / **help** — repo links, reminders, integrations, diagnostics
164
-
165
- Plus focused write tools (`capture_plan`, `memory_create_doc`, `session_capture_lesson`, …) so agents that display tool names show *what* they're doing. Your AI uses all of this automatically — you just code.
166
-
167
- ### Daily Recaps
168
-
169
- Daily Recaps are generated around **23:00 in your configured timezone** when there is enough activity. They are not triggered by closing an editor, changing an MCP `session_id`, or starting a new chat, so long-lived VS Code/Copilot connections do not suppress the nightly job.
170
-
171
- - `session(action="list_recaps", workspace_id="<uuid>", limit=30)` lists completed recaps newest-first with `recap_date` and `generated_at` timestamps.
172
- - `session(action="trigger_recap", workspace_id="<uuid>")` queues an asynchronous manual recap. Call `list_recaps` afterward to verify completion.
173
-
174
- These actions use the same recap history and generation service as the dashboard.
175
-
176
- ---
177
-
178
- ## CLI commands
77
+ ### macOS and Linux
179
78
 
180
79
  ```bash
181
- contextstream-mcp setup # interactive onboarding wizard
182
- contextstream-mcp setup --yes # zero-prompt setup with sane defaults (great for CI/dotfiles)
183
- contextstream-mcp doctor # ✓/✗ diagnostics: auth, scope, index health, rules, hooks
184
- contextstream-mcp index [path] # index a project folder on demand
80
+ curl -fsSL https://contextstream.io/scripts/setup.sh | bash
185
81
  ```
186
82
 
187
- `setup --editors=claude,cursor` limits configuration to specific editors; `doctor` tells you exactly what's misconfigured and how to fix it — it runs automatically at the end of every setup.
83
+ Native releases are published for macOS Apple Silicon and Intel, plus Linux
84
+ ARM64 and x64.
188
85
 
189
- ---
86
+ ### Windows PowerShell
190
87
 
191
- ## Manual configuration
88
+ ```powershell
89
+ irm https://contextstream.io/scripts/setup.ps1 | iex
90
+ ```
192
91
 
193
- > Skip this if you ran the setup wizard.
92
+ The Windows installer uses the native x64 binary and installs it in your user
93
+ profile, so it does not need an administrator shell.
194
94
 
195
- <details>
196
- <summary><b>Claude Code</b></summary>
95
+ ### npm alternative (Node.js 20+)
197
96
 
198
97
  ```bash
199
- claude mcp add contextstream -- npx --prefer-online -y @contextstream/mcp-server@latest
200
- claude mcp update contextstream -e CONTEXTSTREAM_API_URL=https://api.contextstream.io -e CONTEXTSTREAM_API_KEY=your_key
98
+ npx -y @contextstream/mcp-server@latest setup
201
99
  ```
202
100
 
203
- </details>
101
+ The dependency-free npm launcher selects the matching release artifact,
102
+ verifies its SHA-256 checksum, caches it by exact package version, and starts
103
+ the Rust binary. It supports macOS ARM64/x64, Linux ARM64/x64, and Windows x64.
204
104
 
205
- <details>
206
- <summary><b>Cursor / Claude Desktop</b></summary>
105
+ ### What the wizard does
207
106
 
208
- ```json
209
- {
210
- "mcpServers": {
211
- "contextstream": {
212
- "command": "npx",
213
- "args": ["--prefer-online", "-y", "@contextstream/mcp-server@latest"],
214
- "env": {
215
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
216
- "CONTEXTSTREAM_API_KEY": "your_key"
217
- }
218
- }
219
- }
220
- }
221
- ```
222
-
223
- **Locations:** `~/.cursor/mcp.json` • `~/Library/Application Support/Claude/claude_desktop_config.json`
107
+ The wizard signs you in, detects supported editors, writes their hosted MCP
108
+ configuration and managed rules, installs lifecycle hooks where supported,
109
+ links the exact project folder you choose, starts indexing, and checks the
110
+ result. You review the choices before it makes changes.
224
111
 
225
- </details>
112
+ After setup, restart the editor and try:
226
113
 
227
- <details>
228
- <summary><b>OpenCode</b></summary>
114
+ > Use ContextStream to summarize this repository, cite the files you relied on,
115
+ > and tell me one active decision or risk that should affect my next change.
229
116
 
230
- Local server:
117
+ Want to inspect the changes first? Every setup write can be previewed:
231
118
 
232
- ```json
233
- {
234
- "$schema": "https://opencode.ai/config.json",
235
- "mcp": {
236
- "contextstream": {
237
- "type": "local",
238
- "command": ["npx", "-y", "contextstream-mcp"],
239
- "environment": {
240
- "CONTEXTSTREAM_API_KEY": "{env:CONTEXTSTREAM_API_KEY}"
241
- },
242
- "enabled": true
243
- }
244
- }
245
- }
119
+ ```bash
120
+ contextstream-mcp setup --dry-run
246
121
  ```
247
122
 
248
- Remote server:
123
+ Already configured and troubleshooting? Run:
249
124
 
250
- ```json
251
- {
252
- "$schema": "https://opencode.ai/config.json",
253
- "mcp": {
254
- "contextstream": {
255
- "type": "remote",
256
- "url": "https://mcp.contextstream.com",
257
- "enabled": true
258
- }
259
- }
260
- }
125
+ ```bash
126
+ contextstream-mcp doctor --scope=all --only-configured
261
127
  ```
262
128
 
263
- For the local variant, export `CONTEXTSTREAM_API_KEY` before launching OpenCode.
264
-
265
- **Locations:** `./opencode.json` • `~/.config/opencode/opencode.json`
266
-
267
- </details>
129
+ ## No-install hosted connection
268
130
 
269
- <details>
270
- <summary><b>VS Code + GitHub Copilot</b></summary>
271
-
272
- The easiest path is the hosted remote MCP with built-in OAuth — no API key in the config file:
131
+ If your MCP client supports Streamable HTTP and OAuth, connect directly—there
132
+ is no local MCP process to keep running:
273
133
 
274
134
  ```json
275
135
  {
276
- "servers": {
136
+ "mcpServers": {
277
137
  "contextstream": {
278
138
  "type": "http",
279
- "url": "https://mcp.contextstream.io/mcp?default_context_mode=fast"
280
- }
281
- }
282
- }
283
- ```
284
-
285
- `setup` defaults VS Code/Copilot to this hosted remote on the production cloud. To force a local runtime, run setup with `CONTEXTSTREAM_VSCODE_MCP_MODE=local`, or use stdio directly:
286
-
287
- ```json
288
- {
289
- "servers": {
290
- "contextstream": {
291
- "type": "stdio",
292
- "command": "npx",
293
- "args": ["--prefer-online", "-y", "@contextstream/mcp-server@latest"],
294
- "env": {
295
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
296
- "CONTEXTSTREAM_API_KEY": "your_key",
297
- "CONTEXTSTREAM_TOOLSET": "complete"
298
- }
139
+ "url": "https://mcp.contextstream.io/mcp"
299
140
  }
300
141
  }
301
142
  }
302
143
  ```
303
144
 
304
- Keep both `~/.copilot/mcp-config.json` (uses `mcpServers`) and `.vscode/mcp.json` (uses `servers`) in sync — setup writes both.
305
-
306
- </details>
145
+ Some clients use a different root key or config format, which is why the setup
146
+ wizard is the easiest path. The hosted gateway is the default; the installed
147
+ helper only syncs the local checkouts you explicitly link.
307
148
 
308
- <details>
309
- <summary><b>GitHub Copilot CLI</b></summary>
310
-
311
- Use `/mcp add` interactively, or add to `~/.copilot/mcp-config.json`:
149
+ Clients that require stdio can use the verified npm launcher:
312
150
 
313
151
  ```json
314
152
  {
315
153
  "mcpServers": {
316
154
  "contextstream": {
317
155
  "command": "npx",
318
- "args": ["--prefer-online", "-y", "@contextstream/mcp-server@latest"],
156
+ "args": ["-y", "@contextstream/mcp-server@latest"],
319
157
  "env": {
320
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
321
- "CONTEXTSTREAM_API_KEY": "your_key",
322
- "CONTEXTSTREAM_TOOLSET": "complete"
158
+ "CONTEXTSTREAM_API_KEY": "your-api-key"
323
159
  }
324
160
  }
325
161
  }
326
162
  }
327
163
  ```
328
164
 
329
- See the [GitHub Copilot CLI documentation](https://docs.github.com/en/copilot/concepts/agents/about-copilot-cli) for details.
330
-
331
- </details>
165
+ For production automation, pin an exact 1.x package version instead of
166
+ `latest`.
332
167
 
333
- <details>
334
- <summary><b>Unmapped folders (global fallback workspace)</b></summary>
168
+ ## What your agent gets
335
169
 
336
- Folders that aren't associated with any project (your home directory, ad-hoc scratch dirs) still work: `init` falls back to a hidden catch-all workspace in workspace-only mode, memory/session/context tools keep functioning, and project-bound actions return guided remediation instead of raw errors. The moment you enter a mapped project folder, the real workspace/project takes over.
337
-
338
- </details>
339
-
340
- ---
170
+ | Capability | What changes in practice |
171
+ |---|---|
172
+ | **Grounded context** | Each turn starts with the relevant workspace rules, prior decisions, lessons, and current project state. |
173
+ | **Semantic code search** | Find implementations by intent, with hybrid, keyword, pattern, exhaustive, and refactor-aware modes when precision matters. |
174
+ | **Durable memory** | Decisions, plans, tasks, runbooks, preferences, and session transcripts remain queryable across chats and tools. |
175
+ | **Compaction survival** | Important state is checkpointed before long conversations compact and restored afterward. |
176
+ | **Dependency intelligence** | Trace blast radius, dependencies, circular imports, complexity, and unused code without manually rebuilding the graph. |
177
+ | **Agent handoffs** | Package verified state and next steps into durable handoffs and portable ContextCapsules. |
178
+ | **Team context** | Bring shared workspace knowledge and supported GitHub, Slack, and Notion context into the same MCP surface. |
341
179
 
342
- ## FAQ
180
+ The default tool surface is grouped into focused domains—`context`, `search`,
181
+ `memory`, `session`, `graph`, `entity`, `capsule`, `project`, `workspace`,
182
+ `skill`, `media`, `vcs`, and more—so agents get broad capability without an
183
+ enormous tool-registration prompt.
343
184
 
344
- ### What is an MCP server?
185
+ ## Supported editors and agents
345
186
 
346
- An MCP (Model Context Protocol) server exposes tools and context to AI assistants over a standard protocol. Claude Code, Cursor, VS Code Copilot, Windsurf, and most modern AI coding tools are MCP clients — install one server, and every client you use gets the same capabilities.
187
+ The wizard currently detects and configures:
347
188
 
348
- ### Does ContextStream work with Claude Code / Cursor / Copilot / Windsurf?
189
+ - Claude Code
190
+ - Cursor
191
+ - Windsurf
192
+ - VS Code + GitHub Copilot
193
+ - Cline
194
+ - Kilo Code
195
+ - Roo Code
196
+ - OpenAI Codex
197
+ - Aider
198
+ - Antigravity
199
+ - OpenCode
349
200
 
350
- Yes — all of them, plus Cline, Roo Code, Kilo Code, Codex CLI, OpenCode, Aider, Antigravity, and Claude Desktop. The setup wizard configures each editor's MCP config, managed rules, and (where the editor supports them) lifecycle hooks automatically.
201
+ Anything else that speaks the Model Context Protocol can connect to the hosted
202
+ URL or use the stdio launcher.
351
203
 
352
- ### Is my code private?
204
+ ## What is open source?
353
205
 
354
- Your code is private and securely stored, isolated per workspace with no cross-tenant access. You control exclusions with `.contextstream/ignore` (gitignore syntax), and `project(action="purge")` completely de-indexes a project on demand — without touching your captured memory.
206
+ This repository contains the canonical Rust MCP server, protocol types, client
207
+ and session layers, editor setup, hooks, public transport code, release
208
+ automation, and the MongoDB-free acceleration foundation. It builds as seven
209
+ workspace crates:
355
210
 
356
- ### How much does it cost?
211
+ - `mcp-server`
212
+ - `mcp-tools`
213
+ - `mcp-client`
214
+ - `mcp-session`
215
+ - `mcp-types`
216
+ - `mcp-model-registry`
217
+ - `mcp-acceleration-products`
357
218
 
358
- There's a free tier to start with. Larger indexes, the full code graph, and team features are on paid plans: see [pricing](https://contextstream.io/pricing).
219
+ The hosted backend, credentials, production deployment configuration, and
220
+ premium provider implementations are not included. Public-build compatibility
221
+ traits remain no-op so the core protocol surface stays stable. See
222
+ [`docs/architecture.md`](docs/architecture.md) for the boundary.
359
223
 
360
- ### How does ContextStream score on memory benchmarks?
224
+ ## Privacy and data controls
361
225
 
362
- 90.0% on the full 500-instance LongMemEval-S suite with the official GPT-4o judge (89.6% single-shot) — beating supermemory's published 85.4% with statistical significance and matching Zep's published 90.2% within the confidence interval. On multi-session recall specifically, ContextStream scores 81.2% vs Zep's published 57.9%. Methodology and per-family breakdowns: [contextstream.io/benchmarks](https://contextstream.io/benchmarks).
226
+ Setup shows a disclosure before changing editor configuration or indexing a
227
+ project. You choose the folder and workspace relationship; only matching source
228
+ files from a validated project can be indexed. Transcript capture, local Git
229
+ metadata capture, ignore rules, kill switches, retention behavior, and deletion
230
+ paths are documented in [`docs/data-handling.md`](docs/data-handling.md).
363
231
 
364
- ### How is this different from other AI memory tools?
232
+ Review that document before using `setup --yes` in automation. The CLI also
233
+ provides `--dry-run` for setup, repair, migration, and uninstall workflows.
365
234
 
366
- Most tools store notes. ContextStream combines **memory** (decisions, lessons, plans, session transcripts), **semantic code search** over your indexed codebase, a **dependency/knowledge graph**, **grounded Q&A with citations**, and **team integrations** (GitHub, Slack, Notion) behind one MCP server — and proactively delivers the relevant slice on every message instead of waiting to be asked.
235
+ ## Build and test from source
367
236
 
368
- ### Can I use it in CI or scripted environments?
237
+ The workspace uses the Rust toolchain pinned in `rust-toolchain.toml`.
369
238
 
370
- Yes: `setup --yes` runs the entire wizard with zero prompts (set `CONTEXTSTREAM_API_KEY` in the environment), `--editors=<list>` scopes it, and `contextstream-mcp doctor` gives scriptable ✓/✗ diagnostics.
239
+ ```bash
240
+ cargo build --locked -p mcp-server --bin contextstream-mcp
241
+ cargo test --locked --workspace
242
+ cargo bench --locked -p mcp-server
243
+ ```
371
244
 
372
- ### Do I have to wait for indexing?
245
+ To build the hosted HTTP gateway foundation:
373
246
 
374
- No. Project indexing runs in the background — keyword search works immediately, and semantic results fill in as the index builds. Check progress anytime with `contextstream-mcp doctor`.
247
+ ```bash
248
+ cargo build --locked --release -p mcp-server --bin contextstream-mcp \
249
+ --features remote-acceleration
250
+ ```
375
251
 
376
- ### How do I uninstall or disable it?
252
+ ## Release integrity
377
253
 
378
- Remove the `contextstream` entry from your editor's MCP config, and set `CONTEXTSTREAM_HOOK_ENABLED=false` (or re-run setup) to disable hooks. `project(action="forget_local")` unbinds a folder locally without touching server-side data.
254
+ Every release publishes native binaries, `checksums.txt`, `version.json`, and
255
+ an SPDX SBOM. The npm launcher downloads only from the immutable path for its
256
+ exact package version, verifies manifests and binary SHA-256, uses an atomic
257
+ versioned cache, and supports verified offline reuse with
258
+ `CONTEXTSTREAM_MCP_OFFLINE=1`.
379
259
 
380
- ---
260
+ See [`docs/release.md`](docs/release.md) for the release contract and
261
+ [the latest GitHub release](https://github.com/contextstream/mcp-server/releases/latest)
262
+ for artifacts.
381
263
 
382
- ## Troubleshooting
264
+ All 1.x npm releases preserve these executable aliases:
383
265
 
384
- - **Start with `contextstream-mcp doctor`** — it checks auth, API reachability, folder scope, index health, rule files, and hooks, with a fix hint per failure.
385
- - Remove duplicate ContextStream entries across Workspace/User config scopes.
386
- - Check `CONTEXTSTREAM_API_URL` and `CONTEXTSTREAM_API_KEY` are set; remove stale version pins like `@contextstream/mcp-server@0.3.xx`.
387
- - Restart your editor after config changes.
388
- - **Hosted HTTP OAuth:** the remote transport's OAuth flow routes through `vscode.dev`; where that's blocked (corporate networks), use stdio with an API key instead.
389
- - **SDK compatibility:** `@modelcontextprotocol/sdk` 1.28.0+ introduces breaking changes; this package pins `>=1.25.1 <1.28.0`. If you see Zod schema errors on startup, check your SDK resolution.
266
+ - `mcp-server`
267
+ - `contextstream-mcp`
268
+ - `contextstream-hook` (forwards to the Rust `hook` subcommand)
390
269
 
391
- ---
270
+ ## Contributing and security
392
271
 
393
- ## Links
272
+ Issues and pull requests are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md),
273
+ [SECURITY.md](SECURITY.md), and [GOVERNANCE.md](GOVERNANCE.md). Contributions
274
+ must include the Developer Certificate of Origin sign-off (`git commit -s`).
394
275
 
395
- **Website:** https://contextstream.io • **Docs:** https://contextstream.io/docs • **Changelog:** [CHANGELOG.md](CHANGELOG.md)
276
+ The code is MIT licensed. ContextStream trademarks and the hosted-service
277
+ boundary are described in [NOTICE](NOTICE).
396
278
 
397
279
  ---
398
280
 
399
281
  <p align="center">
400
- <strong>Stop teaching your AI the same things over and over.</strong><br/>
401
- <sub>ContextStream makes it brilliant from the first message.</sub>
282
+ <strong>Stop teaching your coding agent the same project twice.</strong><br />
283
+ <a href="#install-in-30-seconds">Install ContextStream</a> ·
284
+ <a href="https://contextstream.io/signup">Start free</a> ·
285
+ <a href="https://contextstream.io/docs/mcp">Read the docs</a>
402
286
  </p>
Binary file
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { run } from "../launcher.mjs";
3
+
4
+ try {
5
+ await run({ mode: "hook" });
6
+ } catch (error) {
7
+ console.error(`ContextStream launcher: ${error?.message ?? error}`);
8
+ process.exitCode = 1;
9
+ }
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ import { run } from "../launcher.mjs";
3
+
4
+ try {
5
+ await run({ mode: "server" });
6
+ } catch (error) {
7
+ console.error(`ContextStream launcher: ${error?.message ?? error}`);
8
+ process.exitCode = 1;
9
+ }