@contextstream/mcp-server 0.3.40 → 0.3.42

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 +86 -10
  2. package/dist/index.js +545 -7
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -48,9 +48,10 @@ npx -y @contextstream/mcp-server setup
48
48
 
49
49
  Notes:
50
50
  - Uses browser/device login by default and creates an API key for you.
51
+ - Prompts for **toolset selection**: `core` (default, ~17 essential tools) or `full` (~86 tools including workspaces, projects, search, memory, graph, AI, and integrations).
51
52
  - 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.
52
53
  - Codex CLI MCP config is global-only (`~/.codex/config.toml`), so the wizard will always write Codex config globally when selected.
53
- - Some tools still require UI/CLI-based MCP setup (the wizard will tell you when it cant write a config).
54
+ - Some tools still require UI/CLI-based MCP setup (the wizard will tell you when it can't write a config).
54
55
  - Preview changes without writing files: `npx -y @contextstream/mcp-server setup --dry-run`
55
56
 
56
57
  ### Run the server
@@ -74,7 +75,9 @@ contextstream-mcp
74
75
 
75
76
  If you ran the [setup wizard](#setup-wizard-recommended), you can usually skip this section.
76
77
 
77
- If you prefer to configure things by hand (or your tool cant be auto-configured), add the ContextStream MCP server to your client using one of the examples below.
78
+ 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.
79
+
80
+ **Toolset**: By default, the server exposes `core` tools (~17 essential session/context tools). To expose all ~86 tools (workspaces, projects, search, memory, graph, AI, integrations), add `"CONTEXTSTREAM_TOOLSET": "full"` to the `env` block. See the [full tool catalog](https://contextstream.io/docs/mcp/tools).
78
81
 
79
82
  ### Cursor / Windsurf / Claude Desktop (JSON)
80
83
 
@@ -88,6 +91,8 @@ These clients use the `mcpServers` JSON schema:
88
91
 
89
92
  Many other MCP JSON clients also use this same `mcpServers` shape (including Claude Code project scope via `.mcp.json`).
90
93
 
94
+ **Core toolset (default, ~17 tools):**
95
+
91
96
  ```json
92
97
  {
93
98
  "mcpServers": {
@@ -103,10 +108,30 @@ Many other MCP JSON clients also use this same `mcpServers` shape (including Cla
103
108
  }
104
109
  ```
105
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
+
106
129
  ### VS Code (`.vscode/mcp.json`)
107
130
 
108
131
  VS Code uses a different schema with a top-level `servers` map:
109
132
 
133
+ **Core toolset (default):**
134
+
110
135
  ```json
111
136
  {
112
137
  "servers": {
@@ -123,6 +148,25 @@ VS Code uses a different schema with a top-level `servers` map:
123
148
  }
124
149
  ```
125
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
+
126
170
  Strong recommendation: VS Code supports `inputs` so you don’t have to hardcode secrets in a committed file:
127
171
 
128
172
  ```json
@@ -153,28 +197,59 @@ Strong recommendation: VS Code supports `inputs` so you don’t have to hardcode
153
197
 
154
198
  User scope (all projects):
155
199
 
200
+ **Core toolset (recommended for Claude Code):**
201
+
156
202
  ```bash
157
203
  claude mcp add --transport stdio contextstream --scope user \
158
204
  --env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
159
205
  --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
160
- --env CONTEXTSTREAM_TOOLSET=core -- \
161
- npx -y @contextstream/mcp-server
206
+ -- npx -y @contextstream/mcp-server
162
207
  ```
163
208
 
164
- Tip: Claude Code warns on large tool contexts. The default toolset is `core`.
165
- Set `CONTEXTSTREAM_TOOLSET=full` to expose everything.
209
+ **Full toolset (~86 tools):**
166
210
 
167
- Windows caveat (native Windows, not WSL): if `npx` isn’t found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
211
+ ```bash
212
+ claude mcp add --transport stdio contextstream --scope user \
213
+ --env CONTEXTSTREAM_API_URL=https://api.contextstream.io \
214
+ --env CONTEXTSTREAM_API_KEY=YOUR_KEY \
215
+ --env CONTEXTSTREAM_TOOLSET=full \
216
+ -- npx -y @contextstream/mcp-server
217
+ ```
218
+
219
+ Note: Claude Code may warn about large tool contexts when using `full`. The default is `core` (~17 tools).
168
220
 
169
- Alternative (JSON form):
221
+ Windows caveat (native Windows, not WSL): if `npx` isn't found, use `cmd /c npx -y @contextstream/mcp-server` after `--`.
170
222
 
223
+ **Alternative (JSON form):**
224
+
225
+ Core:
171
226
  ```bash
172
227
  claude mcp add-json contextstream \
173
- '{"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"}}'
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
+ ```
230
+
231
+ Full:
232
+ ```bash
233
+ claude mcp add-json contextstream \
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"}}'
174
235
  ```
175
236
 
176
237
  ### Codex CLI (`~/.codex/config.toml`)
177
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
+
178
253
  ```toml
179
254
  [mcp_servers.contextstream]
180
255
  command = "npx"
@@ -183,6 +258,7 @@ args = ["-y", "@contextstream/mcp-server"]
183
258
  [mcp_servers.contextstream.env]
184
259
  CONTEXTSTREAM_API_URL = "https://api.contextstream.io"
185
260
  CONTEXTSTREAM_API_KEY = "your_api_key"
261
+ CONTEXTSTREAM_TOOLSET = "full"
186
262
  ```
187
263
 
188
264
  After editing, restart your MCP client so it reloads the server configuration.
@@ -204,7 +280,7 @@ You can authenticate using either:
204
280
  | `CONTEXTSTREAM_WORKSPACE_ID` | No | Default workspace ID fallback |
205
281
  | `CONTEXTSTREAM_PROJECT_ID` | No | Default project ID fallback |
206
282
  | `CONTEXTSTREAM_USER_AGENT` | No | Custom user agent string |
207
- | `CONTEXTSTREAM_TOOLSET` | No | Tool bundle to expose (`core` default, or `full`) |
283
+ | `CONTEXTSTREAM_TOOLSET` | No | Tool bundle to expose: `core` (default, ~17 tools) or `full` (~86 tools). Claude Code/Desktop may warn about large tool contexts with `full`. |
208
284
  | `CONTEXTSTREAM_TOOL_ALLOWLIST` | No | Comma-separated tool names to expose (overrides toolset) |
209
285
  | `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`) |
210
286
  | `CONTEXTSTREAM_UPGRADE_URL` | No | Upgrade link shown when Free users call PRO tools (default: `https://contextstream.io/pricing`) |
package/dist/index.js CHANGED
@@ -6885,6 +6885,118 @@ W:${wsHint}
6885
6885
  if (params?.limit) query.set("limit", String(params.limit));
6886
6886
  return request(this.config, `/workspaces/${withDefaults.workspace_id}/github/search?${query.toString()}`, { method: "GET" });
6887
6887
  }
6888
+ /**
6889
+ * Get knowledge extracted from GitHub (decisions, lessons, insights)
6890
+ */
6891
+ async githubKnowledge(params) {
6892
+ const withDefaults = this.withDefaults(params || {});
6893
+ if (!withDefaults.workspace_id) {
6894
+ throw new Error("workspace_id is required for GitHub knowledge");
6895
+ }
6896
+ const query = new URLSearchParams();
6897
+ if (params?.limit) query.set("limit", String(params.limit));
6898
+ if (params?.node_type) query.set("node_type", params.node_type);
6899
+ const suffix = query.toString() ? `?${query.toString()}` : "";
6900
+ return request(this.config, `/workspaces/${withDefaults.workspace_id}/github/knowledge${suffix}`, { method: "GET" });
6901
+ }
6902
+ /**
6903
+ * Get knowledge extracted from Slack (decisions, lessons, insights)
6904
+ */
6905
+ async slackKnowledge(params) {
6906
+ const withDefaults = this.withDefaults(params || {});
6907
+ if (!withDefaults.workspace_id) {
6908
+ throw new Error("workspace_id is required for Slack knowledge");
6909
+ }
6910
+ const query = new URLSearchParams();
6911
+ if (params?.limit) query.set("limit", String(params.limit));
6912
+ if (params?.node_type) query.set("node_type", params.node_type);
6913
+ const suffix = query.toString() ? `?${query.toString()}` : "";
6914
+ return request(this.config, `/workspaces/${withDefaults.workspace_id}/slack/knowledge${suffix}`, { method: "GET" });
6915
+ }
6916
+ /**
6917
+ * Get integration status for all providers in a workspace
6918
+ */
6919
+ async integrationsStatus(params) {
6920
+ const withDefaults = this.withDefaults(params || {});
6921
+ if (!withDefaults.workspace_id) {
6922
+ throw new Error("workspace_id is required for integrations status");
6923
+ }
6924
+ return request(this.config, `/workspaces/${withDefaults.workspace_id}/integrations/status`, { method: "GET" });
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
+ }
6888
7000
  };
6889
7001
 
6890
7002
  // src/tools.ts
@@ -6894,6 +7006,7 @@ import * as path4 from "node:path";
6894
7006
  // src/rules-templates.ts
6895
7007
  var DEFAULT_CLAUDE_MCP_SERVER_NAME = "contextstream";
6896
7008
  var CONTEXTSTREAM_TOOL_NAMES = [
7009
+ // Session/Context (core)
6897
7010
  "session_init",
6898
7011
  "context_smart",
6899
7012
  "session_summary",
@@ -6906,9 +7019,100 @@ var CONTEXTSTREAM_TOOL_NAMES = [
6906
7019
  "session_smart_search",
6907
7020
  "session_compress",
6908
7021
  "session_delta",
7022
+ // Editor Rules
6909
7023
  "generate_editor_rules",
7024
+ // Workspaces
6910
7025
  "workspace_associate",
6911
- "workspace_bootstrap"
7026
+ "workspace_bootstrap",
7027
+ "workspaces_list",
7028
+ "workspaces_create",
7029
+ "workspaces_update",
7030
+ "workspaces_delete",
7031
+ "workspaces_get",
7032
+ "workspaces_overview",
7033
+ "workspaces_analytics",
7034
+ "workspaces_content",
7035
+ // Projects
7036
+ "projects_list",
7037
+ "projects_create",
7038
+ "projects_update",
7039
+ "projects_delete",
7040
+ "projects_get",
7041
+ "projects_overview",
7042
+ "projects_statistics",
7043
+ "projects_files",
7044
+ "projects_index",
7045
+ "projects_index_status",
7046
+ "projects_ingest_local",
7047
+ // Search
7048
+ "search_semantic",
7049
+ "search_hybrid",
7050
+ "search_keyword",
7051
+ "search_pattern",
7052
+ "search_suggestions",
7053
+ // Memory
7054
+ "memory_create_event",
7055
+ "memory_bulk_ingest",
7056
+ "memory_list_events",
7057
+ "memory_create_node",
7058
+ "memory_list_nodes",
7059
+ "memory_search",
7060
+ "memory_decisions",
7061
+ "memory_get_event",
7062
+ "memory_update_event",
7063
+ "memory_delete_event",
7064
+ "memory_distill_event",
7065
+ "memory_get_node",
7066
+ "memory_update_node",
7067
+ "memory_delete_node",
7068
+ "memory_supersede_node",
7069
+ "memory_timeline",
7070
+ "memory_summary",
7071
+ // Graph
7072
+ "graph_related",
7073
+ "graph_path",
7074
+ "graph_decisions",
7075
+ "graph_dependencies",
7076
+ "graph_call_path",
7077
+ "graph_impact",
7078
+ "graph_circular_dependencies",
7079
+ "graph_unused_code",
7080
+ "graph_contradictions",
7081
+ // AI (PRO)
7082
+ "ai_context",
7083
+ "ai_enhanced_context",
7084
+ "ai_context_budget",
7085
+ "ai_embeddings",
7086
+ "ai_plan",
7087
+ "ai_tasks",
7088
+ // GitHub Integration (PRO)
7089
+ "github_stats",
7090
+ "github_repos",
7091
+ "github_contributors",
7092
+ "github_activity",
7093
+ "github_issues",
7094
+ "github_search",
7095
+ // Slack Integration (PRO)
7096
+ "slack_stats",
7097
+ "slack_channels",
7098
+ "slack_contributors",
7099
+ "slack_activity",
7100
+ "slack_discussions",
7101
+ "slack_search",
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",
7113
+ // Auth/Meta
7114
+ "auth_me",
7115
+ "mcp_server_version"
6912
7116
  ];
6913
7117
  function applyMcpToolPrefix(markdown, toolPrefix) {
6914
7118
  const toolPattern = CONTEXTSTREAM_TOOL_NAMES.join("|");
@@ -7069,6 +7273,55 @@ session_capture(event_type="decision", title="Auth Implementation Complete", con
7069
7273
  # Check past decisions
7070
7274
  session_recall(query="what did we decide about caching?")
7071
7275
  \`\`\`
7276
+
7277
+ ---
7278
+
7279
+ ### Full Tool Catalog
7280
+
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\`):**
7293
+
7294
+ **Session/Context** (included in core):
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\`
7296
+
7297
+ **Workspaces**:
7298
+ \`workspaces_list\`, \`workspaces_create\`, \`workspaces_update\`, \`workspaces_delete\`, \`workspaces_get\`, \`workspaces_overview\`, \`workspaces_analytics\`, \`workspaces_content\`
7299
+
7300
+ **Projects**:
7301
+ \`projects_list\`, \`projects_create\`, \`projects_update\`, \`projects_delete\`, \`projects_get\`, \`projects_overview\`, \`projects_statistics\`, \`projects_files\`, \`projects_index\`, \`projects_index_status\`, \`projects_ingest_local\`
7302
+
7303
+ **Search**:
7304
+ \`search_semantic\`, \`search_hybrid\`, \`search_keyword\`, \`search_pattern\`, \`search_suggestions\`
7305
+
7306
+ **Memory**:
7307
+ \`memory_create_event\`, \`memory_bulk_ingest\`, \`memory_list_events\`, \`memory_create_node\`, \`memory_list_nodes\`, \`memory_search\`, \`memory_decisions\`, \`memory_get_event\`, \`memory_update_event\`, \`memory_delete_event\`, \`memory_distill_event\`, \`memory_get_node\`, \`memory_update_node\`, \`memory_delete_node\`, \`memory_supersede_node\`, \`memory_timeline\`, \`memory_summary\`
7308
+
7309
+ **Graph** (code analysis):
7310
+ \`graph_related\`, \`graph_path\`, \`graph_decisions\`, \`graph_dependencies\`, \`graph_call_path\`, \`graph_impact\`, \`graph_circular_dependencies\`, \`graph_unused_code\`, \`graph_contradictions\`
7311
+
7312
+ **AI** (PRO):
7313
+ \`ai_context\`, \`ai_enhanced_context\`, \`ai_context_budget\`, \`ai_embeddings\`, \`ai_plan\`, \`ai_tasks\`
7314
+
7315
+ **GitHub Integration** (PRO):
7316
+ \`github_stats\`, \`github_repos\`, \`github_contributors\`, \`github_activity\`, \`github_issues\`, \`github_search\`, \`github_knowledge\`, \`github_summary\`
7317
+
7318
+ **Slack Integration** (PRO):
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\`
7323
+
7324
+ See full documentation: https://contextstream.io/docs/mcp/tools
7072
7325
  `.trim();
7073
7326
  var CONTEXTSTREAM_RULES_MINIMAL = `
7074
7327
  ## ContextStream (Minimal)
@@ -7080,6 +7333,20 @@ var CONTEXTSTREAM_RULES_MINIMAL = `
7080
7333
  - For code/file discovery, use \`session_smart_search\` before raw repo scans (\`rg\`, \`ls\`, \`find\`); fall back only if needed.
7081
7334
  - After meaningful work/decisions/preferences: \`session_capture(event_type=decision|preference|task|insight, title="\u2026", content="\u2026")\`.
7082
7335
  - On frustration/corrections/tool mistakes: \`session_capture_lesson(...)\`.
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
7083
7350
  `.trim();
7084
7351
  var TEMPLATES = {
7085
7352
  codex: {
@@ -9668,6 +9935,258 @@ Use this to find specific issues, PRs, or discussions.`,
9668
9935
  return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
9669
9936
  }
9670
9937
  );
9938
+ registerTool(
9939
+ "github_knowledge",
9940
+ {
9941
+ title: "GitHub extracted knowledge",
9942
+ description: `Get knowledge extracted from GitHub issues and PRs.
9943
+ Returns: decisions, lessons, and insights automatically distilled from GitHub conversations.
9944
+ This surfaces key decisions and learnings from your repository discussions.
9945
+
9946
+ Example queries:
9947
+ - "What decisions were made about authentication?"
9948
+ - "What lessons learned from production incidents?"
9949
+ - "Show recent architectural decisions"`,
9950
+ inputSchema: external_exports.object({
9951
+ workspace_id: external_exports.string().uuid().optional(),
9952
+ limit: external_exports.number().optional().describe("Maximum items to return (default: 20)"),
9953
+ node_type: external_exports.enum(["decision", "lesson", "fact", "insight"]).optional().describe("Filter by knowledge type")
9954
+ })
9955
+ },
9956
+ async (input) => {
9957
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
9958
+ if (!workspaceId) {
9959
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
9960
+ }
9961
+ const result = await client.githubKnowledge({ workspace_id: workspaceId, limit: input.limit, node_type: input.node_type });
9962
+ if (result.length === 0) {
9963
+ return { content: [{ type: "text", text: "No knowledge extracted from GitHub yet. Knowledge is distilled from issues/PRs after sync." }] };
9964
+ }
9965
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
9966
+ }
9967
+ );
9968
+ registerTool(
9969
+ "slack_knowledge",
9970
+ {
9971
+ title: "Slack extracted knowledge",
9972
+ description: `Get knowledge extracted from Slack conversations.
9973
+ Returns: decisions, lessons, and insights automatically distilled from Slack discussions.
9974
+ This surfaces key decisions and learnings from your team conversations.
9975
+
9976
+ Example queries:
9977
+ - "What decisions were made in #engineering this week?"
9978
+ - "Show lessons learned from outages"
9979
+ - "What architectural insights came from Slack?"`,
9980
+ inputSchema: external_exports.object({
9981
+ workspace_id: external_exports.string().uuid().optional(),
9982
+ limit: external_exports.number().optional().describe("Maximum items to return (default: 20)"),
9983
+ node_type: external_exports.enum(["decision", "lesson", "fact", "insight"]).optional().describe("Filter by knowledge type")
9984
+ })
9985
+ },
9986
+ async (input) => {
9987
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
9988
+ if (!workspaceId) {
9989
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
9990
+ }
9991
+ const result = await client.slackKnowledge({ workspace_id: workspaceId, limit: input.limit, node_type: input.node_type });
9992
+ if (result.length === 0) {
9993
+ return { content: [{ type: "text", text: "No knowledge extracted from Slack yet. Knowledge is distilled from high-engagement threads after sync." }] };
9994
+ }
9995
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
9996
+ }
9997
+ );
9998
+ registerTool(
9999
+ "github_summary",
10000
+ {
10001
+ title: "GitHub activity summary",
10002
+ description: `Get a high-level summary of GitHub activity for a workspace.
10003
+ Returns: overview of issues, PRs, commits, releases, and highlights for the specified period.
10004
+ Use this for weekly/monthly reports or to get a quick overview of repository activity.
10005
+
10006
+ Example prompts:
10007
+ - "Give me a weekly GitHub summary"
10008
+ - "What happened in GitHub last month?"
10009
+ - "Show me the GitHub summary for repo X"`,
10010
+ inputSchema: external_exports.object({
10011
+ workspace_id: external_exports.string().uuid().optional(),
10012
+ days: external_exports.number().optional().describe("Number of days to summarize (default: 7)"),
10013
+ repo: external_exports.string().optional().describe("Filter by repository name")
10014
+ })
10015
+ },
10016
+ async (input) => {
10017
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10018
+ if (!workspaceId) {
10019
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10020
+ }
10021
+ const result = await client.githubSummary({
10022
+ workspace_id: workspaceId,
10023
+ days: input.days,
10024
+ repo: input.repo
10025
+ });
10026
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10027
+ }
10028
+ );
10029
+ registerTool(
10030
+ "slack_summary",
10031
+ {
10032
+ title: "Slack activity summary",
10033
+ description: `Get a high-level summary of Slack activity for a workspace.
10034
+ Returns: overview of messages, threads, top channels, and highlights for the specified period.
10035
+ Use this for weekly/monthly reports or to get a quick overview of team discussions.
10036
+
10037
+ Example prompts:
10038
+ - "Give me a weekly Slack summary"
10039
+ - "What was discussed in Slack last month?"
10040
+ - "Show me the Slack summary for #engineering"`,
10041
+ inputSchema: external_exports.object({
10042
+ workspace_id: external_exports.string().uuid().optional(),
10043
+ days: external_exports.number().optional().describe("Number of days to summarize (default: 7)"),
10044
+ channel: external_exports.string().optional().describe("Filter by channel name")
10045
+ })
10046
+ },
10047
+ async (input) => {
10048
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10049
+ if (!workspaceId) {
10050
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10051
+ }
10052
+ const result = await client.slackSummary({
10053
+ workspace_id: workspaceId,
10054
+ days: input.days,
10055
+ channel: input.channel
10056
+ });
10057
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10058
+ }
10059
+ );
10060
+ registerTool(
10061
+ "integrations_search",
10062
+ {
10063
+ title: "Cross-source search",
10064
+ description: `Search across all connected integrations (GitHub, Slack, etc.) with a single query.
10065
+ Returns: unified results from all sources, ranked by relevance or recency.
10066
+ Use this to find related discussions, issues, and content across all your tools.
10067
+
10068
+ Example prompts:
10069
+ - "Search all integrations for database migration discussions"
10070
+ - "Find mentions of authentication across GitHub and Slack"
10071
+ - "Search for API changes in the last 30 days"`,
10072
+ inputSchema: external_exports.object({
10073
+ workspace_id: external_exports.string().uuid().optional(),
10074
+ query: external_exports.string().describe("Search query"),
10075
+ limit: external_exports.number().optional().describe("Maximum results (default: 20)"),
10076
+ sources: external_exports.array(external_exports.string()).optional().describe("Filter by source: github, slack"),
10077
+ days: external_exports.number().optional().describe("Filter to results within N days"),
10078
+ sort_by: external_exports.enum(["relevance", "recent", "engagement"]).optional().describe("Sort by: relevance, recent, or engagement")
10079
+ })
10080
+ },
10081
+ async (input) => {
10082
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10083
+ if (!workspaceId) {
10084
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10085
+ }
10086
+ const result = await client.integrationsSearch({
10087
+ workspace_id: workspaceId,
10088
+ query: input.query,
10089
+ limit: input.limit,
10090
+ sources: input.sources,
10091
+ days: input.days,
10092
+ sort_by: input.sort_by
10093
+ });
10094
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10095
+ }
10096
+ );
10097
+ registerTool(
10098
+ "integrations_summary",
10099
+ {
10100
+ title: "Cross-source activity summary",
10101
+ description: `Get a unified summary of activity across all connected integrations.
10102
+ Returns: combined overview of GitHub and Slack activity, key highlights, and trends.
10103
+ Use this for weekly team summaries or to understand overall activity across all tools.
10104
+
10105
+ Example prompts:
10106
+ - "Give me a weekly team summary across all sources"
10107
+ - "What happened across GitHub and Slack last week?"
10108
+ - "Show me a unified activity overview"`,
10109
+ inputSchema: external_exports.object({
10110
+ workspace_id: external_exports.string().uuid().optional(),
10111
+ days: external_exports.number().optional().describe("Number of days to summarize (default: 7)")
10112
+ })
10113
+ },
10114
+ async (input) => {
10115
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10116
+ if (!workspaceId) {
10117
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10118
+ }
10119
+ const result = await client.integrationsSummary({
10120
+ workspace_id: workspaceId,
10121
+ days: input.days
10122
+ });
10123
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10124
+ }
10125
+ );
10126
+ registerTool(
10127
+ "integrations_knowledge",
10128
+ {
10129
+ title: "Cross-source knowledge",
10130
+ description: `Get knowledge extracted from all connected integrations (GitHub, Slack, etc.).
10131
+ Returns: decisions, lessons, and insights distilled from all sources.
10132
+ Use this to find key decisions and learnings from across your team's conversations.
10133
+
10134
+ Example prompts:
10135
+ - "What decisions were made across all sources about authentication?"
10136
+ - "Show me lessons learned from all integrations"
10137
+ - "What insights have we gathered from GitHub and Slack?"`,
10138
+ inputSchema: external_exports.object({
10139
+ workspace_id: external_exports.string().uuid().optional(),
10140
+ knowledge_type: external_exports.enum(["decision", "lesson", "fact", "insight"]).optional().describe("Filter by knowledge type"),
10141
+ query: external_exports.string().optional().describe("Optional search query to filter knowledge"),
10142
+ sources: external_exports.array(external_exports.string()).optional().describe("Filter by source: github, slack"),
10143
+ limit: external_exports.number().optional().describe("Maximum items to return (default: 20)")
10144
+ })
10145
+ },
10146
+ async (input) => {
10147
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10148
+ if (!workspaceId) {
10149
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10150
+ }
10151
+ const result = await client.integrationsKnowledge({
10152
+ workspace_id: workspaceId,
10153
+ knowledge_type: input.knowledge_type,
10154
+ query: input.query,
10155
+ sources: input.sources,
10156
+ limit: input.limit
10157
+ });
10158
+ return { content: [{ type: "text", text: formatContent(result) }], structuredContent: toStructured(result) };
10159
+ }
10160
+ );
10161
+ registerTool(
10162
+ "integrations_status",
10163
+ {
10164
+ title: "Integration health status",
10165
+ description: `Check the status of all integrations (GitHub, Slack, etc.) for a workspace.
10166
+ Returns: connection status, last sync time, next sync time, and any errors.
10167
+ Use this to verify integrations are healthy and syncing properly.`,
10168
+ inputSchema: external_exports.object({
10169
+ workspace_id: external_exports.string().uuid().optional()
10170
+ })
10171
+ },
10172
+ async (input) => {
10173
+ const workspaceId = resolveWorkspaceId(input.workspace_id);
10174
+ if (!workspaceId) {
10175
+ return errorResult("Error: workspace_id is required. Please call session_init first or provide workspace_id explicitly.");
10176
+ }
10177
+ const result = await client.integrationsStatus({ workspace_id: workspaceId });
10178
+ if (result.length === 0) {
10179
+ return { content: [{ type: "text", text: "No integrations configured for this workspace." }] };
10180
+ }
10181
+ const formatted = result.map((i) => {
10182
+ const status = i.status === "connected" ? "\u2705" : i.status === "error" ? "\u274C" : "\u23F3";
10183
+ const lastSync = i.last_sync_at ? new Date(i.last_sync_at).toLocaleString() : "Never";
10184
+ const error = i.error_message ? ` (Error: ${i.error_message})` : "";
10185
+ return `${status} ${i.provider}: ${i.status} | Last sync: ${lastSync} | Resources: ${i.resources_synced}${error}`;
10186
+ }).join("\n");
10187
+ return { content: [{ type: "text", text: formatted }], structuredContent: toStructured(result) };
10188
+ }
10189
+ );
9671
10190
  }
9672
10191
 
9673
10192
  // src/resources.ts
@@ -10256,6 +10775,8 @@ async function upsertCodexTomlConfig(filePath, params) {
10256
10775
  const existing = exists ? await fs5.readFile(filePath, "utf8").catch(() => "") : "";
10257
10776
  const marker = "[mcp_servers.contextstream]";
10258
10777
  const envMarker = "[mcp_servers.contextstream.env]";
10778
+ const toolsetLine = params.toolset ? `CONTEXTSTREAM_TOOLSET = "${params.toolset}"
10779
+ ` : "";
10259
10780
  const block = `
10260
10781
 
10261
10782
  # ContextStream MCP server
@@ -10266,7 +10787,7 @@ args = ["-y", "@contextstream/mcp-server"]
10266
10787
  [mcp_servers.contextstream.env]
10267
10788
  CONTEXTSTREAM_API_URL = "${params.apiUrl}"
10268
10789
  CONTEXTSTREAM_API_KEY = "${params.apiKey}"
10269
- `;
10790
+ ` + toolsetLine;
10270
10791
  if (!exists) {
10271
10792
  await fs5.writeFile(filePath, block.trimStart(), "utf8");
10272
10793
  return "created";
@@ -10535,6 +11056,17 @@ Created API key: ${maskApiKey(apiKey)}
10535
11056
  console.log(" 2) Extended \u2014 more guidance + examples (higher token overhead)");
10536
11057
  const modeChoice = normalizeInput(await rl.question("Choose [1/2] (default 1): ")) || "1";
10537
11058
  const mode = modeChoice === "2" ? "full" : "minimal";
11059
+ console.log("\nMCP toolset (which tools to expose to the AI):");
11060
+ console.log(" 1) Core (recommended) \u2014 essential session/context tools (~17 tools, lower token overhead)");
11061
+ console.log(" Best for: most users, Claude Code, Claude Desktop (avoids large-context warnings)");
11062
+ console.log(" 2) Full \u2014 all tools including workspaces, projects, search, memory, graph, AI, integrations (~86 tools)");
11063
+ console.log(" Best for: power users needing direct access to all workspace/project/graph/AI tools");
11064
+ console.log(" Note: Claude Code/Desktop may warn about large tool lists when using full toolset.");
11065
+ console.log("");
11066
+ console.log(" Tip: You can switch toolsets later by editing the MCP config and setting CONTEXTSTREAM_TOOLSET=full");
11067
+ console.log(" See https://contextstream.io/docs/mcp/tools for the full tool catalog.");
11068
+ const toolsetChoice = normalizeInput(await rl.question("Choose [1/2] (default 1): ")) || "1";
11069
+ const toolset = toolsetChoice === "2" ? "full" : "core";
10538
11070
  const editors = ["codex", "claude", "cursor", "windsurf", "cline", "kilo", "roo", "aider"];
10539
11071
  console.log('\nSelect editors to configure (comma-separated numbers, or "all"):');
10540
11072
  editors.forEach((e, i) => console.log(` ${i + 1}) ${EDITOR_LABELS[e]}`));
@@ -10565,9 +11097,9 @@ Created API key: ${maskApiKey(apiKey)}
10565
11097
  const mcpChoiceDefault = hasCodex && !hasProjectMcpEditors ? "1" : "3";
10566
11098
  const mcpChoice = normalizeInput(await rl.question(`Choose [${hasCodex && !hasProjectMcpEditors ? "1/2" : "1/2/3/4"}] (default ${mcpChoiceDefault}): `)) || mcpChoiceDefault;
10567
11099
  const mcpScope = mcpChoice === "2" && hasCodex && !hasProjectMcpEditors ? "skip" : mcpChoice === "4" ? "skip" : mcpChoice === "1" ? "global" : mcpChoice === "2" ? "project" : "both";
10568
- const mcpServer = buildContextStreamMcpServer({ apiUrl, apiKey });
10569
- const mcpServerClaude = buildContextStreamMcpServer({ apiUrl, apiKey, toolset: "core" });
10570
- const vsCodeServer = buildContextStreamVsCodeServer({ apiUrl, apiKey });
11100
+ const mcpServer = toolset === "full" ? buildContextStreamMcpServer({ apiUrl, apiKey, toolset: "full" }) : buildContextStreamMcpServer({ apiUrl, apiKey });
11101
+ const mcpServerClaude = buildContextStreamMcpServer({ apiUrl, apiKey, toolset });
11102
+ const vsCodeServer = toolset === "full" ? buildContextStreamVsCodeServer({ apiUrl, apiKey, toolset: "full" }) : buildContextStreamVsCodeServer({ apiUrl, apiKey });
10571
11103
  const needsGlobalMcpConfig = mcpScope === "global" || mcpScope === "both" || mcpScope === "project" && hasCodex;
10572
11104
  if (needsGlobalMcpConfig) {
10573
11105
  console.log("\nInstalling global MCP config...");
@@ -10581,7 +11113,8 @@ Created API key: ${maskApiKey(apiKey)}
10581
11113
  console.log(`- ${EDITOR_LABELS[editor]}: would update ${filePath}`);
10582
11114
  continue;
10583
11115
  }
10584
- const status = await upsertCodexTomlConfig(filePath, { apiUrl, apiKey });
11116
+ const codexParams = toolset === "full" ? { apiUrl, apiKey, toolset: "full" } : { apiUrl, apiKey };
11117
+ const status = await upsertCodexTomlConfig(filePath, codexParams);
10585
11118
  writeActions.push({ kind: "mcp-config", target: filePath, status });
10586
11119
  console.log(`- ${EDITOR_LABELS[editor]}: ${status} ${filePath}`);
10587
11120
  continue;
@@ -10614,7 +11147,7 @@ Created API key: ${maskApiKey(apiKey)}
10614
11147
  }
10615
11148
  }
10616
11149
  console.log("- Claude Code: global MCP config is best done via `claude mcp add --transport stdio ...` (see docs).");
10617
- console.log(" macOS/Linux: claude mcp add --transport stdio contextstream --scope user --env CONTEXTSTREAM_API_URL=... --env CONTEXTSTREAM_API_KEY=... --env CONTEXTSTREAM_TOOLSET=core -- npx -y @contextstream/mcp-server");
11150
+ console.log(` macOS/Linux: claude mcp add --transport stdio contextstream --scope user --env CONTEXTSTREAM_API_URL=... --env CONTEXTSTREAM_API_KEY=... --env CONTEXTSTREAM_TOOLSET=${toolset} -- npx -y @contextstream/mcp-server`);
10618
11151
  console.log(" Windows (native): use `cmd /c npx -y @contextstream/mcp-server` after `--` if `npx` is not found.");
10619
11152
  continue;
10620
11153
  }
@@ -10817,10 +11350,15 @@ Applying to ${projects.length} project(s)...`);
10817
11350
  const skipped = writeActions.filter((a) => a.status === "skipped").length;
10818
11351
  const dry = writeActions.filter((a) => a.status === "dry-run").length;
10819
11352
  console.log(`Summary: ${created} created, ${updated} updated, ${appended} appended, ${skipped} skipped, ${dry} dry-run.`);
11353
+ console.log(`Toolset: ${toolset} (${toolset === "full" ? "~86 tools" : "~17 core tools"})`);
10820
11354
  }
10821
11355
  console.log("\nNext steps:");
10822
11356
  console.log("- Restart your editor/CLI after changing MCP config or rules.");
11357
+ console.log("- Prefer ContextStream search first: use session_smart_search (or mcp__contextstream__session_smart_search) before raw repo scans (rg/ls/find).");
10823
11358
  console.log("- If any tools require UI-based MCP setup (e.g. Cline/Kilo/Roo global), follow https://contextstream.io/docs/mcp.");
11359
+ if (toolset === "full") {
11360
+ console.log("- Note: Claude Code/Desktop may warn about large tool contexts. This is expected with the full toolset.");
11361
+ }
10824
11362
  } finally {
10825
11363
  rl.close();
10826
11364
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contextstream/mcp-server",
3
- "version": "0.3.40",
3
+ "version": "0.3.42",
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",