@contextstream/mcp-server 0.3.57 → 0.3.59
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 +18 -18
- package/dist/index.js +44 -112
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -54,7 +54,7 @@ npx -y @contextstream/mcp-server setup
|
|
|
54
54
|
|
|
55
55
|
Notes:
|
|
56
56
|
- Uses browser/device login by default and creates an API key for you.
|
|
57
|
-
- Prompts for **toolset selection**: `
|
|
57
|
+
- Prompts for **toolset selection**: `light` (~30 tools), `standard` (default, ~50 tools), or `complete` (~86 tools including workspaces, projects, search, memory, graph, AI, and integrations).
|
|
58
58
|
- To avoid re-auth prompts on subsequent runs, the wizard saves that API key to `~/.contextstream/credentials.json` (and also writes it into the MCP config files it generates). Delete that file to force a fresh login.
|
|
59
59
|
- Codex CLI MCP config is global-only (`~/.codex/config.toml`), so the wizard will always write Codex config globally when selected.
|
|
60
60
|
- Some tools still require UI/CLI-based MCP setup (the wizard will tell you when it can't write a config).
|
|
@@ -93,7 +93,7 @@ If you ran the [setup wizard](#setup-wizard-recommended), you can usually skip t
|
|
|
93
93
|
|
|
94
94
|
If you prefer to configure things by hand (or your tool can't be auto-configured), add the ContextStream MCP server to your client using one of the examples below.
|
|
95
95
|
|
|
96
|
-
**Toolset**: By default, the server exposes `
|
|
96
|
+
**Toolset**: By default, the server exposes the `standard` toolset (~50 tools). Use `CONTEXTSTREAM_TOOLSET=light` to reduce tool count (~30 tools), or `CONTEXTSTREAM_TOOLSET=complete` to expose all ~86 tools (workspaces, projects, search, memory, graph, AI, integrations). See the [full tool catalog](https://contextstream.io/docs/mcp/tools).
|
|
97
97
|
|
|
98
98
|
### Cursor / Windsurf / Claude Desktop (JSON)
|
|
99
99
|
|
|
@@ -107,7 +107,7 @@ These clients use the `mcpServers` JSON schema:
|
|
|
107
107
|
|
|
108
108
|
Many other MCP JSON clients also use this same `mcpServers` shape (including Claude Code project scope via `.mcp.json`).
|
|
109
109
|
|
|
110
|
-
**
|
|
110
|
+
**Standard toolset (default, ~50 tools):**
|
|
111
111
|
|
|
112
112
|
```json
|
|
113
113
|
{
|
|
@@ -124,7 +124,7 @@ Many other MCP JSON clients also use this same `mcpServers` shape (including Cla
|
|
|
124
124
|
}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
-
**
|
|
127
|
+
**Complete toolset (~86 tools):**
|
|
128
128
|
|
|
129
129
|
```json
|
|
130
130
|
{
|
|
@@ -135,7 +135,7 @@ Many other MCP JSON clients also use this same `mcpServers` shape (including Cla
|
|
|
135
135
|
"env": {
|
|
136
136
|
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
|
|
137
137
|
"CONTEXTSTREAM_API_KEY": "your_api_key",
|
|
138
|
-
"CONTEXTSTREAM_TOOLSET": "
|
|
138
|
+
"CONTEXTSTREAM_TOOLSET": "complete"
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -164,7 +164,7 @@ VS Code uses a different schema with a top-level `servers` map:
|
|
|
164
164
|
}
|
|
165
165
|
```
|
|
166
166
|
|
|
167
|
-
**
|
|
167
|
+
**Complete toolset (~86 tools):**
|
|
168
168
|
|
|
169
169
|
```json
|
|
170
170
|
{
|
|
@@ -176,7 +176,7 @@ VS Code uses a different schema with a top-level `servers` map:
|
|
|
176
176
|
"env": {
|
|
177
177
|
"CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
|
|
178
178
|
"CONTEXTSTREAM_API_KEY": "your_api_key",
|
|
179
|
-
"CONTEXTSTREAM_TOOLSET": "
|
|
179
|
+
"CONTEXTSTREAM_TOOLSET": "complete"
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}
|
|
@@ -213,7 +213,7 @@ Strong recommendation: VS Code supports `inputs` so you don’t have to hardcode
|
|
|
213
213
|
|
|
214
214
|
User scope (all projects):
|
|
215
215
|
|
|
216
|
-
**
|
|
216
|
+
**Standard toolset (default):**
|
|
217
217
|
|
|
218
218
|
```bash
|
|
219
219
|
claude mcp add --transport stdio contextstream --scope user \
|
|
@@ -222,37 +222,37 @@ claude mcp add --transport stdio contextstream --scope user \
|
|
|
222
222
|
-- npx -y @contextstream/mcp-server
|
|
223
223
|
```
|
|
224
224
|
|
|
225
|
-
**
|
|
225
|
+
**Complete toolset (~86 tools):**
|
|
226
226
|
|
|
227
227
|
```bash
|
|
228
228
|
claude mcp add --transport stdio contextstream --scope user \
|
|
229
229
|
--env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
|
|
230
230
|
--env CONTEXTSTREAM_API_KEY=YOUR_KEY \
|
|
231
|
-
--env CONTEXTSTREAM_TOOLSET=
|
|
231
|
+
--env CONTEXTSTREAM_TOOLSET=complete \
|
|
232
232
|
-- npx -y @contextstream/mcp-server
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
-
Note: Claude Code may warn about large tool contexts when using `
|
|
235
|
+
Note: Claude Code may warn about large tool contexts when using `complete`. The default is `standard` (~50 tools). Use `light` for fewer tools.
|
|
236
236
|
|
|
237
237
|
Windows caveat (native Windows, not WSL): if `npx` isn't found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
|
|
238
238
|
|
|
239
239
|
**Alternative (JSON form):**
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
Standard:
|
|
242
242
|
```bash
|
|
243
243
|
claude mcp add-json contextstream \
|
|
244
244
|
'{"type":"stdio","command":"npx","args":["-y","@contextstream/mcp-server"],"env":{"CONTEXTSTREAM_API_URL":"https://api.contextstream.io","CONTEXTSTREAM_API_KEY":"your_api_key"}}'
|
|
245
245
|
```
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
Complete:
|
|
248
248
|
```bash
|
|
249
249
|
claude mcp add-json contextstream \
|
|
250
|
-
'{"type":"stdio","command":"npx","args":["-y","@contextstream/mcp-server"],"env":{"CONTEXTSTREAM_API_URL":"https://api.contextstream.io","CONTEXTSTREAM_API_KEY":"your_api_key","CONTEXTSTREAM_TOOLSET":"
|
|
250
|
+
'{"type":"stdio","command":"npx","args":["-y","@contextstream/mcp-server"],"env":{"CONTEXTSTREAM_API_URL":"https://api.contextstream.io","CONTEXTSTREAM_API_KEY":"your_api_key","CONTEXTSTREAM_TOOLSET":"complete"}}'
|
|
251
251
|
```
|
|
252
252
|
|
|
253
253
|
### Codex CLI (`~/.codex/config.toml`)
|
|
254
254
|
|
|
255
|
-
**
|
|
255
|
+
**Standard toolset (default):**
|
|
256
256
|
|
|
257
257
|
```toml
|
|
258
258
|
[mcp_servers.contextstream]
|
|
@@ -264,7 +264,7 @@ CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
|
|
|
264
264
|
CONTEXTSTREAM_API_KEY = "your_api_key"
|
|
265
265
|
```
|
|
266
266
|
|
|
267
|
-
**
|
|
267
|
+
**Complete toolset (~86 tools):**
|
|
268
268
|
|
|
269
269
|
```toml
|
|
270
270
|
[mcp_servers.contextstream]
|
|
@@ -274,7 +274,7 @@ args = ["-y", "@contextstream/mcp-server"]
|
|
|
274
274
|
[mcp_servers.contextstream.env]
|
|
275
275
|
CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
|
|
276
276
|
CONTEXTSTREAM_API_KEY = "your_api_key"
|
|
277
|
-
CONTEXTSTREAM_TOOLSET = "
|
|
277
|
+
CONTEXTSTREAM_TOOLSET = "complete"
|
|
278
278
|
```
|
|
279
279
|
|
|
280
280
|
After editing, restart your MCP client so it reloads the server configuration.
|
|
@@ -296,7 +296,7 @@ You can authenticate using either:
|
|
|
296
296
|
| `CONTEXTSTREAM_WORKSPACE_ID` | No | Default workspace ID fallback |
|
|
297
297
|
| `CONTEXTSTREAM_PROJECT_ID` | No | Default project ID fallback |
|
|
298
298
|
| `CONTEXTSTREAM_USER_AGENT` | No | Custom user agent string |
|
|
299
|
-
| `CONTEXTSTREAM_TOOLSET` | No | Tool bundle to expose: `
|
|
299
|
+
| `CONTEXTSTREAM_TOOLSET` | No | Tool bundle to expose: `light` (~30 tools), `standard` (default, ~50 tools), or `complete` (~86 tools). Claude Code/Desktop may warn about large tool contexts with `complete`. |
|
|
300
300
|
| `CONTEXTSTREAM_TOOL_ALLOWLIST` | No | Comma-separated tool names to expose (overrides toolset) |
|
|
301
301
|
| `CONTEXTSTREAM_PRO_TOOLS` | No | Comma-separated tool names treated as PRO (default: `ai_context,ai_enhanced_context,ai_context_budget,ai_embeddings,ai_plan,ai_tasks`) |
|
|
302
302
|
| `CONTEXTSTREAM_UPGRADE_URL` | No | Upgrade link shown when Free users call PRO tools (default: `https://contextstream.io/pricing`) |
|
package/dist/index.js
CHANGED
|
@@ -7253,7 +7253,7 @@ import * as path4 from "node:path";
|
|
|
7253
7253
|
// src/rules-templates.ts
|
|
7254
7254
|
var DEFAULT_CLAUDE_MCP_SERVER_NAME = "contextstream";
|
|
7255
7255
|
var CONTEXTSTREAM_TOOL_NAMES = [
|
|
7256
|
-
// Session/Context (
|
|
7256
|
+
// Session/Context (standard)
|
|
7257
7257
|
"session_init",
|
|
7258
7258
|
"context_smart",
|
|
7259
7259
|
"session_summary",
|
|
@@ -7368,7 +7368,7 @@ function applyMcpToolPrefix(markdown, toolPrefix) {
|
|
|
7368
7368
|
return markdown.replace(toolRegex, `${toolPrefix}$1`);
|
|
7369
7369
|
}
|
|
7370
7370
|
var CONTEXTSTREAM_RULES_FULL = `
|
|
7371
|
-
## ContextStream Integration
|
|
7371
|
+
## ContextStream Integration (Enhanced)
|
|
7372
7372
|
|
|
7373
7373
|
You have access to ContextStream MCP tools for persistent memory and context.
|
|
7374
7374
|
|
|
@@ -7377,7 +7377,8 @@ You have access to ContextStream MCP tools for persistent memory and context.
|
|
|
7377
7377
|
| Message | What to Call |
|
|
7378
7378
|
|---------|--------------|
|
|
7379
7379
|
| **1st message** | \`session_init(folder_path="...", context_hint="<user's message>")\` |
|
|
7380
|
-
| **2nd+ messages** | \`context_smart(user_message="<user's message>", max_tokens=400)\` |
|
|
7380
|
+
| **2nd+ messages** | \`context_smart(user_message="<user's message>", format="minified", max_tokens=400)\` |
|
|
7381
|
+
| **Before risky/non-trivial work** | \`session_get_lessons(query="<topic>")\` |
|
|
7381
7382
|
| **After completing task** | \`session_capture(...)\` - MUST capture decisions/insights |
|
|
7382
7383
|
| **User frustration/correction** | \`session_capture_lesson(...)\` - MUST capture lessons |
|
|
7383
7384
|
| **Command/tool error + fix** | \`session_capture_lesson(...)\` - MUST capture lessons |
|
|
@@ -7386,7 +7387,7 @@ You have access to ContextStream MCP tools for persistent memory and context.
|
|
|
7386
7387
|
|
|
7387
7388
|
---
|
|
7388
7389
|
|
|
7389
|
-
###
|
|
7390
|
+
### Why context_smart is Required (Even After session_init)
|
|
7390
7391
|
|
|
7391
7392
|
**Common mistake:** "session_init already gave me context, I don't need context_smart"
|
|
7392
7393
|
|
|
@@ -7397,8 +7398,8 @@ You have access to ContextStream MCP tools for persistent memory and context.
|
|
|
7397
7398
|
**Example failure:**
|
|
7398
7399
|
- User asks: "how should I implement authentication?"
|
|
7399
7400
|
- Auth decisions were made 20 conversations ago
|
|
7400
|
-
-
|
|
7401
|
-
-
|
|
7401
|
+
- \`session_init\` won't have it (too old, not in recent 10)
|
|
7402
|
+
- \`context_smart\` FINDS it via semantic search
|
|
7402
7403
|
|
|
7403
7404
|
**Without context_smart, you WILL miss relevant older context.**
|
|
7404
7405
|
|
|
@@ -7408,138 +7409,67 @@ You have access to ContextStream MCP tools for persistent memory and context.
|
|
|
7408
7409
|
|
|
7409
7410
|
- For trivial/local edits: \`context_smart(..., max_tokens=200)\`
|
|
7410
7411
|
- Default: \`context_smart(..., max_tokens=400)\`
|
|
7411
|
-
- Deep debugging/architecture or heavy
|
|
7412
|
-
- Keep \`format="minified"\` (default) unless you
|
|
7412
|
+
- Deep debugging/architecture or heavy "what did we decide?": \`context_smart(..., max_tokens=800)\`
|
|
7413
|
+
- Keep \`format="minified"\` (default) unless you're debugging tool output
|
|
7413
7414
|
|
|
7414
7415
|
If context still feels missing, increase \`max_tokens\` and/or call \`session_recall\` for a focused deep lookup.
|
|
7415
7416
|
|
|
7416
7417
|
---
|
|
7417
7418
|
|
|
7418
|
-
###
|
|
7419
|
+
### Preferences & Lessons (Use Early)
|
|
7419
7420
|
|
|
7420
|
-
|
|
7421
|
-
|
|
7422
|
-
|
|
7423
|
-
| User states preference | \`session_capture\` | "I prefer TypeScript" \u2192 capture as preference |
|
|
7424
|
-
| You complete a task | \`session_capture\` | Capture what was done, decisions made |
|
|
7425
|
-
| Need past context | \`session_recall\` | "What did we decide about X?" |
|
|
7426
|
-
|
|
7427
|
-
**You MUST capture after completing any significant task.** This ensures future sessions have context.
|
|
7421
|
+
- If preferences or style matter, call \`session_get_user_context\`.
|
|
7422
|
+
- Before risky changes or when past mistakes may apply, call \`session_get_lessons(query="<topic>")\`.
|
|
7423
|
+
- When frustration, corrections, or tool mistakes occur, immediately call \`session_capture_lesson\`.
|
|
7428
7424
|
|
|
7429
7425
|
---
|
|
7430
7426
|
|
|
7431
|
-
###
|
|
7432
|
-
|
|
7433
|
-
**First message of conversation:**
|
|
7434
|
-
1. Call \`session_init(folder_path="<cwd>", context_hint="<user's message>")\`
|
|
7435
|
-
2. Then respond
|
|
7436
|
-
|
|
7437
|
-
**Every subsequent message:**
|
|
7438
|
-
1. Call \`context_smart(user_message="<user's message>")\` FIRST
|
|
7439
|
-
2. Then respond
|
|
7427
|
+
### Search, Graphs, and Code Intelligence (ContextStream-first)
|
|
7440
7428
|
|
|
7441
|
-
|
|
7442
|
-
|
|
7443
|
-
|
|
7444
|
-
|
|
7445
|
-
**When user asks about past decisions:**
|
|
7446
|
-
- Use \`session_recall\` - do NOT ask user to repeat themselves
|
|
7447
|
-
|
|
7448
|
-
---
|
|
7449
|
-
|
|
7450
|
-
### Search (ContextStream-first)
|
|
7451
|
-
|
|
7452
|
-
- Before scanning the repo or grepping, use \`session_smart_search\` to locate relevant files, patterns, and prior context.
|
|
7453
|
-
- Follow up with \`session_recall\` if you need deeper history on a specific topic.
|
|
7454
|
-
- Only fall back to raw file scans (\`rg\`, \`ls\`, \`find\`) when ContextStream search doesn't surface what you need.
|
|
7429
|
+
- Use \`session_smart_search\` before scanning the repo or grepping.
|
|
7430
|
+
- Use \`search_semantic\`/\`search_hybrid\`/\`search_keyword\` for targeted queries.
|
|
7431
|
+
- For dependencies/impact/call paths, use \`graph_dependencies\`, \`graph_impact\`, and \`graph_call_path\`.
|
|
7432
|
+
- If the graph is missing or stale, run \`graph_ingest\` (async by default with \`wait: false\`). Tell the user it can take a few minutes; optionally call \`projects_statistics\` to estimate time.
|
|
7455
7433
|
|
|
7456
7434
|
---
|
|
7457
7435
|
|
|
7458
|
-
###
|
|
7459
|
-
|
|
7460
|
-
When:
|
|
7461
|
-
1. **Expresses frustration** (caps, profanity, "COME ON", "WTF", repeated corrections)
|
|
7462
|
-
2. **Corrects you** ("No, you should...", "That's wrong", "Fix this")
|
|
7463
|
-
3. **Points out a mistake** (broken code, wrong approach, production issue)
|
|
7464
|
-
4. **A command/tool call fails and you learn the correct fix** (even if the user didn\u2019t explicitly correct you)
|
|
7465
|
-
|
|
7466
|
-
You MUST immediately call \`session_capture_lesson\` with:
|
|
7467
|
-
|
|
7468
|
-
| Field | Description | Example |
|
|
7469
|
-
|-------|-------------|---------|
|
|
7470
|
-
| \`title\` | What to remember | "Verify assets in git before pushing" |
|
|
7471
|
-
| \`severity\` | \`critical\`/\`high\`/\`medium\`/\`low\` | \`critical\` for production issues |
|
|
7472
|
-
| \`category\` | \`workflow\`/\`code_quality\`/\`verification\`/\`communication\`/\`project_specific\` | \`workflow\` |
|
|
7473
|
-
| \`trigger\` | What action caused the problem | "Pushed code referencing images without committing them" |
|
|
7474
|
-
| \`impact\` | What went wrong | "Production 404 errors - broken landing page" |
|
|
7475
|
-
| \`prevention\` | How to prevent in future | "Run git status to check untracked files before pushing" |
|
|
7476
|
-
| \`keywords\` | Keywords for matching | \`["git", "images", "assets", "push"]\` |
|
|
7436
|
+
### Distillation & Memory Hygiene
|
|
7477
7437
|
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
"title": "Always verify assets in git before pushing code references",
|
|
7482
|
-
"severity": "critical",
|
|
7483
|
-
"category": "workflow",
|
|
7484
|
-
"trigger": "Pushed code referencing /screenshots/*.png without committing images",
|
|
7485
|
-
"impact": "Production 404 errors - broken landing page",
|
|
7486
|
-
"prevention": "Run 'git status' to check untracked files before pushing code that references static assets",
|
|
7487
|
-
"keywords": ["git", "images", "assets", "push", "404", "static"]
|
|
7488
|
-
}
|
|
7489
|
-
\`\`\`
|
|
7490
|
-
|
|
7491
|
-
**Why this matters:**
|
|
7492
|
-
- Lessons are surfaced automatically in \`session_init\` and \`context_smart\`
|
|
7493
|
-
- Future sessions will warn you before repeating the same mistake
|
|
7494
|
-
- This prevents production issues and user frustration
|
|
7495
|
-
|
|
7496
|
-
**Severity guide:**
|
|
7497
|
-
- \`critical\`: Production outages, data loss, security issues
|
|
7498
|
-
- \`high\`: Breaking changes, significant user impact
|
|
7499
|
-
- \`medium\`: Workflow inefficiencies, minor bugs
|
|
7500
|
-
- \`low\`: Style/preference corrections
|
|
7438
|
+
- Use \`session_summary\` for a fast workspace snapshot.
|
|
7439
|
+
- Use \`session_compress\` when the chat is long or context limits are near.
|
|
7440
|
+
- Use \`memory_summary\` for recent work summaries and \`memory_distill_event\` to condense noisy memory entries.
|
|
7501
7441
|
|
|
7502
7442
|
---
|
|
7503
7443
|
|
|
7504
|
-
###
|
|
7505
|
-
|
|
7506
|
-
\`\`\`
|
|
7507
|
-
# First message - user asks about auth
|
|
7508
|
-
session_init(folder_path="/path/to/project", context_hint="how should I implement auth?")
|
|
7509
|
-
# Returns workspace info + semantically relevant auth decisions from ANY time
|
|
7510
|
-
|
|
7511
|
-
# Second message - user asks about database
|
|
7512
|
-
context_smart(user_message="what database should I use?", max_tokens=400)
|
|
7513
|
-
# Returns: W:Maker|P:myproject|D:Use PostgreSQL|D:No ORMs|M:DB schema at...
|
|
7514
|
-
|
|
7515
|
-
# User says "Let's use Redis for caching"
|
|
7516
|
-
session_capture(event_type="decision", title="Caching Choice", content="Using Redis for caching layer")
|
|
7444
|
+
### When to Capture (MANDATORY)
|
|
7517
7445
|
|
|
7518
|
-
|
|
7519
|
-
|
|
7446
|
+
| When | Tool | Example |
|
|
7447
|
+
|------|------|---------|
|
|
7448
|
+
| User makes a decision | \`session_capture\` | "Let's use PostgreSQL" -> capture as decision |
|
|
7449
|
+
| User states preference | \`session_capture\` | "I prefer TypeScript" -> capture as preference |
|
|
7450
|
+
| You complete a task | \`session_capture\` | Capture what was done, decisions made |
|
|
7451
|
+
| Need past context | \`session_recall\` | "What did we decide about X?" |
|
|
7520
7452
|
|
|
7521
|
-
|
|
7522
|
-
session_recall(query="what did we decide about caching?")
|
|
7523
|
-
\`\`\`
|
|
7453
|
+
**You MUST capture after completing any significant task.** This ensures future sessions have context.
|
|
7524
7454
|
|
|
7525
7455
|
---
|
|
7526
7456
|
|
|
7527
7457
|
### Full Tool Catalog
|
|
7528
7458
|
|
|
7529
|
-
To expose all tools below, set \`CONTEXTSTREAM_TOOLSET=
|
|
7459
|
+
To expose all tools below, set \`CONTEXTSTREAM_TOOLSET=complete\` in your MCP config. The default (\`standard\`) includes the essential session, search, memory, and graph tools above.
|
|
7530
7460
|
|
|
7531
|
-
**To enable
|
|
7461
|
+
**To enable the complete toolset in your MCP config:**
|
|
7532
7462
|
\`\`\`json
|
|
7533
7463
|
{
|
|
7534
7464
|
"env": {
|
|
7535
|
-
"CONTEXTSTREAM_TOOLSET": "
|
|
7465
|
+
"CONTEXTSTREAM_TOOLSET": "complete"
|
|
7536
7466
|
}
|
|
7537
7467
|
}
|
|
7538
7468
|
\`\`\`
|
|
7539
7469
|
|
|
7540
|
-
**Available tool categories (when \`CONTEXTSTREAM_TOOLSET=
|
|
7470
|
+
**Available tool categories (when \`CONTEXTSTREAM_TOOLSET=complete\`):**
|
|
7541
7471
|
|
|
7542
|
-
**Session/Context** (included in
|
|
7472
|
+
**Session/Context** (included in standard):
|
|
7543
7473
|
\`session_init\`, \`context_smart\`, \`session_summary\`, \`session_capture\`, \`session_capture_lesson\`, \`session_get_lessons\`, \`session_recall\`, \`session_remember\`, \`session_get_user_context\`, \`session_smart_search\`, \`session_compress\`, \`session_delta\`, \`generate_editor_rules\`, \`workspace_associate\`, \`workspace_bootstrap\`
|
|
7544
7474
|
|
|
7545
7475
|
**Workspaces**:
|
|
@@ -7572,24 +7502,26 @@ To expose all tools below, set \`CONTEXTSTREAM_TOOLSET=full\` in your MCP config
|
|
|
7572
7502
|
See full documentation: https://contextstream.io/docs/mcp/tools
|
|
7573
7503
|
`.trim();
|
|
7574
7504
|
var CONTEXTSTREAM_RULES_MINIMAL = `
|
|
7575
|
-
## ContextStream (
|
|
7505
|
+
## ContextStream (Standard)
|
|
7576
7506
|
|
|
7577
7507
|
- First user message: \`session_init(folder_path="<cwd>", context_hint="<user_message>")\`, then answer.
|
|
7578
7508
|
- Every user message: \`context_smart(user_message="<user_message>", format="minified", max_tokens=400)\` BEFORE answering.
|
|
7579
7509
|
- Use \`max_tokens=200\` for trivial/local edits, \`max_tokens=800\` for deep debugging/architecture.
|
|
7580
|
-
-
|
|
7581
|
-
- For
|
|
7582
|
-
-
|
|
7510
|
+
- Before risky/non-trivial work: check \`session_get_lessons(query="<topic>")\`; use \`session_get_user_context\` when preferences/style matter.
|
|
7511
|
+
- For discovery: use \`session_smart_search\` first; use \`search_semantic\`/\`search_hybrid\`/\`search_keyword\` for targeted lookups.
|
|
7512
|
+
- For code intelligence: use \`graph_dependencies\`/\`graph_impact\`/\`graph_call_path\`; run \`graph_ingest\` if the graph is missing (async by default, can take a few minutes).
|
|
7513
|
+
- For distillation: use \`session_summary\` for quick context; use \`session_compress\` for long chats; use \`memory_summary\` or \`memory_distill_event\` to condense memory.
|
|
7514
|
+
- After meaningful work/decisions/preferences: \`session_capture(event_type=decision|preference|task|insight, title="...", content="...")\`.
|
|
7583
7515
|
- On frustration/corrections/tool mistakes: \`session_capture_lesson(...)\`.
|
|
7584
7516
|
|
|
7585
7517
|
### Tool Catalog
|
|
7586
7518
|
|
|
7587
|
-
By default, the MCP server exposes **
|
|
7519
|
+
By default, the MCP server exposes the **standard** toolset (~50 tools). To expose fewer tools, set \`CONTEXTSTREAM_TOOLSET=light\`. To expose everything (~86 tools), set \`CONTEXTSTREAM_TOOLSET=complete\` in your MCP config:
|
|
7588
7520
|
|
|
7589
7521
|
\`\`\`json
|
|
7590
7522
|
{
|
|
7591
7523
|
"env": {
|
|
7592
|
-
"CONTEXTSTREAM_TOOLSET": "
|
|
7524
|
+
"CONTEXTSTREAM_TOOLSET": "complete"
|
|
7593
7525
|
}
|
|
7594
7526
|
}
|
|
7595
7527
|
\`\`\`
|
|
@@ -12030,7 +11962,7 @@ Created API key: ${maskedNewKey}
|
|
|
12030
11962
|
}
|
|
12031
11963
|
console.log("Rules detail level (in the generated rules file):\n");
|
|
12032
11964
|
console.log(" 1) Standard (recommended) \u2014 concise, high-signal (lower token overhead)");
|
|
12033
|
-
console.log(" 2)
|
|
11965
|
+
console.log(" 2) Enhanced \u2014 more guidance + examples (higher token overhead)");
|
|
12034
11966
|
const modeChoice = normalizeInput(await rl.question("Choose [1/2] (default 1): ")) || "1";
|
|
12035
11967
|
const mode = modeChoice === "2" ? "full" : "minimal";
|
|
12036
11968
|
console.log("\nMCP toolset (which tools to expose to the AI):");
|
package/package.json
CHANGED