@contextstream/mcp-server 0.4.82 → 1.0.0
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 +25 -0
- package/README.md +77 -353
- package/npm/bin/contextstream-hook.mjs +9 -0
- package/npm/bin/contextstream-mcp.mjs +9 -0
- package/npm/bin/mcp-server.mjs +9 -0
- package/npm/launcher.mjs +390 -0
- package/package.json +27 -72
- package/server.json +43 -0
- package/dist/hooks/auto-rules.js +0 -3529
- package/dist/hooks/media-aware.js +0 -103
- package/dist/hooks/notification.js +0 -162
- package/dist/hooks/on-bash.js +0 -190
- package/dist/hooks/on-read.js +0 -321
- package/dist/hooks/on-save-intent.js +0 -132
- package/dist/hooks/on-task.js +0 -139
- package/dist/hooks/on-web.js +0 -155
- package/dist/hooks/permission-request.js +0 -174
- package/dist/hooks/post-compact.js +0 -172
- package/dist/hooks/post-tool-use-failure.js +0 -213
- package/dist/hooks/post-write.js +0 -1023
- package/dist/hooks/pre-compact.js +0 -317
- package/dist/hooks/pre-tool-use.js +0 -553
- package/dist/hooks/runner.js +0 -5826
- package/dist/hooks/session-end.js +0 -285
- package/dist/hooks/session-init.js +0 -1880
- package/dist/hooks/stop.js +0 -171
- package/dist/hooks/subagent-start.js +0 -195
- package/dist/hooks/subagent-stop.js +0 -301
- package/dist/hooks/task-completed.js +0 -260
- package/dist/hooks/teammate-idle.js +0 -200
- package/dist/hooks/user-prompt-submit.js +0 -866
- package/dist/index.js +0 -41985
- package/dist/test-server.js +0 -4363
- package/scripts/postinstall.js +0 -56
- package/scripts/registration-smoke.mts +0 -45
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,126 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="https://contextstream.io/400logo.png" alt="ContextStream — persistent memory and semantic code search for AI coding assistants" width="80" />
|
|
3
|
-
</p>
|
|
1
|
+
<!-- mcp-name: io.github.contextstream/mcp-server -->
|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
# ContextStream MCP Server
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
This repository is the canonical open-source implementation and release source
|
|
6
|
+
for the ContextStream Rust MCP server. It provides project memory, semantic code
|
|
7
|
+
search, dependency analysis, grounded context, and editor setup over the Model
|
|
8
|
+
Context Protocol.
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
The hosted service at `https://mcp.contextstream.io/mcp` is the recommended
|
|
11
|
+
transport. The npm package is a compatibility launcher for clients that require
|
|
12
|
+
stdio: it downloads the binary for the package's exact version from an immutable
|
|
13
|
+
release path, verifies SHA-256, and runs it from a versioned cache.
|
|
15
14
|
|
|
16
|
-
|
|
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" />
|
|
21
|
-
</p>
|
|
15
|
+
## Connect
|
|
22
16
|
|
|
23
|
-
|
|
24
|
-
<a href="https://contextstream.io/docs">Documentation</a> •
|
|
25
|
-
<a href="https://contextstream.io/pricing">Pricing</a> •
|
|
26
|
-
<a href="#faq">FAQ</a>
|
|
27
|
-
</p>
|
|
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
|
-
<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" />
|
|
47
|
-
</p>
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## We win on memory benchmarks — measured honestly
|
|
52
|
-
|
|
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.
|
|
54
|
-
|
|
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 |
|
|
60
|
-
|
|
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%**.
|
|
62
|
-
|
|
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)**
|
|
64
|
-
|
|
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?
|
|
76
|
-
|
|
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.
|
|
78
|
-
|
|
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. |
|
|
85
|
-
|
|
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.
|
|
87
|
-
|
|
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
|
-
---
|
|
104
|
-
|
|
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
|
|
179
|
-
|
|
180
|
-
```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
|
|
185
|
-
```
|
|
186
|
-
|
|
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.
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## Manual configuration
|
|
192
|
-
|
|
193
|
-
> Skip this if you ran the setup wizard.
|
|
194
|
-
|
|
195
|
-
<details>
|
|
196
|
-
<summary><b>Claude Code</b></summary>
|
|
197
|
-
|
|
198
|
-
```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
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
</details>
|
|
204
|
-
|
|
205
|
-
<details>
|
|
206
|
-
<summary><b>Cursor / Claude Desktop</b></summary>
|
|
17
|
+
Streamable HTTP (recommended):
|
|
207
18
|
|
|
208
19
|
```json
|
|
209
20
|
{
|
|
210
21
|
"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`
|
|
224
|
-
|
|
225
|
-
</details>
|
|
226
|
-
|
|
227
|
-
<details>
|
|
228
|
-
<summary><b>OpenCode</b></summary>
|
|
229
|
-
|
|
230
|
-
Local server:
|
|
231
|
-
|
|
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
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
Remote server:
|
|
249
|
-
|
|
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
|
-
}
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
For the local variant, export `CONTEXTSTREAM_API_KEY` before launching OpenCode.
|
|
264
|
-
|
|
265
|
-
**Locations:** `./opencode.json` • `~/.config/opencode/opencode.json`
|
|
266
|
-
|
|
267
|
-
</details>
|
|
268
|
-
|
|
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:
|
|
273
|
-
|
|
274
|
-
```json
|
|
275
|
-
{
|
|
276
|
-
"servers": {
|
|
277
22
|
"contextstream": {
|
|
278
23
|
"type": "http",
|
|
279
|
-
"url": "https://mcp.contextstream.io/mcp
|
|
24
|
+
"url": "https://mcp.contextstream.io/mcp"
|
|
280
25
|
}
|
|
281
26
|
}
|
|
282
27
|
}
|
|
283
28
|
```
|
|
284
29
|
|
|
285
|
-
|
|
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
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Keep both `~/.copilot/mcp-config.json` (uses `mcpServers`) and `.vscode/mcp.json` (uses `servers`) in sync — setup writes both.
|
|
305
|
-
|
|
306
|
-
</details>
|
|
307
|
-
|
|
308
|
-
<details>
|
|
309
|
-
<summary><b>GitHub Copilot CLI</b></summary>
|
|
310
|
-
|
|
311
|
-
Use `/mcp add` interactively, or add to `~/.copilot/mcp-config.json`:
|
|
30
|
+
npm/stdin compatibility:
|
|
312
31
|
|
|
313
32
|
```json
|
|
314
33
|
{
|
|
315
34
|
"mcpServers": {
|
|
316
35
|
"contextstream": {
|
|
317
36
|
"command": "npx",
|
|
318
|
-
"args": ["
|
|
37
|
+
"args": ["-y", "@contextstream/mcp-server@1.0.0"],
|
|
319
38
|
"env": {
|
|
320
|
-
"
|
|
321
|
-
"CONTEXTSTREAM_API_KEY": "your_key",
|
|
322
|
-
"CONTEXTSTREAM_TOOLSET": "complete"
|
|
39
|
+
"CONTEXTSTREAM_API_KEY": "your-api-key"
|
|
323
40
|
}
|
|
324
41
|
}
|
|
325
42
|
}
|
|
326
43
|
}
|
|
327
44
|
```
|
|
328
45
|
|
|
329
|
-
|
|
46
|
+
All 1.x releases preserve these npm executables:
|
|
330
47
|
|
|
331
|
-
|
|
48
|
+
- `mcp-server`
|
|
49
|
+
- `contextstream-mcp`
|
|
50
|
+
- `contextstream-hook` (forwards to the Rust `hook` subcommand)
|
|
332
51
|
|
|
333
|
-
|
|
334
|
-
<summary><b>Unmapped folders (global fallback workspace)</b></summary>
|
|
52
|
+
Run the setup wizard with:
|
|
335
53
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
---
|
|
341
|
-
|
|
342
|
-
## FAQ
|
|
343
|
-
|
|
344
|
-
### What is an MCP server?
|
|
345
|
-
|
|
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.
|
|
347
|
-
|
|
348
|
-
### Does ContextStream work with Claude Code / Cursor / Copilot / Windsurf?
|
|
349
|
-
|
|
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.
|
|
351
|
-
|
|
352
|
-
### Is my code private?
|
|
353
|
-
|
|
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.
|
|
355
|
-
|
|
356
|
-
### How much does it cost?
|
|
357
|
-
|
|
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).
|
|
359
|
-
|
|
360
|
-
### How does ContextStream score on memory benchmarks?
|
|
54
|
+
```bash
|
|
55
|
+
npx -y @contextstream/mcp-server@1.0.0 setup
|
|
56
|
+
```
|
|
361
57
|
|
|
362
|
-
|
|
58
|
+
## What setup sends
|
|
363
59
|
|
|
364
|
-
|
|
60
|
+
Setup prints this disclosure before changing editor configuration:
|
|
365
61
|
|
|
366
|
-
|
|
62
|
+
- Transcript exchange saving and hook transcript saving are enabled by default.
|
|
63
|
+
- A validated project can be indexed; matching source files are sent to the
|
|
64
|
+
user's ContextStream workspace.
|
|
65
|
+
- Selected supported editors receive managed lifecycle hooks.
|
|
66
|
+
- Local Git capture is enabled by default. It sends event type, commit SHA/time,
|
|
67
|
+
branch/ref names, aggregate line/file counts, a bounded redacted commit
|
|
68
|
+
subject, an opaque checkout ID, and a credential-free canonical remote.
|
|
69
|
+
- Absolute filesystem paths, commit bodies, and commit author name/email are not
|
|
70
|
+
sent by the VCS hook pipeline.
|
|
367
71
|
|
|
368
|
-
|
|
72
|
+
Controls and deletion paths are documented in
|
|
73
|
+
[`docs/data-handling.md`](docs/data-handling.md). These defaults are preserved
|
|
74
|
+
for compatibility; review them before running `setup --yes` in automation.
|
|
369
75
|
|
|
370
|
-
|
|
76
|
+
## Build
|
|
371
77
|
|
|
372
|
-
|
|
78
|
+
The workspace requires the Rust toolchain pinned in `rust-toolchain.toml`.
|
|
373
79
|
|
|
374
|
-
|
|
80
|
+
```bash
|
|
81
|
+
cargo build --locked -p mcp-server --bin contextstream-mcp
|
|
82
|
+
cargo test --locked --workspace
|
|
83
|
+
cargo build --locked --release -p mcp-server --bin contextstream-mcp \
|
|
84
|
+
--features remote-acceleration
|
|
85
|
+
```
|
|
375
86
|
|
|
376
|
-
|
|
87
|
+
The public workspace contains seven crates:
|
|
377
88
|
|
|
378
|
-
|
|
89
|
+
- `mcp-server`
|
|
90
|
+
- `mcp-tools`
|
|
91
|
+
- `mcp-client`
|
|
92
|
+
- `mcp-session`
|
|
93
|
+
- `mcp-types`
|
|
94
|
+
- `mcp-model-registry`
|
|
95
|
+
- `mcp-acceleration-products`
|
|
379
96
|
|
|
380
|
-
|
|
97
|
+
`mcp-acceleration-products` is MongoDB-free. Premium provider implementation,
|
|
98
|
+
production deployment configuration, credentials, and private operator material
|
|
99
|
+
are not part of this repository. Compatibility traits remain no-op in public
|
|
100
|
+
builds so the core protocol surface stays stable.
|
|
381
101
|
|
|
382
|
-
##
|
|
102
|
+
## npm launcher behavior
|
|
383
103
|
|
|
384
|
-
|
|
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.
|
|
104
|
+
The dependency-free Node 20 launcher:
|
|
390
105
|
|
|
391
|
-
|
|
106
|
+
- selects the package-version/platform artifact;
|
|
107
|
+
- downloads only from `mcp/v<exact-version>/`;
|
|
108
|
+
- verifies `version.json`, `checksums.txt`, and the binary SHA-256;
|
|
109
|
+
- populates the cache under an atomic lock and re-verifies cached bytes;
|
|
110
|
+
- supports `CONTEXTSTREAM_MCP_OFFLINE=1` after a verified first run;
|
|
111
|
+
- executes the cached binary by absolute path, ignoring PATH-shadowing copies;
|
|
112
|
+
- sets `CONTEXTSTREAM_DISABLE_SELF_UPDATE=1`, so the Rust process cannot mutate
|
|
113
|
+
npm-managed cache state.
|
|
392
114
|
|
|
393
|
-
|
|
115
|
+
For test mirrors only, the launcher recognizes
|
|
116
|
+
`CONTEXTSTREAM_MCP_RELEASE_BASE_URL` together with
|
|
117
|
+
`CONTEXTSTREAM_MCP_TEST_ALLOW_HTTP=1`. Production release URLs must use HTTPS.
|
|
394
118
|
|
|
395
|
-
|
|
119
|
+
## Contributing and security
|
|
396
120
|
|
|
397
|
-
|
|
121
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and
|
|
122
|
+
[GOVERNANCE.md](GOVERNANCE.md). By contributing, you certify the Developer
|
|
123
|
+
Certificate of Origin for your commits (`git commit -s`).
|
|
398
124
|
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
<sub>ContextStream makes it brilliant from the first message.</sub>
|
|
402
|
-
</p>
|
|
125
|
+
The code in this repository is MIT licensed. ContextStream trademarks and the
|
|
126
|
+
hosted backend are addressed in [NOTICE](NOTICE).
|