@contextstream/mcp-server 0.4.65 → 0.4.67

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/README.md CHANGED
@@ -76,13 +76,51 @@ Long conversation? ContextStream tracks token usage, auto-saves critical state,
76
76
 
77
77
  ---
78
78
 
79
- ## Setup Takes 30 Seconds
79
+ ## Choose Your Runtime (VS Code/Copilot)
80
+
81
+ For VS Code + Copilot users, we recommend the Rust runtime because it gives the lowest-friction local install and startup path.
82
+
83
+ ### Recommended: Rust MCP
80
84
 
81
85
  ```bash
82
- npx @contextstream/mcp-server@latest setup
86
+ curl -fsSL https://contextstream.io/scripts/mcp.sh | bash
87
+ ```
88
+
89
+ ```powershell
90
+ irm https://contextstream.io/scripts/mcp.ps1 | iex
91
+ ```
92
+
93
+ ### Alternative: Node MCP server
94
+
95
+ ```bash
96
+ npx --prefer-online -y @contextstream/mcp-server@latest setup
97
+ ```
98
+
99
+ ### Marketplace install limitation
100
+
101
+ MCP marketplace installs for npm packages can install and run the package entrypoint, but they do not run arbitrary shell bootstrap commands such as `curl ... | bash` or `irm ... | iex`. That means Rust bootstrap must currently be a separate explicit user step unless/ until the Rust runtime is distributed in a marketplace-compatible package format.
102
+
103
+ ## Quickest Post-Install Path (VS Code + Copilot)
104
+
105
+ 1. Install a runtime (Rust recommended).
106
+ 2. Run the setup wizard:
107
+
108
+ ```bash
109
+ contextstream-mcp setup
83
110
  ```
84
111
 
85
- The wizard handles everything: authentication, configuration, editor integration, and optional hooks that supercharge your workflow.
112
+ 3. In wizard prompts, keep Copilot selected and confirm canonical file writes.
113
+ 4. Restart VS Code/Copilot.
114
+
115
+ This path is the default recommendation. Manual JSON config snippets below are backup options.
116
+
117
+ ## Setup Takes 30 Seconds (Node)
118
+
119
+ ```bash
120
+ npx --prefer-online -y @contextstream/mcp-server@latest setup
121
+ ```
122
+
123
+ The wizard handles authentication, configuration, editor integration, and optional hooks that supercharge your workflow.
86
124
 
87
125
  **Works with:** Claude Code • Cursor • VS Code • Claude Desktop • Codex CLI • OpenCode • Antigravity
88
126
 
@@ -184,6 +222,25 @@ For the local variant, export `CONTEXTSTREAM_API_KEY` before launching OpenCode.
184
222
  <details>
185
223
  <summary><b>VS Code</b></summary>
186
224
 
225
+ For GitHub Copilot in VS Code, use project-level MCP at `.vscode/mcp.json`.
226
+
227
+ **Rust MCP (recommended)**
228
+
229
+ ```json
230
+ {
231
+ "servers": {
232
+ "contextstream": {
233
+ "type": "stdio",
234
+ "command": "contextstream-mcp",
235
+ "args": [],
236
+ "env": { "CONTEXTSTREAM_API_KEY": "your_key" }
237
+ }
238
+ }
239
+ }
240
+ ```
241
+
242
+ **Node MCP server**
243
+
187
244
  ```json
188
245
  {
189
246
  "servers": {
@@ -208,7 +265,23 @@ Use the Copilot CLI to interactively add the MCP server:
208
265
  /mcp add
209
266
  ```
210
267
 
211
- Or add to `~/.copilot/mcp-config.json`:
268
+ Or add to `~/.copilot/mcp-config.json` (pick one runtime):
269
+
270
+ **Rust MCP (recommended)**
271
+
272
+ ```json
273
+ {
274
+ "mcpServers": {
275
+ "contextstream": {
276
+ "command": "contextstream-mcp",
277
+ "args": [],
278
+ "env": { "CONTEXTSTREAM_API_KEY": "your_key" }
279
+ }
280
+ }
281
+ }
282
+ ```
283
+
284
+ **Node MCP server**
212
285
 
213
286
  ```json
214
287
  {
@@ -228,6 +301,86 @@ For more information, see the [GitHub Copilot CLI documentation](https://docs.gi
228
301
 
229
302
  ---
230
303
 
304
+ ## VS Code + Copilot Canonical Setup
305
+
306
+ Select Copilot in setup; setup handles both configs automatically.
307
+
308
+ For the most reliable Copilot behavior with ContextStream, configure all three artifacts:
309
+
310
+ 1. **Global Copilot CLI MCP config**: `~/.copilot/mcp-config.json`
311
+ 2. **Project VS Code MCP config**: `.vscode/mcp.json`
312
+ 3. **Project rules and skill files**:
313
+ - `.github/copilot-instructions.md`
314
+ - `.github/skills/contextstream-workflow/SKILL.md`
315
+
316
+ This gives you MCP connectivity plus explicit no-hooks workflow guidance for Copilot sessions.
317
+
318
+ If you installed Rust MCP, use `contextstream-mcp` as the command in both MCP files. If you installed via npm/marketplace, use `npx --prefer-online -y @contextstream/mcp-server@latest`.
319
+
320
+ ## Troubleshooting (Why Copilot/VS Code "isn't working")
321
+
322
+ - **Wrong config location**: verify both `~/.copilot/mcp-config.json` and `.vscode/mcp.json` for project-specific VS Code usage.
323
+ - **Malformed JSON**: remove comments/trailing commas in MCP JSON files.
324
+ - **Stale config shape**: ensure root keys are correct (`mcpServers` for Copilot CLI, `servers` for VS Code).
325
+ - **Rules missing**: ensure `.github/copilot-instructions.md` and the companion `SKILL.md` exist.
326
+ - **Context discipline not followed**: first turn must call `init(...)` then `context(...)`; subsequent turns should call `context(...)` first.
327
+ - **Indexing not ready**: after setup, allow indexing to complete; retry `search(mode="auto", ...)` before falling back to local scans.
328
+
329
+ ## Migration Notes
330
+
331
+ - If you previously configured only one path, migrate to the canonical setup above.
332
+ - If migrating from Node to Rust MCP, update both command fields (`~/.copilot/mcp-config.json` and `.vscode/mcp.json`) from `npx ... @contextstream/mcp-server@latest` to `contextstream-mcp`.
333
+ - If older rules exist, regenerate rules and replace stale instructions with the current Copilot files.
334
+ - Preserve other MCP servers in your JSON files; only update the `contextstream` entry.
335
+
336
+ ## Marketplace + Rust MCP Feasibility
337
+
338
+ - Current `server.json` marketplace metadata for this package points to npm install, which is why one-click install resolves to Node MCP.
339
+ - Marketplace clients do not execute external bootstrap scripts during package install, so they cannot trigger Rust install commands directly.
340
+ - Once Rust MCP is published in a marketplace-supported package form (for example an additional registry package entry), `server.json` can expose both Node and Rust install targets for true one-click runtime choice.
341
+
342
+ ## Hook Coverage Matrix (Claude, Cursor, Antigravity)
343
+
344
+ | Editor | Hook support | ContextStream strategy |
345
+ |--------|--------------|------------------------|
346
+ | Claude Code | Full lifecycle hooks | Hard enforcement + reminders + lifecycle persistence hooks |
347
+ | Cursor | Lifecycle hooks (tool/MCP/shell/file/session) | Hard enforcement + reminder hooks + post-action indexing hooks |
348
+ | Windsurf | Cascade hooks (pre/post tool and response events) | Hard enforcement via pre hooks + post-write/session hooks |
349
+ | Antigravity | No documented lifecycle hooks | Strict rules-first flow + no-hooks operational guardrails |
350
+
351
+ ## Troubleshooting (ContextStream was skipped)
352
+
353
+ - **Claude Code**
354
+ - Confirm hooks exist in `~/.claude/settings.json` or project `.claude/settings.json`.
355
+ - Verify ContextStream hook commands are present for `PreToolUse`, `UserPromptSubmit`, `SessionStart`, and `PreCompact`.
356
+ - Check `CONTEXTSTREAM_HOOK_ENABLED` is not set to `false`.
357
+ - **Cursor**
358
+ - Confirm `.cursor/hooks.json` includes `preToolUse` and `beforeSubmitPrompt`.
359
+ - Verify `beforeMCPExecution` / `beforeShellExecution` / `beforeReadFile` hook entries exist after setup.
360
+ - If hooks are stale, rerun setup to regenerate ContextStream entries without deleting user hooks.
361
+ - **Antigravity**
362
+ - Verify `~/.gemini/antigravity/mcp_config.json` has a healthy `contextstream` server block.
363
+ - Since hooks are unavailable, enforce manual discipline: `init(...)` then `context(...)`, and `search(mode="auto", ...)` before local scans.
364
+ - Re-index when search appears stale and retry ContextStream search before fallback.
365
+ - **Windsurf**
366
+ - Confirm `~/.codeium/windsurf/mcp_config.json` includes `contextstream`.
367
+ - Confirm hooks in `~/.codeium/windsurf/hooks.json` include `pre_mcp_tool_use` and `pre_user_prompt`.
368
+ - If behavior is stale, rerun setup to regenerate ContextStream hook entries while preserving user hooks.
369
+ - **All editors**
370
+ - Validate JSON shape (`mcpServers` vs `servers`) and remove trailing commas/comments.
371
+ - Keep first-call protocol strict: first turn `init(...)` then `context(...)`.
372
+ - Preserve non-ContextStream entries when regenerating configs.
373
+
374
+ ## Rust/Node Parity Checklist
375
+
376
+ - Claude hook matrix includes current lifecycle events in both Rust and Node setup flows.
377
+ - Cursor hook matrix includes tool/MCP/shell/file/session enforcement hooks in both implementations.
378
+ - Windsurf hook matrix includes pre/post Cascade hook coverage in both implementations.
379
+ - Antigravity remains explicit no-hooks with strengthened rules guidance in both implementations.
380
+ - Hook/rules installers stay idempotent and avoid deleting non-ContextStream user entries.
381
+
382
+ ---
383
+
231
384
  ## Links
232
385
 
233
386
  **Website:** https://contextstream.io