@contextstream/mcp-server 0.4.44 → 0.4.45
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 +92 -211
- package/dist/hooks/auto-rules.js +912 -0
- package/dist/hooks/media-aware.js +103 -0
- package/dist/hooks/post-write.js +341 -0
- package/dist/hooks/pre-compact.js +229 -0
- package/dist/hooks/pre-tool-use.js +236 -0
- package/dist/hooks/user-prompt-submit.js +69 -0
- package/dist/index.js +11659 -10452
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,172 +1,127 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://contextstream.io/400logo.png" alt="ContextStream" width="80" />
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
<h1 align="center">ContextStream MCP Server</h1>
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Give your AI coding assistant brilliant memory, deep context, and superpowers it never had.</strong>
|
|
9
|
+
</p>
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## The Problem
|
|
16
|
-
|
|
17
|
-
Without ContextStream, every AI conversation starts from scratch:
|
|
18
|
-
|
|
19
|
-
- "We decided to use PostgreSQL" — forgotten next session
|
|
20
|
-
- "Don't use that deprecated API" — your AI suggests it anyway
|
|
21
|
-
- "Here's how our auth flow works" — explained for the 10th time
|
|
22
|
-
- Team decisions live in Slack threads no one can find
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/@contextstream/mcp-server"><img src="https://img.shields.io/npm/v/@contextstream/mcp-server.svg" alt="npm version" /></a>
|
|
13
|
+
<a href="https://www.npmjs.com/package/@contextstream/mcp-server"><img src="https://img.shields.io/npm/dm/@contextstream/mcp-server.svg" alt="downloads" /></a>
|
|
14
|
+
<a href="https://github.com/contextstream/mcp-server/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@contextstream/mcp-server.svg" alt="license" /></a>
|
|
15
|
+
</p>
|
|
23
16
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
| What you get | How it works |
|
|
29
|
-
|--------------|--------------|
|
|
30
|
-
| **Persistent Memory** | Decisions, preferences, and notes survive across sessions |
|
|
31
|
-
| **Semantic Code Search** | Find code by meaning, not just keywords |
|
|
32
|
-
| **Team Knowledge** | Share context across your team's AI tools |
|
|
33
|
-
| **Integration Sync** | Pull context from GitHub, Slack, and Notion automatically |
|
|
34
|
-
| **Smart Context** | Your AI gets relevant context for every message |
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://contextstream.io/docs">Documentation</a> •
|
|
19
|
+
<a href="https://contextstream.io/pricing">Pricing</a>
|
|
20
|
+
</p>
|
|
35
21
|
|
|
36
22
|
---
|
|
37
23
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
**You say...** → **ContextStream does...**
|
|
41
|
-
|
|
42
|
-
| Prompt | What happens |
|
|
43
|
-
|--------|--------------|
|
|
44
|
-
| "What did we decide about auth?" | Finds the decision from 3 weeks ago |
|
|
45
|
-
| "Remember we're using PostgreSQL" | Captured for all future sessions |
|
|
46
|
-
| "Search for payment handling code" | Semantic search across your codebase |
|
|
47
|
-
| "What depends on UserService?" | Analyzes dependency graph and impact |
|
|
48
|
-
| "Show me recent GitHub activity" | Surfaces issues, PRs, and discussions |
|
|
49
|
-
| "What's in our API docs on Notion?" | Searches your Notion knowledge base |
|
|
50
|
-
|
|
51
|
-
No special commands needed. Just describe what you want.
|
|
52
|
-
|
|
53
|
-

|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## Quick Setup (30 seconds)
|
|
58
|
-
|
|
59
|
-
The setup wizard handles everything:
|
|
24
|
+
<div align="center">
|
|
60
25
|
|
|
61
26
|
```bash
|
|
62
|
-
npx
|
|
27
|
+
npx @contextstream/mcp-server@latest setup
|
|
63
28
|
```
|
|
64
29
|
|
|
65
|
-
|
|
66
|
-
1. Authenticate your account (opens browser)
|
|
67
|
-
2. Create and store your API key
|
|
68
|
-
3. Install editor rules for best results
|
|
69
|
-
4. Configure your AI tools automatically
|
|
70
|
-
5. Install Claude Code hooks (optional, recommended)
|
|
30
|
+
</div>
|
|
71
31
|
|
|
72
|
-
|
|
32
|
+
<p align="center">
|
|
33
|
+
<img src="compare1.gif" alt="ContextStream in action" width="700" />
|
|
34
|
+
</p>
|
|
73
35
|
|
|
74
36
|
---
|
|
75
37
|
|
|
76
|
-
##
|
|
38
|
+
## This Isn't Just Memory. This Is Intelligence.
|
|
77
39
|
|
|
78
|
-
ContextStream
|
|
40
|
+
Other tools give your AI a notepad. **ContextStream gives it a brain.**
|
|
79
41
|
|
|
80
|
-
|
|
81
|
-
|------|----------|
|
|
82
|
-
| **Decisions** | "We chose JWT over sessions", "Using Tailwind for styling" |
|
|
83
|
-
| **Preferences** | "I prefer functional components", "Always use TypeScript" |
|
|
84
|
-
| **Lessons** | "That approach caused a memory leak", "This pattern works well" |
|
|
85
|
-
| **Tasks** | Implementation plans, TODOs, follow-ups |
|
|
86
|
-
| **Code Context** | File relationships, dependencies, patterns |
|
|
42
|
+
Your AI doesn't just remember things—it *understands* your entire codebase, learns from every conversation, pulls knowledge from your team's GitHub, Slack, and Notion, and delivers exactly the right context at exactly the right moment.
|
|
87
43
|
|
|
88
|
-
|
|
44
|
+
**One setup. Instant transformation.**
|
|
89
45
|
|
|
90
46
|
---
|
|
91
47
|
|
|
92
|
-
##
|
|
93
|
-
|
|
94
|
-
Connect your team's tools to enrich AI context automatically:
|
|
95
|
-
|
|
96
|
-
### GitHub
|
|
97
|
-
- Issues, PRs, releases, and comments synced as searchable memory
|
|
98
|
-
- "What's the status of the auth refactor?" finds the relevant PR
|
|
99
|
-
- Decisions from issue discussions surface when relevant
|
|
48
|
+
## What Changes When You Install This
|
|
100
49
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- Smart type detection for tasks, meetings, bugs, features
|
|
109
|
-
- "How does our deployment process work?" finds the runbook
|
|
50
|
+
| Before | After |
|
|
51
|
+
|--------|-------|
|
|
52
|
+
| AI searches files one-by-one, burning tokens | **Semantic search** finds code by meaning in milliseconds |
|
|
53
|
+
| Context lost when conversations get long | **Smart compression** preserves what matters before compaction |
|
|
54
|
+
| Team knowledge scattered across tools | **Unified intelligence** from GitHub, Slack, Notion—automatically |
|
|
55
|
+
| Same mistakes repeated across sessions | **Lessons system** ensures your AI learns from every failure |
|
|
56
|
+
| Generic responses, no project awareness | **Deep context** about your architecture, decisions, patterns |
|
|
110
57
|
|
|
111
58
|
---
|
|
112
59
|
|
|
113
|
-
##
|
|
114
|
-
|
|
115
|
-
ContextStream shines for teams:
|
|
60
|
+
## The Power Under the Hood
|
|
116
61
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- **Knowledge preservation** — context survives when people leave
|
|
120
|
-
- **Consistent AI behavior** — everyone's AI knows the same preferences
|
|
62
|
+
### Semantic Code Intelligence
|
|
63
|
+
Ask "where do we handle authentication?" and get the answer instantly. No grep chains. No reading 10 files. Your AI understands your code at a conceptual level.
|
|
121
64
|
|
|
122
|
-
|
|
65
|
+
### SmartRouter Context Delivery
|
|
66
|
+
Every message is analyzed. Risky refactor? Relevant lessons surface automatically. Making a decision? Your AI knows to capture it. The right context, every time, without you asking.
|
|
123
67
|
|
|
124
|
-
|
|
68
|
+
### Team Knowledge Fusion
|
|
69
|
+
Connect GitHub, Slack, and Notion. Discussions from months ago? Surfaced when relevant. That architecture decision buried in a PR comment? Your AI knows about it.
|
|
125
70
|
|
|
126
|
-
|
|
71
|
+
### Code Graph Analysis
|
|
72
|
+
"What depends on UserService?" "What's the impact of changing this function?" Your AI sees the connections across your entire codebase.
|
|
127
73
|
|
|
128
|
-
|
|
74
|
+
### Context Pressure Awareness
|
|
75
|
+
Long conversation? ContextStream tracks token usage, auto-saves critical state, and ensures nothing important is lost when context compacts.
|
|
129
76
|
|
|
130
|
-
|
|
77
|
+
---
|
|
131
78
|
|
|
132
|
-
|
|
79
|
+
## Setup Takes 30 Seconds
|
|
133
80
|
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
|
|
137
|
-
- Need full context? Use `full` format
|
|
81
|
+
```bash
|
|
82
|
+
npx @contextstream/mcp-server@latest setup
|
|
83
|
+
```
|
|
138
84
|
|
|
139
|
-
|
|
85
|
+
The wizard handles everything: authentication, configuration, editor integration, and optional hooks that supercharge your workflow.
|
|
140
86
|
|
|
141
|
-
|
|
87
|
+
**Works with:** Claude Code • Cursor • VS Code • Claude Desktop • Codex CLI • Antigravity
|
|
142
88
|
|
|
143
89
|
---
|
|
144
90
|
|
|
145
|
-
##
|
|
91
|
+
## The Tools Your AI Gets
|
|
146
92
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
93
|
+
```
|
|
94
|
+
init → Loads your workspace context instantly
|
|
95
|
+
context → Delivers relevant context every single message
|
|
96
|
+
search → Semantic, hybrid, keyword—find anything by meaning
|
|
97
|
+
session → Captures decisions, preferences, lessons automatically
|
|
98
|
+
memory → Builds a knowledge graph of your project
|
|
99
|
+
graph → Maps dependencies and analyzes impact
|
|
100
|
+
project → Indexes your codebase for semantic understanding
|
|
101
|
+
media → Index and search video, audio, images (great for Remotion)
|
|
102
|
+
integration → Queries GitHub, Slack, Notion directly
|
|
103
|
+
```
|
|
158
104
|
|
|
159
|
-
|
|
105
|
+
Your AI uses these automatically. You just code.
|
|
160
106
|
|
|
161
107
|
---
|
|
162
108
|
|
|
163
109
|
## Manual Configuration
|
|
164
110
|
|
|
165
|
-
> Skip this if you
|
|
111
|
+
> Skip this if you ran the setup wizard.
|
|
166
112
|
|
|
167
|
-
|
|
113
|
+
<details>
|
|
114
|
+
<summary><b>Claude Code</b></summary>
|
|
168
115
|
|
|
169
|
-
|
|
116
|
+
```bash
|
|
117
|
+
claude mcp add contextstream -- npx @contextstream/mcp-server
|
|
118
|
+
claude mcp update contextstream -e CONTEXTSTREAM_API_KEY=your_key
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
</details>
|
|
122
|
+
|
|
123
|
+
<details>
|
|
124
|
+
<summary><b>Cursor / Claude Desktop</b></summary>
|
|
170
125
|
|
|
171
126
|
```json
|
|
172
127
|
{
|
|
@@ -174,46 +129,18 @@ Add to your MCP config:
|
|
|
174
129
|
"contextstream": {
|
|
175
130
|
"command": "npx",
|
|
176
131
|
"args": ["-y", "@contextstream/mcp-server"],
|
|
177
|
-
"env": {
|
|
178
|
-
"CONTEXTSTREAM_API_KEY": "YOUR_API_KEY"
|
|
179
|
-
}
|
|
132
|
+
"env": { "CONTEXTSTREAM_API_KEY": "your_key" }
|
|
180
133
|
}
|
|
181
134
|
}
|
|
182
135
|
}
|
|
183
136
|
```
|
|
184
137
|
|
|
185
|
-
|
|
186
|
-
- **Cursor:** `~/.cursor/mcp.json`
|
|
187
|
-
- **Windsurf:** `~/.codeium/windsurf/mcp_config.json`
|
|
188
|
-
- **Claude Desktop (macOS):** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
189
|
-
|
|
190
|
-
### Claude Code (CLI)
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
claude mcp add --transport stdio contextstream --scope user \
|
|
194
|
-
--env CONTEXTSTREAM_API_KEY=YOUR_KEY \
|
|
195
|
-
-- npx -y @contextstream/mcp-server
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
#### Claude Code Hooks (Recommended)
|
|
199
|
-
|
|
200
|
-
ContextStream can install hooks that enforce best practices:
|
|
138
|
+
**Locations:** `~/.cursor/mcp.json` • `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
201
139
|
|
|
202
|
-
|
|
203
|
-
- **UserPromptSubmit hook** — Injects context reminders every message
|
|
140
|
+
</details>
|
|
204
141
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
```bash
|
|
208
|
-
npx -y @contextstream/mcp-server setup
|
|
209
|
-
# Or: mcp__contextstream__generate_rules(editors=["claude"])
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
Hooks are installed to `~/.claude/hooks/` and configured in `~/.claude/settings.json`. Your custom rules are preserved — only ContextStream blocks are updated.
|
|
213
|
-
|
|
214
|
-
### VS Code
|
|
215
|
-
|
|
216
|
-
Add to `.vscode/mcp.json`:
|
|
142
|
+
<details>
|
|
143
|
+
<summary><b>VS Code</b></summary>
|
|
217
144
|
|
|
218
145
|
```json
|
|
219
146
|
{
|
|
@@ -222,71 +149,25 @@ Add to `.vscode/mcp.json`:
|
|
|
222
149
|
"type": "stdio",
|
|
223
150
|
"command": "npx",
|
|
224
151
|
"args": ["-y", "@contextstream/mcp-server"],
|
|
225
|
-
"env": {
|
|
226
|
-
"CONTEXTSTREAM_API_KEY": "${input:contextstreamApiKey}"
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
"inputs": [
|
|
231
|
-
{
|
|
232
|
-
"id": "contextstreamApiKey",
|
|
233
|
-
"type": "promptString",
|
|
234
|
-
"description": "ContextStream API Key",
|
|
235
|
-
"password": true
|
|
152
|
+
"env": { "CONTEXTSTREAM_API_KEY": "your_key" }
|
|
236
153
|
}
|
|
237
|
-
|
|
154
|
+
}
|
|
238
155
|
}
|
|
239
156
|
```
|
|
240
157
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
Add to `~/.codex/config.toml`:
|
|
244
|
-
|
|
245
|
-
```toml
|
|
246
|
-
[mcp_servers.contextstream]
|
|
247
|
-
command = "npx"
|
|
248
|
-
args = ["-y", "@contextstream/mcp-server"]
|
|
249
|
-
|
|
250
|
-
[mcp_servers.contextstream.env]
|
|
251
|
-
CONTEXTSTREAM_API_KEY = "YOUR_API_KEY"
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
---
|
|
255
|
-
|
|
256
|
-
## Environment Variables
|
|
257
|
-
|
|
258
|
-
| Variable | Description |
|
|
259
|
-
|----------|-------------|
|
|
260
|
-
| `CONTEXTSTREAM_API_KEY` | Your API key (required) |
|
|
261
|
-
| `CONTEXTSTREAM_API_URL` | API endpoint (default: `https://api.contextstream.io`) |
|
|
262
|
-
| `CONTEXTSTREAM_WORKSPACE_ID` | Default workspace |
|
|
263
|
-
| `CONTEXTSTREAM_PROJECT_ID` | Default project |
|
|
264
|
-
| `CONTEXTSTREAM_SEARCH_REMINDER` | Set to `false` to disable search-first reminders |
|
|
265
|
-
| `CONTEXTSTREAM_HOOK_ENABLED` | Set to `false` to disable hooks without uninstalling |
|
|
266
|
-
|
|
267
|
-
---
|
|
268
|
-
|
|
269
|
-
## Troubleshooting
|
|
270
|
-
|
|
271
|
-
| Issue | Solution |
|
|
272
|
-
|-------|----------|
|
|
273
|
-
| Tools not appearing | Restart your editor after config changes |
|
|
274
|
-
| 401 Unauthorized | Check your API key is correct |
|
|
275
|
-
| Wrong workspace | Run `session_init` or re-run the setup wizard |
|
|
158
|
+
</details>
|
|
276
159
|
|
|
277
160
|
---
|
|
278
161
|
|
|
279
162
|
## Links
|
|
280
163
|
|
|
281
|
-
|
|
282
|
-
|----------|-----|
|
|
283
|
-
| **Website** | https://contextstream.io |
|
|
284
|
-
| **Documentation** | https://contextstream.io/docs |
|
|
285
|
-
| **Tool Reference** | https://contextstream.io/docs/mcp/tools |
|
|
286
|
-
| **Pricing** | https://contextstream.io/pricing |
|
|
164
|
+
**Website:** https://contextstream.io
|
|
287
165
|
|
|
288
|
-
|
|
166
|
+
**Docs:** https://contextstream.io/docs
|
|
289
167
|
|
|
290
|
-
|
|
168
|
+
---
|
|
291
169
|
|
|
292
|
-
|
|
170
|
+
<p align="center">
|
|
171
|
+
<strong>Stop teaching your AI the same things over and over.</strong><br/>
|
|
172
|
+
<sub>ContextStream makes it brilliant from the first message.</sub>
|
|
173
|
+
</p>
|