@contextstream/mcp-server 0.4.31 → 0.4.33

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 +131 -318
  3. package/dist/index.js +503 -41
  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,177 +1,171 @@
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.
10
-
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.).
12
-
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.
11
+ Works with Cursor, Antigravity, Claude Code, Windsurf, VS Code, Claude Desktop, Codex CLI, and more.
17
12
 
18
13
  ---
19
14
 
20
- ## Just Ask
15
+ ## The Problem
21
16
 
22
- **You don't need to memorize tool names.** Describe what you want and your AI will call the right ContextStream tools:
17
+ Without ContextStream, every AI conversation starts from scratch:
23
18
 
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 |
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
31
23
 
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
24
+ ## The Solution
34
25
 
35
- ![ContextStream in action](compare1.gif)
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 |
36
35
 
37
36
  ---
38
37
 
39
- ## Choose Your Mode (Token Footprint)
38
+ ## See It In Action
40
39
 
41
- MCP clients often inject the tool catalog into the model context. v0.4.x is designed to keep that overhead small.
40
+ **You say...** **ContextStream does...**
42
41
 
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` |
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 |
48
50
 
49
- > **Note:** The env var name for Router mode is `CONTEXTSTREAM_PROGRESSIVE_MODE` (historical naming). It enables the ~2-tool "router" surface.
51
+ No special commands needed. Just describe what you want.
50
52
 
51
- ---
53
+ ![ContextStream in action](compare1.gif)
52
54
 
53
- ## Features
55
+ ---
54
56
 
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
57
+ ## Quick Setup (30 seconds)
63
58
 
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.
59
+ The setup wizard handles everything:
65
60
 
66
- ---
61
+ ```bash
62
+ npx -y @contextstream/mcp-server setup
63
+ ```
67
64
 
68
- ## Graph Tiers
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
69
70
 
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 |
71
+ That's it. Start a conversation and your AI now has memory.
74
72
 
75
73
  ---
76
74
 
77
- ## Requirements
75
+ ## What Gets Captured
76
+
77
+ ContextStream automatically tracks:
78
78
 
79
- - **Node.js 18+**
80
- - A **ContextStream account**
81
- - Auth via **API key** or **JWT**
79
+ | Type | Examples |
80
+ |------|----------|
81
+ | **Decisions** | "We chose JWT over sessions", "Using Tailwind for styling" |
82
+ | **Preferences** | "I prefer functional components", "Always use TypeScript" |
83
+ | **Lessons** | "That approach caused a memory leak", "This pattern works well" |
84
+ | **Tasks** | Implementation plans, TODOs, follow-ups |
85
+ | **Code Context** | File relationships, dependencies, patterns |
82
86
 
83
- Default API URL: `https://api.contextstream.io`
87
+ Everything is searchable by meaning, not just keywords.
84
88
 
85
89
  ---
86
90
 
87
- ## Quickstart (2 minutes)
91
+ ## Integrations
88
92
 
89
- ### 1) Run the Setup Wizard (recommended)
93
+ Connect your team's tools to enrich AI context automatically:
90
94
 
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
95
+ ### GitHub
96
+ - Issues, PRs, releases, and comments synced as searchable memory
97
+ - "What's the status of the auth refactor?" finds the relevant PR
98
+ - Decisions from issue discussions surface when relevant
96
99
 
97
- ```bash
98
- npx -y @contextstream/mcp-server setup
99
- ```
100
+ ### Slack
101
+ - Channel discussions become searchable knowledge
102
+ - Team decisions captured from conversations
103
+ - "What did we discuss about the API?" finds the thread
100
104
 
101
- **Useful flags:**
105
+ ### Notion
106
+ - Documentation and wikis become AI context
107
+ - Smart type detection for tasks, meetings, bugs, features
108
+ - "How does our deployment process work?" finds the runbook
102
109
 
103
- | Flag | Description |
104
- |------|-------------|
105
- | `--dry-run` | Preview without writing files |
110
+ ---
106
111
 
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).
112
+ ## Team Features
111
113
 
112
- ### 2) Run the MCP Server
114
+ ContextStream shines for teams:
113
115
 
114
- **Recommended** (works well with MCP configs):
116
+ - **Shared workspace memory** decisions made by anyone benefit everyone
117
+ - **Onboarding acceleration** — new team members get full context from day one
118
+ - **Knowledge preservation** — context survives when people leave
119
+ - **Consistent AI behavior** — everyone's AI knows the same preferences
115
120
 
116
- ```bash
117
- npx -y @contextstream/mcp-server
118
- ```
121
+ ---
119
122
 
120
- **Or install globally:**
123
+ ## Smarter Context, Fewer Tokens
121
124
 
122
- ```bash
123
- npm install -g @contextstream/mcp-server
124
- contextstream-mcp
125
- ```
125
+ 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.
126
126
 
127
- ### 3) Keeping Updated
127
+ ContextStream takes a different approach:
128
128
 
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`)
129
+ **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.
131
130
 
132
- **If you installed globally:**
131
+ **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.
133
132
 
134
- ```bash
135
- npm update -g @contextstream/mcp-server
136
- ```
133
+ **Smart output formats** — Choose the verbosity you need:
134
+ - Need file locations? Use `paths` format (80% smaller responses)
135
+ - Just checking if something exists? Use `count` format (90% smaller)
136
+ - Need full context? Use `full` format
137
137
 
138
- After updating, restart your AI tool/editor so it reloads the tool catalog.
138
+ **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.
139
+
140
+ 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.
139
141
 
140
142
  ---
141
143
 
142
- ## Configure Your MCP Client (Manual)
144
+ ## Core Tools
143
145
 
144
- > If you ran the setup wizard, you can usually skip this.
146
+ Your AI uses these automatically:
145
147
 
146
- ### Cursor / Windsurf / Claude Desktop (JSON)
148
+ | Tool | Purpose |
149
+ |------|---------|
150
+ | `session_init` | Load workspace/project context at conversation start |
151
+ | `context_smart` | Get relevant context for each message |
152
+ | `search` | Semantic, hybrid, or keyword search across everything |
153
+ | `session` | Capture and recall decisions, preferences, lessons |
154
+ | `memory` | Create and manage knowledge nodes |
155
+ | `graph` | Analyze code dependencies and impact |
156
+ | `integration` | Query GitHub, Slack, Notion directly |
147
157
 
148
- These clients use an `mcpServers` JSON config:
158
+ **Full tool reference:** https://contextstream.io/docs/mcp/tools
149
159
 
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` |
160
+ ---
156
161
 
157
- **Consolidated (default):**
162
+ ## Manual Configuration
158
163
 
159
- ```json
160
- {
161
- "mcpServers": {
162
- "contextstream": {
163
- "command": "npx",
164
- "args": ["-y", "@contextstream/mcp-server"],
165
- "env": {
166
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
167
- "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
168
- }
169
- }
170
- }
171
- }
172
- ```
164
+ > Skip this if you used the setup wizard.
165
+
166
+ ### Cursor / Windsurf / Claude Desktop
173
167
 
174
- **Router mode (~2 meta-tools):**
168
+ Add to your MCP config:
175
169
 
176
170
  ```json
177
171
  {
@@ -180,36 +174,29 @@ These clients use an `mcpServers` JSON config:
180
174
  "command": "npx",
181
175
  "args": ["-y", "@contextstream/mcp-server"],
182
176
  "env": {
183
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
184
- "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY",
185
- "CONTEXTSTREAM_PROGRESSIVE_MODE": "true"
177
+ "CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
186
178
  }
187
179
  }
188
180
  }
189
181
  }
190
182
  ```
191
183
 
192
- ### VS Code (`.vscode/mcp.json`)
184
+ Config locations:
185
+ - **Cursor:** `~/.cursor/mcp.json`
186
+ - **Windsurf:** `~/.codeium/windsurf/mcp_config.json`
187
+ - **Claude Desktop (macOS):** `~/Library/Application Support/Claude/claude_desktop_config.json`
193
188
 
194
- VS Code uses a top-level `servers` map:
189
+ ### Claude Code (CLI)
195
190
 
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
- }
191
+ ```bash
192
+ claude mcp add --transport stdio contextstream --scope user \
193
+ --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
194
+ -- npx -y @contextstream/mcp-server
210
195
  ```
211
196
 
212
- **Strong recommendation:** Use `inputs` so you don't commit secrets:
197
+ ### VS Code
198
+
199
+ Add to `.vscode/mcp.json`:
213
200
 
214
201
  ```json
215
202
  {
@@ -219,7 +206,6 @@ VS Code uses a top-level `servers` map:
219
206
  "command": "npx",
220
207
  "args": ["-y", "@contextstream/mcp-server"],
221
208
  "env": {
222
- "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
223
209
  "CONTEXTSTREAM_API_KEY": "${input:contextstreamApiKey}"
224
210
  }
225
211
  }
@@ -235,30 +221,9 @@ VS Code uses a top-level `servers` map:
235
221
  }
236
222
  ```
237
223
 
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
- ```
224
+ ### Codex CLI
258
225
 
259
- > **Windows caveat** (native Windows, not WSL): if `npx` isn't found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
260
-
261
- ### Codex CLI (`~/.codex/config.toml`)
226
+ Add to `~/.codex/config.toml`:
262
227
 
263
228
  ```toml
264
229
  [mcp_servers.contextstream]
@@ -266,155 +231,19 @@ command = "npx"
266
231
  args = ["-y", "@contextstream/mcp-server"]
267
232
 
268
233
  [mcp_servers.contextstream.env]
269
- CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
270
234
  CONTEXTSTREAM_API_KEY = "YOUR_API_KEY"
271
235
  ```
272
236
 
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
237
  ---
366
238
 
367
239
  ## Environment Variables
368
240
 
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
241
  | Variable | Description |
380
242
  |----------|-------------|
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
- ```
243
+ | `CONTEXTSTREAM_API_KEY` | Your API key (required) |
244
+ | `CONTEXTSTREAM_API_URL` | API endpoint (default: `https://api.contextstream.io`) |
245
+ | `CONTEXTSTREAM_WORKSPACE_ID` | Default workspace |
246
+ | `CONTEXTSTREAM_PROJECT_ID` | Default project |
418
247
 
419
248
  ---
420
249
 
@@ -422,23 +251,9 @@ CONTEXTSTREAM_CONSOLIDATED=false
422
251
 
423
252
  | Issue | Solution |
424
253
  |-------|----------|
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
- ```
254
+ | Tools not appearing | Restart your editor after config changes |
255
+ | 401 Unauthorized | Check your API key is correct |
256
+ | Wrong workspace | Run `session_init` or re-run the setup wizard |
442
257
 
443
258
  ---
444
259
 
@@ -447,11 +262,9 @@ npm run build
447
262
  | Resource | URL |
448
263
  |----------|-----|
449
264
  | **Website** | https://contextstream.io |
450
- | **Docs** | https://contextstream.io/docs/mcp |
451
- | **Tool Catalog** | https://contextstream.io/docs/mcp/tools |
265
+ | **Documentation** | https://contextstream.io/docs |
266
+ | **Tool Reference** | https://contextstream.io/docs/mcp/tools |
452
267
  | **Pricing** | https://contextstream.io/pricing |
453
- | **npm** | https://www.npmjs.com/package/@contextstream/mcp-server |
454
- | **GitHub** | https://github.com/contextstream/mcp-server |
455
268
 
456
269
  ---
457
270