@contextstream/mcp-server 0.4.32 → 0.4.34

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 (4) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +147 -315
  3. package/dist/index.js +655 -305
  4. package/package.json +1 -1
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 ContextStream
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 ContextStream
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,160 +1,172 @@
1
1
  # ContextStream MCP Server
2
2
 
3
- **Get set up in 30 seconds (recommended):**
3
+ **Your AI coding assistant finally has a memory.**
4
+
5
+ ContextStream gives your AI tools persistent context across sessions, semantic code search, and team knowledge sharing. Every decision, preference, and lesson learned is captured and surfaced when relevant.
4
6
 
5
7
  ```bash
6
8
  npx -y @contextstream/mcp-server setup
7
9
  ```
8
10
 
9
- This wizard authenticates you, creates/stores an API key, installs editor rules, and writes MCP config files.
11
+ Works with Cursor, Antigravity, Claude Code, Windsurf, VS Code, Claude Desktop, Codex CLI, and more.
12
+
13
+ ---
14
+
15
+ ## The Problem
16
+
17
+ Without ContextStream, every AI conversation starts from scratch:
10
18
 
11
- Persistent memory, semantic search, and code intelligence for any MCP-compatible AI tool (Cursor, Claude Code, Windsurf, VS Code, Claude Desktop, Codex CLI, etc.).
19
+ - "We decided to use PostgreSQL" forgotten next session
20
+ - "Don't use that deprecated API" — your AI suggests it anyway
21
+ - "Here's how our auth flow works" — explained for the 10th time
22
+ - Team decisions live in Slack threads no one can find
12
23
 
13
- **At a glance:**
14
- - Shared "brain" for decisions, preferences, notes (including implementation notes), lessons, tasks, and project context.
15
- - Search + analysis across sessions with consistent context (semantic/hybrid/keyword + graph tools).
16
- - v0.4.x consolidated domain tools (~11 tools) for ~75% lower tool-registry token overhead vs previous versions.
24
+ ## The Solution
25
+
26
+ ContextStream creates a shared brain for your AI assistant:
27
+
28
+ | What you get | How it works |
29
+ |--------------|--------------|
30
+ | **Persistent Memory** | Decisions, preferences, and notes survive across sessions |
31
+ | **Semantic Code Search** | Find code by meaning, not just keywords |
32
+ | **Team Knowledge** | Share context across your team's AI tools |
33
+ | **Integration Sync** | Pull context from GitHub, Slack, and Notion automatically |
34
+ | **Smart Context** | Your AI gets relevant context for every message |
17
35
 
18
36
  ---
19
37
 
20
- ## Just Ask
38
+ ## See It In Action
21
39
 
22
- **You don't need to memorize tool names.** Describe what you want and your AI will call the right ContextStream tools:
40
+ **You say...** **ContextStream does...**
23
41
 
24
- | You say… | ContextStream does… |
25
- |----------|---------------------|
26
- | "session summary" | Summarizes current workspace/project context |
27
- | "what did we decide about auth?" | Recalls decisions related to authentication |
28
- | "remember we're using PostgreSQL" | Captures that fact for future sessions |
29
- | "search for payment code" | Searches your codebase semantically/hybrid/keyword |
30
- | "what depends on UserService?" | Analyzes dependency graph & impact |
42
+ | Prompt | What happens |
43
+ |--------|--------------|
44
+ | "What did we decide about auth?" | Finds the decision from 3 weeks ago |
45
+ | "Remember we're using PostgreSQL" | Captured for all future sessions |
46
+ | "Search for payment handling code" | Semantic search across your codebase |
47
+ | "What depends on UserService?" | Analyzes dependency graph and impact |
48
+ | "Show me recent GitHub activity" | Surfaces issues, PRs, and discussions |
49
+ | "What's in our API docs on Notion?" | Searches your Notion knowledge base |
31
50
 
32
- > **Tip:** For best results, add the **recommended editor rules** so your AI reliably calls `session_init` / `context_smart` when appropriate:
33
- > https://contextstream.io/docs/quickstart
51
+ No special commands needed. Just describe what you want.
34
52
 
35
53
  ![ContextStream in action](compare1.gif)
36
54
 
37
55
  ---
38
56
 
39
- ## Choose Your Mode (Token Footprint)
57
+ ## Quick Setup (30 seconds)
40
58
 
41
- MCP clients often inject the tool catalog into the model context. v0.4.x is designed to keep that overhead small.
59
+ The setup wizard handles everything:
42
60
 
43
- | Mode | What it exposes | Best for | Enable |
44
- |------|-----------------|----------|--------|
45
- | **Consolidated** (default) | ~11 domain tools with `action` / `mode` dispatch | Most users (recommended) | `CONTEXTSTREAM_CONSOLIDATED=true` |
46
- | **Router** (extreme minimization) | ~2 meta-tools (`contextstream`, `contextstream_help`) | Tight context budgets / many MCP servers | `CONTEXTSTREAM_PROGRESSIVE_MODE=true` |
47
- | **Legacy** (granular tools) | Older `light/standard/complete` toolsets | Back-compat / old prompts | `CONTEXTSTREAM_CONSOLIDATED=false` |
61
+ ```bash
62
+ npx -y @contextstream/mcp-server setup
63
+ ```
48
64
 
49
- > **Note:** The env var name for Router mode is `CONTEXTSTREAM_PROGRESSIVE_MODE` (historical naming). It enables the ~2-tool "router" surface.
65
+ This will:
66
+ 1. Authenticate your account (opens browser)
67
+ 2. Create and store your API key
68
+ 3. Install editor rules for best results
69
+ 4. Configure your AI tools automatically
70
+ 5. Install Claude Code hooks (optional, recommended)
71
+
72
+ That's it. Start a conversation and your AI now has memory.
50
73
 
51
74
  ---
52
75
 
53
- ## Features
76
+ ## What Gets Captured
77
+
78
+ ContextStream automatically tracks:
54
79
 
55
- - **Consolidated domain tools** (v0.4.x): short tool list with action/mode dispatch
56
- - Session-aware context loading (`session_init`, `context_smart`)
57
- - Memory capture + recall (decisions, preferences, notes, implementation notes, lessons, tasks, bugs)
58
- - Code search (semantic, hybrid, keyword, pattern)
59
- - Knowledge graph + code analysis (dependencies, impact, call paths, circular deps, unused code)
60
- - Graph ingestion for full graph builds (`graph(action="ingest")`)
61
- - Local repo ingestion for indexing (`project(action="ingest_local")`)
62
- - Auto-context: on first tool call in a new session, the server can auto-initialize context
80
+ | Type | Examples |
81
+ |------|----------|
82
+ | **Decisions** | "We chose JWT over sessions", "Using Tailwind for styling" |
83
+ | **Preferences** | "I prefer functional components", "Always use TypeScript" |
84
+ | **Lessons** | "That approach caused a memory leak", "This pattern works well" |
85
+ | **Tasks** | Implementation plans, TODOs, follow-ups |
86
+ | **Code Context** | File relationships, dependencies, patterns |
63
87
 
64
- > **⚠️ Search-First Rule:** For best results, your AI should use ContextStream `search(mode="hybrid")` **before** local tools like Glob/Grep/Read. This is enforced via editor rules and `context_smart` responses.
88
+ Everything is searchable by meaning, not just keywords.
65
89
 
66
90
  ---
67
91
 
68
- ## Graph Tiers
92
+ ## Integrations
69
93
 
70
- | Tier | Capabilities |
71
- |------|--------------|
72
- | **Pro (Graph-Lite)** | Module-level import graph, dependencies, and 1-hop impact |
73
- | **Elite/Team (Full Graph)** | Module + call + dataflow + type layers, plus full graph ingestion |
94
+ Connect your team's tools to enrich AI context automatically:
74
95
 
75
- ---
96
+ ### GitHub
97
+ - Issues, PRs, releases, and comments synced as searchable memory
98
+ - "What's the status of the auth refactor?" finds the relevant PR
99
+ - Decisions from issue discussions surface when relevant
76
100
 
77
- ## Requirements
101
+ ### Slack
102
+ - Channel discussions become searchable knowledge
103
+ - Team decisions captured from conversations
104
+ - "What did we discuss about the API?" finds the thread
78
105
 
79
- - **Node.js 18+**
80
- - A **ContextStream account**
81
- - Auth via **API key** or **JWT**
82
-
83
- Default API URL: `https://api.contextstream.io`
106
+ ### Notion
107
+ - Documentation and wikis become AI context
108
+ - Smart type detection for tasks, meetings, bugs, features
109
+ - "How does our deployment process work?" finds the runbook
84
110
 
85
111
  ---
86
112
 
87
- ## Quickstart (2 minutes)
113
+ ## Team Features
88
114
 
89
- ### 1) Run the Setup Wizard (recommended)
115
+ ContextStream shines for teams:
90
116
 
91
- The wizard:
92
- - Authenticates (browser/device login by default)
93
- - Creates/stores an API key
94
- - Installs recommended editor rules (optional)
95
- - Writes MCP config files for supported tools
117
+ - **Shared workspace memory** — decisions made by anyone benefit everyone
118
+ - **Onboarding acceleration** new team members get full context from day one
119
+ - **Knowledge preservation** context survives when people leave
120
+ - **Consistent AI behavior** everyone's AI knows the same preferences
96
121
 
97
- ```bash
98
- npx -y @contextstream/mcp-server setup
99
- ```
122
+ ---
100
123
 
101
- **Useful flags:**
124
+ ## Smarter Context, Fewer Tokens
102
125
 
103
- | Flag | Description |
104
- |------|-------------|
105
- | `--dry-run` | Preview without writing files |
126
+ AI tools typically gather context by reading entire files, running grep searches, and iterating until they find what they need. This burns through your token budget fast.
106
127
 
107
- **Notes:**
108
- - The wizard stores credentials at `~/.contextstream/credentials.json` for convenience. Delete it to force a fresh login.
109
- - Codex CLI MCP config is global-only (`~/.codex/config.toml`), so the wizard writes Codex config globally when selected.
110
- - Some tools still require UI/CLI setup (the wizard will tell you when it can't write a config).
128
+ ContextStream takes a different approach:
111
129
 
112
- ### 2) Run the MCP Server
130
+ **Bounded retrieval** `context_smart` returns only the context relevant to your current message, within a strict token budget. Instead of reading 10 files to find one decision, you get exactly what matters.
113
131
 
114
- **Recommended** (works well with MCP configs):
132
+ **Semantic search** Find code by meaning in a single query. No more `grep "auth" → read file → grep "middleware" → read another file` loops. One search, relevant results.
115
133
 
116
- ```bash
117
- npx -y @contextstream/mcp-server
118
- ```
134
+ **Smart output formats** — Choose the verbosity you need:
135
+ - Need file locations? Use `paths` format (80% smaller responses)
136
+ - Just checking if something exists? Use `count` format (90% smaller)
137
+ - Need full context? Use `full` format
119
138
 
120
- **Or install globally:**
139
+ **AI-powered compression** — For complex queries, Context Pack distills large code contexts into compact, high-signal summaries that preserve file paths, line numbers, and essential snippets.
121
140
 
122
- ```bash
123
- npm install -g @contextstream/mcp-server
124
- contextstream-mcp
125
- ```
141
+ The result: your AI gets better context while using fewer tokens. Faster responses, lower costs, and more room in the context window for actual work.
126
142
 
127
- ### 3) Keeping Updated
143
+ ---
128
144
 
129
- **If you use `npx`:** Restart your AI tool/editor and run ContextStream again
130
- (or pin the version: `npx -y @contextstream/mcp-server@0.4.3`)
145
+ ## Core Tools
131
146
 
132
- **If you installed globally:**
147
+ Your AI uses these automatically:
133
148
 
134
- ```bash
135
- npm update -g @contextstream/mcp-server
136
- ```
149
+ | Tool | Purpose |
150
+ |------|---------|
151
+ | `session_init` | Load workspace/project context at conversation start |
152
+ | `context_smart` | Get relevant context for each message |
153
+ | `search` | Semantic, hybrid, or keyword search across everything |
154
+ | `session` | Capture and recall decisions, preferences, lessons |
155
+ | `memory` | Create and manage knowledge nodes |
156
+ | `graph` | Analyze code dependencies and impact |
157
+ | `integration` | Query GitHub, Slack, Notion directly |
137
158
 
138
- After updating, restart your AI tool/editor so it reloads the tool catalog.
159
+ **Full tool reference:** https://contextstream.io/docs/mcp/tools
139
160
 
140
161
  ---
141
162
 
142
- ## Configure Your MCP Client (Manual)
143
-
144
- > If you ran the setup wizard, you can usually skip this.
145
-
146
- ### Cursor / Windsurf / Claude Desktop (JSON)
163
+ ## Manual Configuration
147
164
 
148
- These clients use an `mcpServers` JSON config:
165
+ > Skip this if you used the setup wizard.
149
166
 
150
- | Client | Config path |
151
- |--------|-------------|
152
- | **Cursor** | `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (project) |
153
- | **Windsurf** | `~/.codeium/windsurf/mcp_config.json` |
154
- | **Claude Desktop (macOS)** | `~/Library/Application Support/Claude/claude_desktop_config.json` |
155
- | **Claude Desktop (Windows)** | `%APPDATA%\Claude\claude_desktop_config.json` |
167
+ ### Cursor / Windsurf / Claude Desktop
156
168
 
157
- **Consolidated (default):**
169
+ Add to your MCP config:
158
170
 
159
171
  ```json
160
172
  {
@@ -163,7 +175,6 @@ These clients use an `mcpServers` JSON config:
163
175
  "command": "npx",
164
176
  "args": ["-y", "@contextstream/mcp-server"],
165
177
  "env": {
166
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
167
178
  "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
168
179
  }
169
180
  }
@@ -171,45 +182,38 @@ These clients use an `mcpServers` JSON config:
171
182
  }
172
183
  ```
173
184
 
174
- **Router mode (~2 meta-tools):**
185
+ Config locations:
186
+ - **Cursor:** `~/.cursor/mcp.json`
187
+ - **Windsurf:** `~/.codeium/windsurf/mcp_config.json`
188
+ - **Claude Desktop (macOS):** `~/Library/Application Support/Claude/claude_desktop_config.json`
175
189
 
176
- ```json
177
- {
178
- "mcpServers": {
179
- "contextstream": {
180
- "command": "npx",
181
- "args": ["-y", "@contextstream/mcp-server"],
182
- "env": {
183
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
184
- "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY",
185
- "CONTEXTSTREAM_PROGRESSIVE_MODE": "true"
186
- }
187
- }
188
- }
189
- }
190
+ ### Claude Code (CLI)
191
+
192
+ ```bash
193
+ claude mcp add --transport stdio contextstream --scope user \
194
+ --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
195
+ -- npx -y @contextstream/mcp-server
190
196
  ```
191
197
 
192
- ### VS Code (`.vscode/mcp.json`)
198
+ #### Claude Code Hooks (Recommended)
193
199
 
194
- VS Code uses a top-level `servers` map:
200
+ ContextStream can install hooks that enforce best practices:
195
201
 
196
- ```json
197
- {
198
- "servers": {
199
- "contextstream": {
200
- "type": "stdio",
201
- "command": "npx",
202
- "args": ["-y", "@contextstream/mcp-server"],
203
- "env": {
204
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
205
- "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
206
- }
207
- }
208
- }
209
- }
202
+ - **PreToolUse hook** — Redirects Glob/Grep/Search to ContextStream semantic search
203
+ - **UserPromptSubmit hook** — Injects context reminders every message
204
+
205
+ Install hooks automatically when generating rules:
206
+
207
+ ```bash
208
+ npx -y @contextstream/mcp-server setup
209
+ # Or: mcp__contextstream__generate_rules(editors=["claude"])
210
210
  ```
211
211
 
212
- **Strong recommendation:** Use `inputs` so you don't commit secrets:
212
+ Hooks are installed to `~/.claude/hooks/` and configured in `~/.claude/settings.json`. Your custom rules are preserved — only ContextStream blocks are updated.
213
+
214
+ ### VS Code
215
+
216
+ Add to `.vscode/mcp.json`:
213
217
 
214
218
  ```json
215
219
  {
@@ -219,7 +223,6 @@ VS Code uses a top-level `servers` map:
219
223
  "command": "npx",
220
224
  "args": ["-y", "@contextstream/mcp-server"],
221
225
  "env": {
222
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
223
226
  "CONTEXTSTREAM_API_KEY": "${input:contextstreamApiKey}"
224
227
  }
225
228
  }
@@ -235,30 +238,9 @@ VS Code uses a top-level `servers` map:
235
238
  }
236
239
  ```
237
240
 
238
- ### Claude Code (CLI)
239
-
240
- **User scope (all projects):**
241
-
242
- ```bash
243
- claude mcp add --transport stdio contextstream --scope user \
244
- --env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
245
- --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
246
- -- npx -y @contextstream/mcp-server
247
- ```
248
-
249
- **Router mode:**
250
-
251
- ```bash
252
- claude mcp add --transport stdio contextstream --scope user \
253
- --env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
254
- --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
255
- --env CONTEXTSTREAM_PROGRESSIVE_MODE=true \
256
- -- npx -y @contextstream/mcp-server
257
- ```
258
-
259
- > **Windows caveat** (native Windows, not WSL): if `npx` isn't found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
241
+ ### Codex CLI
260
242
 
261
- ### Codex CLI (`~/.codex/config.toml`)
243
+ Add to `~/.codex/config.toml`:
262
244
 
263
245
  ```toml
264
246
  [mcp_servers.contextstream]
@@ -266,155 +248,21 @@ command = "npx"
266
248
  args = ["-y", "@contextstream/mcp-server"]
267
249
 
268
250
  [mcp_servers.contextstream.env]
269
- CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
270
251
  CONTEXTSTREAM_API_KEY = "YOUR_API_KEY"
271
252
  ```
272
253
 
273
- ### Antigravity (Google)
274
-
275
- Antigravity uses project-scoped `.mcp.json` files with the same format as Cursor/Claude Desktop:
276
-
277
- **Project configuration (`.mcp.json` in project root):**
278
-
279
- ```json
280
- {
281
- "mcpServers": {
282
- "contextstream": {
283
- "command": "npx",
284
- "args": ["-y", "@contextstream/mcp-server"],
285
- "env": {
286
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
287
- "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
288
- }
289
- }
290
- }
291
- }
292
- ```
293
-
294
- **Windows users:** Use `cmd /c npx` wrapper:
295
-
296
- ```json
297
- {
298
- "mcpServers": {
299
- "contextstream": {
300
- "command": "cmd",
301
- "args": ["/c", "npx", "-y", "@contextstream/mcp-server"],
302
- "env": {
303
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
304
- "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
305
- }
306
- }
307
- }
308
- }
309
- ```
310
-
311
- After adding the config, access via the "..." menu → "MCP Servers" → "View raw config" to verify.
312
-
313
- **Rules files:**
314
- - Global rules: `~/.gemini/GEMINI.md`
315
- - Workspace rules: `.agent/rules/contextstream.md`
316
-
317
- ---
318
-
319
- ## Tool Overview (v0.4.x Consolidated)
320
-
321
- In consolidated mode, you call **domain tools** with `action` / `mode`:
322
-
323
- ### Core
324
-
325
- | Tool | Description |
326
- |------|-------------|
327
- | `session_init` | Initialize workspace/project context |
328
- | `context_smart` | Retrieve the best bounded context for the current message |
329
-
330
- ### Domain Tools
331
-
332
- | Tool | Description |
333
- |------|-------------|
334
- | `search` | `mode=semantic\|hybrid\|keyword\|pattern` |
335
- | `session` | `action=capture\|recall\|remember\|get_lessons\|capture_lesson\|...` |
336
- | `memory` | Events + nodes CRUD, decisions, lessons, etc. |
337
- | `graph` | Dependencies, impact, call_path, ingest, etc. |
338
- | `project` | Indexing, ingest_local, stats, files, etc. |
339
- | `workspace` | List, get, associate, bootstrap |
340
- | `reminder` | List, create, snooze, complete, dismiss |
341
- | `integration` | `provider=slack\|github`, search, activity, etc. |
342
- | `help` | Tools, auth, version, editor_rules |
343
-
344
- ### Examples
345
-
346
- ```
347
- search(mode="semantic", query="auth middleware", limit=3)
348
- memory(action="create_node", node_type="decision", title="Auth strategy", content="...")
349
- graph(action="impact", target="UserService")
350
- ```
351
-
352
- **Full tool catalog:** https://contextstream.io/docs/mcp/tools
353
-
354
- ---
355
-
356
- ## Authentication
357
-
358
- Set **one** of:
359
-
360
- | Variable | Use case |
361
- |----------|----------|
362
- | `CONTEXTSTREAM_API_KEY` | Recommended for local/dev |
363
- | `CONTEXTSTREAM_JWT` | Useful for hosted/user-session flows |
364
-
365
254
  ---
366
255
 
367
256
  ## Environment Variables
368
257
 
369
- ### Required
370
-
371
- | Variable | Description |
372
- |----------|-------------|
373
- | `CONTEXTSTREAM_API_URL` | Base API URL (default `https://api.contextstream.io`) |
374
- | `CONTEXTSTREAM_API_KEY` | API key (unless using JWT) |
375
- | `CONTEXTSTREAM_JWT` | JWT (unless using API key) |
376
-
377
- ### Token + Tool Surface Controls
378
-
379
258
  | Variable | Description |
380
259
  |----------|-------------|
381
- | `CONTEXTSTREAM_CONSOLIDATED` | `true` (default in v0.4.x) uses consolidated domain tools |
382
- | `CONTEXTSTREAM_PROGRESSIVE_MODE` | Enables Router mode (~2 meta-tools) |
383
- | `CONTEXTSTREAM_CONTEXT_PACK` | Enable Context Pack for `context_smart` (code + graph + distill). Defaults to `true` |
384
- | `CONTEXTSTREAM_TOOLSET` | Legacy granular tool bundle: `light` / `standard` / `complete` (only when consolidated is off) |
385
- | `CONTEXTSTREAM_TOOL_ALLOWLIST` | Comma-separated tool names to expose (legacy granular mode) |
386
- | `CONTEXTSTREAM_SCHEMA_MODE` | Reduce schema verbosity; e.g., `compact` |
387
- | `CONTEXTSTREAM_OUTPUT_FORMAT` | Output formatting; e.g., `compact` / `pretty` |
388
- | `CONTEXTSTREAM_SEARCH_LIMIT` | Default MCP search limit (default: 3) |
389
- | `CONTEXTSTREAM_SEARCH_MAX_CHARS` | Max chars per search result content (default: 400) |
390
-
391
- ### Optional Defaults
392
-
393
- | Variable | Description |
394
- |----------|-------------|
395
- | `CONTEXTSTREAM_WORKSPACE_ID` | Default workspace fallback |
396
- | `CONTEXTSTREAM_PROJECT_ID` | Default project ID fallback |
397
- | `CONTEXTSTREAM_USER_AGENT` | Custom user agent string |
398
- | `CONTEXTSTREAM_PRO_TOOLS` | Comma-separated tool names treated as PRO |
399
- | `CONTEXTSTREAM_UPGRADE_URL` | Upgrade link for Free users calling PRO tools |
400
-
401
- ---
402
-
403
- ## Migration Notes (pre-0.4.x → 0.4.x)
404
-
405
- Most workflows **just work**, but tool names change in consolidated mode.
406
-
407
- | Before (granular) | After (consolidated) |
408
- |-------------------|----------------------|
409
- | `search_semantic(query="auth")` | `search(mode="semantic", query="auth")` |
410
- | `session_capture(...)` | `session(action="capture", ...)` |
411
- | `graph_dependencies(...)` | `graph(action="dependencies", ...)` |
412
-
413
- If you rely on granular tool names, you can temporarily set:
414
-
415
- ```bash
416
- CONTEXTSTREAM_CONSOLIDATED=false
417
- ```
260
+ | `CONTEXTSTREAM_API_KEY` | Your API key (required) |
261
+ | `CONTEXTSTREAM_API_URL` | API endpoint (default: `https://api.contextstream.io`) |
262
+ | `CONTEXTSTREAM_WORKSPACE_ID` | Default workspace |
263
+ | `CONTEXTSTREAM_PROJECT_ID` | Default project |
264
+ | `CONTEXTSTREAM_SEARCH_REMINDER` | Set to `false` to disable search-first reminders |
265
+ | `CONTEXTSTREAM_HOOK_ENABLED` | Set to `false` to disable hooks without uninstalling |
418
266
 
419
267
  ---
420
268
 
@@ -422,23 +270,9 @@ CONTEXTSTREAM_CONSOLIDATED=false
422
270
 
423
271
  | Issue | Solution |
424
272
  |-------|----------|
425
- | **Tools not appearing** | Restart the client after editing MCP config; confirm Node 18+ is available in the client runtime |
426
- | **Unauthorized / 401** | Verify `CONTEXTSTREAM_API_URL` + `CONTEXTSTREAM_API_KEY` (or JWT) |
427
- | **Wrong workspace/project** | Run `session_init` and/or associate your folder with the correct workspace |
428
- | **Client warns about tool context size** | Use Router mode (`CONTEXTSTREAM_PROGRESSIVE_MODE=true`), or keep consolidated mode and reduce schema/output verbosity |
429
-
430
- ---
431
-
432
- ## Development
433
-
434
- ```bash
435
- git clone https://github.com/contextstream/mcp-server.git
436
- cd mcp-server
437
- npm install
438
- npm run dev
439
- npm run typecheck
440
- npm run build
441
- ```
273
+ | Tools not appearing | Restart your editor after config changes |
274
+ | 401 Unauthorized | Check your API key is correct |
275
+ | Wrong workspace | Run `session_init` or re-run the setup wizard |
442
276
 
443
277
  ---
444
278
 
@@ -447,11 +281,9 @@ npm run build
447
281
  | Resource | URL |
448
282
  |----------|-----|
449
283
  | **Website** | https://contextstream.io |
450
- | **Docs** | https://contextstream.io/docs/mcp |
451
- | **Tool Catalog** | https://contextstream.io/docs/mcp/tools |
284
+ | **Documentation** | https://contextstream.io/docs |
285
+ | **Tool Reference** | https://contextstream.io/docs/mcp/tools |
452
286
  | **Pricing** | https://contextstream.io/pricing |
453
- | **npm** | https://www.npmjs.com/package/@contextstream/mcp-server |
454
- | **GitHub** | https://github.com/contextstream/mcp-server |
455
287
 
456
288
  ---
457
289