Persistent memory and cross-session learning for AI coding assistants via cloud-based context management through MCP. Uses consolidated domain tools for efficient semantic search, project analysis, and decision capture.
Cloud-based context management and persistent memory for AI coding assistants. Provides semantic code search, dependency analysis, cross-session learning, and decision capture through MCP (Model Context Protocol).
ContextStream v0.4.x uses ~11 consolidated domain tools for ~75% token reduction vs previous versions. Rules Version: 0.4.27
Source: `contextstream/mcp-server` - Persistent memory and cross-session learning for AI coding assistants.
| Message | What to Call |
|---------|--------------|
| **1st message** | `session_init(folder_path="<cwd>", context_hint="<user_message>")`, then `context_smart(user_message="<user_message>", format="minified", max_tokens=400)` |
| **2nd+ messages** | `context_smart(user_message="<user_message>", format="minified", max_tokens=400)` |
| **Capture decisions** | `session(action="capture", event_type="decision", title="...", content="...")` |
| **Before risky work** | `session(action="get_lessons", query="<topic>")` |
| **On user frustration** | `session(action="capture_lesson", title="...", trigger="...", impact="...", prevention="...")` |
**Context Pack (Pro+):** If enabled, use `context_smart(..., mode="pack", distill=true)` for code/file queries. If unavailable or disabled, omit `mode` and proceed with standard `context_smart` (the API will fall back).
**Tool naming:** Use the exact tool names exposed by your MCP client. Claude Code typically uses `mcp__<server>__<tool>` where `<server>` matches your MCP config (often `contextstream`). If a tool call fails with "No such tool available", refresh rules and match the tool list.
| Tool | Common Usage |
|------|--------------|
| `search` | `search(mode="semantic", query="...", limit=3)` — modes: semantic, hybrid, keyword, pattern |
| `session` | `session(action="capture", ...)` — actions: capture, capture_lesson, get_lessons, recall, remember, user_context, summary, compress, delta, smart_search |
| `memory` | `memory(action="list_events", ...)` — CRUD for events/nodes, search, decisions, timeline, summary |
| `graph` | `graph(action="dependencies", ...)` — dependencies, impact, call_path, related, ingest |
| `project` | `project(action="list", ...)` - list, get, create, update, index, overview, statistics, files, index_status, ingest_local |
| `workspace` | `workspace(action="list", ...)` — list, get, associate, bootstrap |
| `integration` | `integration(provider="github", action="search", ...)` — GitHub/Slack integration |
| `help` | `help(action="tools")` — tools, auth, version, editor_rules |
⚠️ **STOP: Before using Search/Glob/Grep/Read/Explore** → Call `search(mode="hybrid")` FIRST. Use local tools ONLY if ContextStream returns 0 results.
1. **First message**: Call `session_init` with context_hint, then call `context_smart` before any other tool or response
2. **Every subsequent message**: Always call `context_smart` BEFORE responding (semantic search for relevant context)
3. **On [INGEST_RECOMMENDED]**: Ask the user if they want to enable semantic code search. Explain: "Indexing your codebase enables AI-powered code search, dependency analysis, and better context. This takes a few minutes." If user agrees, run the provided `project(action="ingest_local")` command.
4. **Before searching files/code**: Check `project(action="index_status")`; if missing/stale run `project(action="ingest_local", path="<cwd>")` or `project(action="index")`, and use `graph(action="ingest")` if needed
5. **For discovery**: Use `session(action="smart_search")` or `search(mode="hybrid")` — NEVER use local Glob/Grep/Read first
6. **For file/function/config lookups**: Use `search`/`graph` first; only fall back to rg/ls/find if ContextStream returns no results
7. **If ContextStream returns results**: Do NOT use local Search/Explore/Read; only open specific files when needed for exact edits
8. **For code analysis**: Use `graph(action="dependencies")` or `graph(action="impact")` for call/dependency analysis
9. **On [RULES_NOTICE]**: Use `generate_rules()` to update rules
10. **After completing work**: Always capture decisions/insights with `session(action="capture")`
11. **On mistakes/corrections**: Immediately capture lessons with `session(action="capture_lesson")`
When user asks to create a plan or implementation roadmap:
1. **Create plan**:
```
session(action="capture_plan", title="Plan Title", description="...", goals=["goal1", "goal2"], steps=[{id: "1", title: "Step 1", order: 1}, ...])
```
2. **Create tasks**: Get plan_id from response, then:
```
memory(action="create_task", title="Task Title", plan_id="<plan_id>", priority="high|medium|low", description="...")
```
Full documentation: https://contextstream.io/docs/mcp/tools
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/contextstream-v04x-configuration/raw