@contextstream/mcp-server 0.3.41 → 0.3.43

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 (3) hide show
  1. package/README.md +80 -7
  2. package/dist/index.js +465 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -91,6 +91,8 @@ These clients use the `mcpServers` JSON schema:
91
91
 
92
92
  Many other MCP JSON clients also use this same `mcpServers` shape (including Claude Code project scope via `.mcp.json`).
93
93
 
94
+ **Core toolset (default, ~17 tools):**
95
+
94
96
  ```json
95
97
  {
96
98
  "mcpServers": {
@@ -106,10 +108,30 @@ Many other MCP JSON clients also use this same `mcpServers` shape (including Cla
106
108
  }
107
109
  ```
108
110
 
111
+ **Full toolset (~86 tools):**
112
+
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "contextstream": {
117
+ "command": "npx",
118
+ "args": ["-y", "@contextstream/mcp-server"],
119
+ "env": {
120
+ "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
121
+ "CONTEXTSTREAM_API_KEY": "your_api_key",
122
+ "CONTEXTSTREAM_TOOLSET": "full"
123
+ }
124
+ }
125
+ }
126
+ }
127
+ ```
128
+
109
129
  ### VS Code (`.vscode/mcp.json`)
110
130
 
111
131
  VS Code uses a different schema with a top-level `servers` map:
112
132
 
133
+ **Core toolset (default):**
134
+
113
135
  ```json
114
136
  {
115
137
  "servers": {
@@ -126,6 +148,25 @@ VS Code uses a different schema with a top-level `servers` map:
126
148
  }
127
149
  ```
128
150
 
151
+ **Full toolset (~86 tools):**
152
+
153
+ ```json
154
+ {
155
+ "servers": {
156
+ "contextstream": {
157
+ "type": "stdio",
158
+ "command": "npx",
159
+ "args": ["-y", "@contextstream/mcp-server"],
160
+ "env": {
161
+ "CONTEXTSTREAM_API_URL": "https://api.contextstream.io",
162
+ "CONTEXTSTREAM_API_KEY": "your_api_key",
163
+ "CONTEXTSTREAM_TOOLSET": "full"
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
129
170
  Strong recommendation: VS Code supports `inputs` so you don’t have to hardcode secrets in a committed file:
130
171
 
131
172
  ```json
@@ -156,28 +197,59 @@ Strong recommendation: VS Code supports `inputs` so you don’t have to hardcode
156
197
 
157
198
  User scope (all projects):
158
199
 
200
+ **Core toolset (recommended for Claude Code):**
201
+
202
+ ```bash
203
+ claude mcp add --transport stdio contextstream --scope user \
204
+ --env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
205
+ --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
206
+ -- npx -y @contextstream/mcp-server
207
+ ```
208
+
209
+ **Full toolset (~86 tools):**
210
+
159
211
  ```bash
160
212
  claude mcp add --transport stdio contextstream --scope user \
161
213
  --env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
162
214
  --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
163
- --env CONTEXTSTREAM_TOOLSET=core -- \
164
- npx -y @contextstream/mcp-server
215
+ --env CONTEXTSTREAM_TOOLSET=full \
216
+ -- npx -y @contextstream/mcp-server
165
217
  ```
166
218
 
167
- Tip: Claude Code warns on large tool contexts. The default toolset is `core`.
168
- Set `CONTEXTSTREAM_TOOLSET=full` to expose everything.
219
+ Note: Claude Code may warn about large tool contexts when using `full`. The default is `core` (~17 tools).
220
+
221
+ Windows caveat (native Windows, not WSL): if `npx` isn't found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
169
222
 
170
- Windows caveat (native Windows, not WSL): if `npx` isn’t found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
223
+ **Alternative (JSON form):**
171
224
 
172
- Alternative (JSON form):
225
+ Core:
226
+ ```bash
227
+ claude mcp add-json contextstream \
228
+ '{"type":"stdio","command":"npx","args":["-y","@contextstream/mcp-server"],"env":{"CONTEXTSTREAM_API_URL":"https://api.contextstream.io","CONTEXTSTREAM_API_KEY":"your_api_key"}}'
229
+ ```
173
230
 
231
+ Full:
174
232
  ```bash
175
233
  claude mcp add-json contextstream \
176
- '{"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":"core"}}'
234
+ '{"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":"full"}}'
177
235
  ```
178
236
 
179
237
  ### Codex CLI (`~/.codex/config.toml`)
180
238
 
239
+ **Core toolset (default):**
240
+
241
+ ```toml
242
+ [mcp_servers.contextstream]
243
+ command = "npx"
244
+ args = ["-y", "@contextstream/mcp-server"]
245
+
246
+ [mcp_servers.contextstream.env]
247
+ CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
248
+ CONTEXTSTREAM_API_KEY = "your_api_key"
249
+ ```
250
+
251
+ **Full toolset (~86 tools):**
252
+
181
253
  ```toml
182
254
  [mcp_servers.contextstream]
183
255
  command = "npx"
@@ -186,6 +258,7 @@ args = ["-y", "@contextstream/mcp-server"]
186
258
  [mcp_servers.contextstream.env]
187
259
  CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
188
260
  CONTEXTSTREAM_API_KEY = "your_api_key"
261
+ CONTEXTSTREAM_TOOLSET = "full"
189
262
  ```
190
263
 
191
264
  After editing, restart your MCP client so it reloads the server configuration.
package/dist/index.js CHANGED
@@ -6923,6 +6923,80 @@ W:${wsHint}
6923
6923
  }
6924
6924
  return request(this.config, `/workspaces/${withDefaults.workspace_id}/integrations/status`, { method: "GET" });
6925
6925
  }
6926
+ /**
6927
+ * Get GitHub summary for a workspace
6928
+ */
6929
+ async githubSummary(params) {
6930
+ const withDefaults = this.withDefaults(params || {});
6931
+ if (!withDefaults.workspace_id) {
6932
+ throw new Error("workspace_id is required for GitHub summary");
6933
+ }
6934
+ const query = new URLSearchParams();
6935
+ if (params?.days) query.set("days", String(params.days));
6936
+ if (params?.repo) query.set("repo", params.repo);
6937
+ const suffix = query.toString() ? `?${query.toString()}` : "";
6938
+ return request(this.config, `/github/summary${suffix}`, { method: "GET" });
6939
+ }
6940
+ /**
6941
+ * Get Slack summary for a workspace
6942
+ */
6943
+ async slackSummary(params) {
6944
+ const withDefaults = this.withDefaults(params || {});
6945
+ if (!withDefaults.workspace_id) {
6946
+ throw new Error("workspace_id is required for Slack summary");
6947
+ }
6948
+ const query = new URLSearchParams();
6949
+ if (params?.days) query.set("days", String(params.days));
6950
+ if (params?.channel) query.set("channel", params.channel);
6951
+ const suffix = query.toString() ? `?${query.toString()}` : "";
6952
+ return request(this.config, `/slack/summary${suffix}`, { method: "GET" });
6953
+ }
6954
+ /**
6955
+ * Cross-source search across all integrations
6956
+ */
6957
+ async integrationsSearch(params) {
6958
+ const withDefaults = this.withDefaults(params || {});
6959
+ if (!withDefaults.workspace_id) {
6960
+ throw new Error("workspace_id is required for integrations search");
6961
+ }
6962
+ const urlParams = new URLSearchParams();
6963
+ urlParams.set("q", params.query);
6964
+ urlParams.set("workspace_id", withDefaults.workspace_id);
6965
+ if (params?.limit) urlParams.set("limit", String(params.limit));
6966
+ if (params?.sources) urlParams.set("sources", params.sources.join(","));
6967
+ if (params?.days) urlParams.set("days", String(params.days));
6968
+ if (params?.sort_by) urlParams.set("sort_by", params.sort_by);
6969
+ return request(this.config, `/integrations/search?${urlParams.toString()}`, { method: "GET" });
6970
+ }
6971
+ /**
6972
+ * Cross-source summary across all integrations
6973
+ */
6974
+ async integrationsSummary(params) {
6975
+ const withDefaults = this.withDefaults(params || {});
6976
+ if (!withDefaults.workspace_id) {
6977
+ throw new Error("workspace_id is required for integrations summary");
6978
+ }
6979
+ const query = new URLSearchParams();
6980
+ query.set("workspace_id", withDefaults.workspace_id);
6981
+ if (params?.days) query.set("days", String(params.days));
6982
+ return request(this.config, `/integrations/summary?${query.toString()}`, { method: "GET" });
6983
+ }
6984
+ /**
6985
+ * Cross-source knowledge from all integrations
6986
+ */
6987
+ async integrationsKnowledge(params) {
6988
+ const withDefaults = this.withDefaults(params || {});
6989
+ if (!withDefaults.workspace_id) {
6990
+ throw new Error("workspace_id is required for integrations knowledge");
6991
+ }
6992
+ const urlParams = new URLSearchParams();
6993
+ urlParams.set("workspace_id", withDefaults.workspace_id);
6994
+ if (params?.knowledge_type) urlParams.set("knowledge_type", params.knowledge_type);
6995
+ if (params?.query) urlParams.set("query", params.query);
6996
+ if (params?.sources) urlParams.set("sources", params.sources.join(","));
6997
+ if (params?.limit) urlParams.set("limit", String(params.limit));
6998
+ return request(this.config, `/integrations/knowledge?${urlParams.toString()}`, { method: "GET" });
6999
+ }
6926
7000
  };
6927
7001
 
6928
7002
  // src/tools.ts
@@ -7026,6 +7100,16 @@ var CONTEXTSTREAM_TOOL_NAMES = [
7026
7100
  "slack_discussions",
7027
7101
  "slack_search",
7028
7102
  "slack_sync_users",
7103
+ "slack_knowledge",
7104
+ "slack_summary",
7105
+ // GitHub additional
7106
+ "github_knowledge",
7107
+ "github_summary",
7108
+ // Cross-source integrations
7109
+ "integrations_status",
7110
+ "integrations_search",
7111
+ "integrations_summary",
7112
+ "integrations_knowledge",
7029
7113
  // Auth/Meta
7030
7114
  "auth_me",
7031
7115
  "mcp_server_version"
@@ -7194,7 +7278,18 @@ session_recall(query="what did we decide about caching?")
7194
7278
 
7195
7279
  ### Full Tool Catalog
7196
7280
 
7197
- The following tools are available when \`CONTEXTSTREAM_TOOLSET=full\` (default is \`core\`, which includes only the essential session/context tools above):
7281
+ To expose all tools below, set \`CONTEXTSTREAM_TOOLSET=full\` in your MCP config. The default (\`core\`) includes only the essential session/context tools above.
7282
+
7283
+ **To enable full toolset in your MCP config:**
7284
+ \`\`\`json
7285
+ {
7286
+ "env": {
7287
+ "CONTEXTSTREAM_TOOLSET": "full"
7288
+ }
7289
+ }
7290
+ \`\`\`
7291
+
7292
+ **Available tool categories (when \`CONTEXTSTREAM_TOOLSET=full\`):**
7198
7293
 
7199
7294
  **Session/Context** (included in core):
7200
7295
  \`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\`
@@ -7218,10 +7313,13 @@ The following tools are available when \`CONTEXTSTREAM_TOOLSET=full\` (default i
7218
7313
  \`ai_context\`, \`ai_enhanced_context\`, \`ai_context_budget\`, \`ai_embeddings\`, \`ai_plan\`, \`ai_tasks\`
7219
7314
 
7220
7315
  **GitHub Integration** (PRO):
7221
- \`github_stats\`, \`github_repos\`, \`github_contributors\`, \`github_activity\`, \`github_issues\`, \`github_search\`
7316
+ \`github_stats\`, \`github_repos\`, \`github_contributors\`, \`github_activity\`, \`github_issues\`, \`github_search\`, \`github_knowledge\`, \`github_summary\`
7222
7317
 
7223
7318
  **Slack Integration** (PRO):
7224
- \`slack_stats\`, \`slack_channels\`, \`slack_contributors\`, \`slack_activity\`, \`slack_discussions\`, \`slack_search\`, \`slack_sync_users\`
7319
+ \`slack_stats\`, \`slack_channels\`, \`slack_contributors\`, \`slack_activity\`, \`slack_discussions\`, \`slack_search\`, \`slack_sync_users\`, \`slack_knowledge\`, \`slack_summary\`
7320
+
7321
+ **Cross-Source Integrations** (PRO):
7322
+ \`integrations_status\`, \`integrations_search\`, \`integrations_summary\`, \`integrations_knowledge\`
7225
7323
 
7226
7324
  See full documentation: https://contextstream.io/docs/mcp/tools
7227
7325
  `.trim();
@@ -7235,7 +7333,20 @@ var CONTEXTSTREAM_RULES_MINIMAL = `
7235
7333
  - For code/file discovery, use \`session_smart_search\` before raw repo scans (\`rg\`, \`ls\`, \`find\`); fall back only if needed.
7236
7334
  - After meaningful work/decisions/preferences: \`session_capture(event_type=decision|preference|task|insight, title="\u2026", content="\u2026")\`.
7237
7335
  - On frustration/corrections/tool mistakes: \`session_capture_lesson(...)\`.
7238
- - Full tool catalog (workspaces, projects, search, memory, graph, AI, integrations): see https://contextstream.io/docs/mcp/tools
7336
+
7337
+ ### Tool Catalog
7338
+
7339
+ By default, the MCP server exposes **core** tools (~17 essential session/context tools). To expose the **full** catalog (~86 tools including workspaces, projects, search, memory, graph, AI, and integrations), set \`CONTEXTSTREAM_TOOLSET=full\` in your MCP config:
7340
+
7341
+ \`\`\`json
7342
+ {
7343
+ "env": {
7344
+ "CONTEXTSTREAM_TOOLSET": "full"
7345
+ }
7346
+ }
7347
+ \`\`\`
7348
+
7349
+ Full tool reference: https://contextstream.io/docs/mcp/tools
7239
7350
  `.trim();
7240
7351
  var TEMPLATES = {
7241
7352
  codex: {
@@ -7332,11 +7443,155 @@ ${options.workspaceId ? `# Workspace ID: ${options.workspaceId}` : ""}
7332
7443
  };
7333
7444
  }
7334
7445
 
7446
+ // src/tool-catalog.ts
7447
+ var TOOL_CATALOG = [
7448
+ {
7449
+ name: "Session",
7450
+ tools: [
7451
+ { name: "init", hint: "start-conv" },
7452
+ { name: "smart", hint: "each-msg" },
7453
+ { name: "capture", hint: "save" },
7454
+ { name: "recall", hint: "find" },
7455
+ { name: "remember", hint: "quick" },
7456
+ { name: "compress", hint: "end" },
7457
+ { name: "summary", hint: "brief" },
7458
+ { name: "delta", hint: "changes" },
7459
+ { name: "get_lessons", hint: "learn" },
7460
+ { name: "capture_lesson", hint: "mistake" },
7461
+ { name: "get_user_context", hint: "prefs" },
7462
+ { name: "smart_search", hint: "deep-find" }
7463
+ ]
7464
+ },
7465
+ {
7466
+ name: "Search",
7467
+ tools: [
7468
+ { name: "semantic", hint: "meaning" },
7469
+ { name: "hybrid", hint: "combo" },
7470
+ { name: "keyword", hint: "exact" },
7471
+ { name: "pattern", hint: "code" }
7472
+ ]
7473
+ },
7474
+ {
7475
+ name: "Memory",
7476
+ tools: [
7477
+ { name: "create_event", hint: "new" },
7478
+ { name: "list_events", hint: "list" },
7479
+ { name: "get_event", hint: "get" },
7480
+ { name: "update_event", hint: "edit" },
7481
+ { name: "delete_event", hint: "rm" },
7482
+ { name: "search", hint: "find" },
7483
+ { name: "decisions", hint: "choices" },
7484
+ { name: "timeline", hint: "history" },
7485
+ { name: "distill_event", hint: "extract" }
7486
+ ]
7487
+ },
7488
+ {
7489
+ name: "Knowledge",
7490
+ tools: [
7491
+ { name: "create_node", hint: "new" },
7492
+ { name: "list_nodes", hint: "list" },
7493
+ { name: "get_node", hint: "get" },
7494
+ { name: "update_node", hint: "edit" },
7495
+ { name: "delete_node", hint: "rm" },
7496
+ { name: "supersede_node", hint: "replace" }
7497
+ ]
7498
+ },
7499
+ {
7500
+ name: "Graph",
7501
+ tools: [
7502
+ { name: "related", hint: "links" },
7503
+ { name: "path", hint: "trace" },
7504
+ { name: "decisions", hint: "choices" },
7505
+ { name: "dependencies", hint: "deps" },
7506
+ { name: "impact", hint: "changes" },
7507
+ { name: "contradictions", hint: "conflicts" }
7508
+ ]
7509
+ },
7510
+ {
7511
+ name: "Workspace",
7512
+ tools: [
7513
+ { name: "list", hint: "" },
7514
+ { name: "get", hint: "" },
7515
+ { name: "create", hint: "" },
7516
+ { name: "associate", hint: "link-folder" },
7517
+ { name: "bootstrap", hint: "new-ws" }
7518
+ ]
7519
+ },
7520
+ {
7521
+ name: "Project",
7522
+ tools: [
7523
+ { name: "list", hint: "" },
7524
+ { name: "get", hint: "" },
7525
+ { name: "create", hint: "" },
7526
+ { name: "index", hint: "scan-code" },
7527
+ { name: "files", hint: "list-files" },
7528
+ { name: "overview", hint: "summary" }
7529
+ ]
7530
+ },
7531
+ {
7532
+ name: "AI",
7533
+ tools: [
7534
+ { name: "context", hint: "smart-ctx" },
7535
+ { name: "plan", hint: "generate" },
7536
+ { name: "tasks", hint: "breakdown" },
7537
+ { name: "embeddings", hint: "vectors" }
7538
+ ]
7539
+ }
7540
+ ];
7541
+ function generateToolCatalog(format = "grouped", category) {
7542
+ let categories = TOOL_CATALOG;
7543
+ if (category) {
7544
+ const filtered = TOOL_CATALOG.filter(
7545
+ (c) => c.name.toLowerCase() === category.toLowerCase()
7546
+ );
7547
+ if (filtered.length > 0) {
7548
+ categories = filtered;
7549
+ }
7550
+ }
7551
+ switch (format) {
7552
+ case "minimal":
7553
+ return generateMinimal(categories);
7554
+ case "full":
7555
+ return generateFull(categories);
7556
+ case "grouped":
7557
+ default:
7558
+ return generateGrouped(categories);
7559
+ }
7560
+ }
7561
+ function generateGrouped(categories) {
7562
+ return categories.map((cat) => {
7563
+ const tools = cat.tools.map((t) => t.hint ? `${t.name}(${t.hint})` : t.name).join(" ");
7564
+ return `${cat.name}: ${tools}`;
7565
+ }).join("\n");
7566
+ }
7567
+ function generateMinimal(categories) {
7568
+ return categories.map((cat) => {
7569
+ const tools = cat.tools.map((t) => t.name).join("|");
7570
+ return `${cat.name}:${tools}`;
7571
+ }).join("\n");
7572
+ }
7573
+ function generateFull(categories) {
7574
+ const lines = [];
7575
+ for (const cat of categories) {
7576
+ lines.push(`## ${cat.name}`);
7577
+ for (const tool of cat.tools) {
7578
+ const prefix = cat.name.toLowerCase().replace(/\s+/g, "_");
7579
+ const fullName = `${prefix}_${tool.name}`;
7580
+ lines.push(`- ${fullName}: ${tool.hint || "standard CRUD"}`);
7581
+ }
7582
+ }
7583
+ return lines.join("\n");
7584
+ }
7585
+ function getCoreToolsHint() {
7586
+ return `Session: init(start) smart(each-msg) capture(save) recall(find) remember(quick)`;
7587
+ }
7588
+
7335
7589
  // src/tools.ts
7336
7590
  var LESSON_DEDUP_WINDOW_MS = 2 * 60 * 1e3;
7337
7591
  var recentLessonCaptures = /* @__PURE__ */ new Map();
7338
7592
  var CORE_TOOLSET = /* @__PURE__ */ new Set([
7339
7593
  "session_init",
7594
+ "session_tools",
7340
7595
  "context_smart",
7341
7596
  "session_summary",
7342
7597
  "session_capture",
@@ -8577,6 +8832,7 @@ This does semantic search on the first message. You only need context_smart on s
8577
8832
  ideRoots = [input.folder_path];
8578
8833
  }
8579
8834
  const result = await client.initSession(input, ideRoots);
8835
+ result.tools_hint = getCoreToolsHint();
8580
8836
  if (sessionManager) {
8581
8837
  sessionManager.markInitialized(result);
8582
8838
  }
@@ -8632,6 +8888,38 @@ This does semantic search on the first message. You only need context_smart on s
8632
8888
  return { content: [{ type: "text", text }], structuredContent: toStructured(result) };
8633
8889
  }
8634
8890
  );
8891
+ registerTool(
8892
+ "session_tools",
8893
+ {
8894
+ title: "Get available ContextStream tools",
8895
+ description: `Get an ultra-compact list of all available ContextStream MCP tools.
8896
+ Use this when you need to know what tools are available without reading full descriptions.
8897
+
8898
+ Returns a token-efficient tool catalog (~120 tokens) organized by category.
8899
+
8900
+ Format options:
8901
+ - 'grouped' (default): Category: tool(hint) tool(hint) - best for quick reference
8902
+ - 'minimal': Category:tool|tool|tool - most compact
8903
+ - 'full': Detailed list with descriptions
8904
+
8905
+ Example output (grouped):
8906
+ Session: init(start-conv) smart(each-msg) capture(save) recall(find) remember(quick)
8907
+ Search: semantic(meaning) hybrid(combo) keyword(exact)
8908
+ Memory: events(crud) nodes(knowledge) search(find) decisions(choices)`,
8909
+ inputSchema: external_exports.object({
8910
+ format: external_exports.enum(["grouped", "minimal", "full"]).optional().default("grouped").describe("Output format: grouped (default, ~120 tokens), minimal (~80 tokens), or full (~200 tokens)"),
8911
+ category: external_exports.string().optional().describe("Filter to specific category: Session, Search, Memory, Knowledge, Graph, Workspace, Project, AI")
8912
+ })
8913
+ },
8914
+ async (input) => {
8915
+ const format = input.format || "grouped";
8916
+ const catalog = generateToolCatalog(format, input.category);
8917
+ return {
8918
+ content: [{ type: "text", text: catalog }],
8919
+ structuredContent: { format, catalog }
8920
+ };
8921
+ }
8922
+ );
8635
8923
  registerTool(
8636
8924
  "session_get_user_context",
8637
8925
  {
@@ -9884,6 +10172,169 @@ Example queries:
9884
10172
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
9885
10173
  }
9886
10174
  );
10175
+ registerTool(
10176
+ "github_summary",
10177
+ {
10178
+ title: "GitHub activity summary",
10179
+ description: `Get a high-level summary of GitHub activity for a workspace.
10180
+ Returns: overview of issues, PRs, commits, releases, and highlights for the specified period.
10181
+ Use this for weekly/monthly reports or to get a quick overview of repository activity.
10182
+
10183
+ Example prompts:
10184
+ - "Give me a weekly GitHub summary"
10185
+ - "What happened in GitHub last month?"
10186
+ - "Show me the GitHub summary for repo X"`,
10187
+ inputSchema: external_exports.object({
10188
+ workspace_id: external_exports.string().uuid().optional(),
10189
+ days: external_exports.number().optional().describe("Number of days to summarize (default: 7)"),
10190
+ repo: external_exports.string().optional().describe("Filter by repository name")
10191
+ })
10192
+ },
10193
+ async (input) => {
10194
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10195
+ if (!workspaceId) {
10196
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10197
+ }
10198
+ const result = await client.githubSummary({
10199
+ workspace_id: workspaceId,
10200
+ days: input.days,
10201
+ repo: input.repo
10202
+ });
10203
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10204
+ }
10205
+ );
10206
+ registerTool(
10207
+ "slack_summary",
10208
+ {
10209
+ title: "Slack activity summary",
10210
+ description: `Get a high-level summary of Slack activity for a workspace.
10211
+ Returns: overview of messages, threads, top channels, and highlights for the specified period.
10212
+ Use this for weekly/monthly reports or to get a quick overview of team discussions.
10213
+
10214
+ Example prompts:
10215
+ - "Give me a weekly Slack summary"
10216
+ - "What was discussed in Slack last month?"
10217
+ - "Show me the Slack summary for #engineering"`,
10218
+ inputSchema: external_exports.object({
10219
+ workspace_id: external_exports.string().uuid().optional(),
10220
+ days: external_exports.number().optional().describe("Number of days to summarize (default: 7)"),
10221
+ channel: external_exports.string().optional().describe("Filter by channel name")
10222
+ })
10223
+ },
10224
+ async (input) => {
10225
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10226
+ if (!workspaceId) {
10227
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10228
+ }
10229
+ const result = await client.slackSummary({
10230
+ workspace_id: workspaceId,
10231
+ days: input.days,
10232
+ channel: input.channel
10233
+ });
10234
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10235
+ }
10236
+ );
10237
+ registerTool(
10238
+ "integrations_search",
10239
+ {
10240
+ title: "Cross-source search",
10241
+ description: `Search across all connected integrations (GitHub, Slack, etc.) with a single query.
10242
+ Returns: unified results from all sources, ranked by relevance or recency.
10243
+ Use this to find related discussions, issues, and content across all your tools.
10244
+
10245
+ Example prompts:
10246
+ - "Search all integrations for database migration discussions"
10247
+ - "Find mentions of authentication across GitHub and Slack"
10248
+ - "Search for API changes in the last 30 days"`,
10249
+ inputSchema: external_exports.object({
10250
+ workspace_id: external_exports.string().uuid().optional(),
10251
+ query: external_exports.string().describe("Search query"),
10252
+ limit: external_exports.number().optional().describe("Maximum results (default: 20)"),
10253
+ sources: external_exports.array(external_exports.string()).optional().describe("Filter by source: github, slack"),
10254
+ days: external_exports.number().optional().describe("Filter to results within N days"),
10255
+ sort_by: external_exports.enum(["relevance", "recent", "engagement"]).optional().describe("Sort by: relevance, recent, or engagement")
10256
+ })
10257
+ },
10258
+ async (input) => {
10259
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10260
+ if (!workspaceId) {
10261
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10262
+ }
10263
+ const result = await client.integrationsSearch({
10264
+ workspace_id: workspaceId,
10265
+ query: input.query,
10266
+ limit: input.limit,
10267
+ sources: input.sources,
10268
+ days: input.days,
10269
+ sort_by: input.sort_by
10270
+ });
10271
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10272
+ }
10273
+ );
10274
+ registerTool(
10275
+ "integrations_summary",
10276
+ {
10277
+ title: "Cross-source activity summary",
10278
+ description: `Get a unified summary of activity across all connected integrations.
10279
+ Returns: combined overview of GitHub and Slack activity, key highlights, and trends.
10280
+ Use this for weekly team summaries or to understand overall activity across all tools.
10281
+
10282
+ Example prompts:
10283
+ - "Give me a weekly team summary across all sources"
10284
+ - "What happened across GitHub and Slack last week?"
10285
+ - "Show me a unified activity overview"`,
10286
+ inputSchema: external_exports.object({
10287
+ workspace_id: external_exports.string().uuid().optional(),
10288
+ days: external_exports.number().optional().describe("Number of days to summarize (default: 7)")
10289
+ })
10290
+ },
10291
+ async (input) => {
10292
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10293
+ if (!workspaceId) {
10294
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10295
+ }
10296
+ const result = await client.integrationsSummary({
10297
+ workspace_id: workspaceId,
10298
+ days: input.days
10299
+ });
10300
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10301
+ }
10302
+ );
10303
+ registerTool(
10304
+ "integrations_knowledge",
10305
+ {
10306
+ title: "Cross-source knowledge",
10307
+ description: `Get knowledge extracted from all connected integrations (GitHub, Slack, etc.).
10308
+ Returns: decisions, lessons, and insights distilled from all sources.
10309
+ Use this to find key decisions and learnings from across your team's conversations.
10310
+
10311
+ Example prompts:
10312
+ - "What decisions were made across all sources about authentication?"
10313
+ - "Show me lessons learned from all integrations"
10314
+ - "What insights have we gathered from GitHub and Slack?"`,
10315
+ inputSchema: external_exports.object({
10316
+ workspace_id: external_exports.string().uuid().optional(),
10317
+ knowledge_type: external_exports.enum(["decision", "lesson", "fact", "insight"]).optional().describe("Filter by knowledge type"),
10318
+ query: external_exports.string().optional().describe("Optional search query to filter knowledge"),
10319
+ sources: external_exports.array(external_exports.string()).optional().describe("Filter by source: github, slack"),
10320
+ limit: external_exports.number().optional().describe("Maximum items to return (default: 20)")
10321
+ })
10322
+ },
10323
+ async (input) => {
10324
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10325
+ if (!workspaceId) {
10326
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10327
+ }
10328
+ const result = await client.integrationsKnowledge({
10329
+ workspace_id: workspaceId,
10330
+ knowledge_type: input.knowledge_type,
10331
+ query: input.query,
10332
+ sources: input.sources,
10333
+ limit: input.limit
10334
+ });
10335
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10336
+ }
10337
+ );
9887
10338
  registerTool(
9888
10339
  "integrations_status",
9889
10340
  {
@@ -10501,6 +10952,8 @@ async function upsertCodexTomlConfig(filePath, params) {
10501
10952
  const existing = exists ? await fs5.readFile(filePath, "utf8").catch(() => "") : "";
10502
10953
  const marker = "[mcp_servers.contextstream]";
10503
10954
  const envMarker = "[mcp_servers.contextstream.env]";
10955
+ const toolsetLine = params.toolset ? `CONTEXTSTREAM_TOOLSET = "${params.toolset}"
10956
+ ` : "";
10504
10957
  const block = `
10505
10958
 
10506
10959
  # ContextStream MCP server
@@ -10511,7 +10964,7 @@ args = ["-y", "@contextstream/mcp-server"]
10511
10964
  [mcp_servers.contextstream.env]
10512
10965
  CONTEXTSTREAM_API_URL = "${params.apiUrl}"
10513
10966
  CONTEXTSTREAM_API_KEY = "${params.apiKey}"
10514
- `;
10967
+ ` + toolsetLine;
10515
10968
  if (!exists) {
10516
10969
  await fs5.writeFile(filePath, block.trimStart(), "utf8");
10517
10970
  return "created";
@@ -10782,8 +11235,13 @@ Created API key: ${maskApiKey(apiKey)}
10782
11235
  const mode = modeChoice === "2" ? "full" : "minimal";
10783
11236
  console.log("\nMCP toolset (which tools to expose to the AI):");
10784
11237
  console.log(" 1) Core (recommended) \u2014 essential session/context tools (~17 tools, lower token overhead)");
11238
+ console.log(" Best for: most users, Claude Code, Claude Desktop (avoids large-context warnings)");
10785
11239
  console.log(" 2) Full \u2014 all tools including workspaces, projects, search, memory, graph, AI, integrations (~86 tools)");
11240
+ console.log(" Best for: power users needing direct access to all workspace/project/graph/AI tools");
10786
11241
  console.log(" Note: Claude Code/Desktop may warn about large tool lists when using full toolset.");
11242
+ console.log("");
11243
+ console.log(" Tip: You can switch toolsets later by editing the MCP config and setting CONTEXTSTREAM_TOOLSET=full");
11244
+ console.log(" See https://contextstream.io/docs/mcp/tools for the full tool catalog.");
10787
11245
  const toolsetChoice = normalizeInput(await rl.question("Choose [1/2] (default 1): ")) || "1";
10788
11246
  const toolset = toolsetChoice === "2" ? "full" : "core";
10789
11247
  const editors = ["codex", "claude", "cursor", "windsurf", "cline", "kilo", "roo", "aider"];
@@ -10832,7 +11290,8 @@ Created API key: ${maskApiKey(apiKey)}
10832
11290
  console.log(`- ${EDITOR_LABELS[editor]}: would update ${filePath}`);
10833
11291
  continue;
10834
11292
  }
10835
- const status = await upsertCodexTomlConfig(filePath, { apiUrl, apiKey });
11293
+ const codexParams = toolset === "full" ? { apiUrl, apiKey, toolset: "full" } : { apiUrl, apiKey };
11294
+ const status = await upsertCodexTomlConfig(filePath, codexParams);
10836
11295
  writeActions.push({ kind: "mcp-config", target: filePath, status });
10837
11296
  console.log(`- ${EDITOR_LABELS[editor]}: ${status} ${filePath}`);
10838
11297
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextstream/mcp-server",
3
- "version": "0.3.41",
3
+ "version": "0.3.43",
4
4
  "description": "MCP server exposing ContextStream public API - code context, memory, search, and AI tools for developers",
5
5
  "type": "module",
6
6
  "license": "MIT",