Skip to main content
Glama
contextstream

ContextStream MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CONTEXTSTREAM_API_KEYYesYour API key from contextstream.io
CONTEXTSTREAM_API_URLNoAPI base URLhttps://api.contextstream.io

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}
completions
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
flashC

Alias of instruct. Session-scoped instruction cache operations. Actions: bootstrap, get, push, ack, clear, stats, checkpoint, verify.

instructC

Session-scoped instruction cache operations. Actions: bootstrap, get, push, ack, clear, stats, checkpoint, verify.

tool_searchA

Search available tools and hidden operations, then call direct tools or use execute_operation for deferred capabilities.

execute_operationA

Execute a hidden or deferred capability returned by tool_search.

batch_operationsA

Execute multiple independent read-only operations in one call. Rejects write or destructive operations.

memory_create_eventC

Create a memory event for a workspace/project

skillB

Manage and execute reusable skills (instruction + action bundles). Skills are portable across projects, sessions, and tools. Use 'supersede' to retire a stale skill (archives it so it stops surfacing).

Actions:

  • list: Browse skills (filter by scope, status, category)

  • get: Get skill details by ID or name

  • create: Define a new skill with name, instruction, and triggers

  • update: Modify an existing skill

  • run: Execute a skill (by ID or name)

  • delete: Remove a skill

  • import: Import skills from file or content (supports markdown, JSON, cursorrules, claude_md)

  • export: Export skills in various formats

  • share: Change skill visibility scope

initA

Initialize a new conversation session and automatically retrieve relevant context. This is the FIRST tool AI assistants should call when starting a conversation. Returns: workspace info, project info, recent memory, recent decisions, relevant context, high-priority lessons, and ingest_recommendation.

The ingest_recommendation field indicates if the project needs indexing for code search:

  • If [INGEST_RECOMMENDED] appears, ask the user if they want to enable semantic code search

  • Benefits: AI-powered code understanding, dependency analysis, better context retrieval

  • If user agrees, run: project(action="ingest_local", path="")

IMPORTANT: Pass the user's FIRST MESSAGE as context_hint to get semantically relevant context! Example: init(folder_path="/path/to/project", context_hint="how do I implement auth?")

This does semantic search on the first message. You only need context on subsequent messages.

session_captureB

Automatically capture and store important context from the conversation. Use this to persist decisions, insights, preferences, or important information.

session_capture_lessonA

Capture a lesson learned from a mistake or correction. Use this when the user corrects you, expresses frustration, or points out an error. These lessons are surfaced in future sessions to prevent repeating the same mistakes.

Example triggers:

  • User says "No, you should..." or "That's wrong"

  • User expresses frustration (caps, "COME ON", "WTF")

  • Code breaks due to a preventable mistake

The lesson will be tagged with 'lesson' and stored with structured metadata for easy retrieval.

session_rememberB

Quick way to store something in memory. Use natural language. Example: "Remember that I prefer TypeScript strict mode" or "Remember we decided to use PostgreSQL"

generate_rulesC

Generate AI rule files for editors (Cursor, Cline, Kilo Code, Roo Code, Claude Code, GitHub Copilot, Aider). Defaults to the current project folder; no folder_path required when run from a project. Supported editors: codex, opencode, cursor, windsurf, cline, kilo, roo, claude, aider, antigravity, copilot

generate_editor_rulesB

Generate AI rule files for editors (Cursor, Cline, Kilo Code, Roo Code, Claude Code, GitHub Copilot, Aider). These rules instruct the AI to automatically use ContextStream for memory and context. Supported editors: codex, opencode, cursor, windsurf, cline, kilo, roo, claude, aider, antigravity, copilot

capture_planC

Create a new implementation plan.

contextA

CALL THIS BEFORE EVERY AI RESPONSE to get relevant context.

This is the KEY tool for token-efficient AI interactions. It:

  1. Analyzes the user's message to understand what context is needed

  2. Retrieves only relevant context in a minified, token-efficient format

  3. Replaces the need to include full chat history in prompts

Format options:

  • 'minified': Ultra-compact D:decision|P:preference|M:memory (default, ~200 tokens)

  • 'readable': Line-separated with labels

  • 'structured': JSON-like grouped format

Type codes: W=Workspace, P=Project, D=Decision, M=Memory, I=Insight, T=Task, L=Lesson

Context Pack:

  • mode='pack' adds code context + distillation (higher credit cost)

Example usage:

  1. User asks "how should I implement auth?"

  2. AI calls context(user_message="how should I implement auth?")

  3. Gets: "W:Maker|P:contextstream|D:Use JWT for auth|D:No session cookies|M:Auth API at /auth/..."

  4. AI responds with relevant context already loaded

This saves ~80% tokens compared to including full chat history.

searchA

Search workspace memory and knowledge. Modes: auto (recommended), semantic (meaning-based), hybrid (legacy alias for auto), keyword (exact match), pattern (regex), exhaustive (all matches like grep), refactor (word-boundary matching for symbol renaming), team (cross-project team search - team plans only), crawl (deep multi-modal search).

Output formats: full (default, includes content), paths (file paths only - 80% token savings), minimal (compact - 60% savings), count (match counts only - 90% savings).

sessionA

Session and memory management — NOT for codebase/file search (use the 'search' tool for that). LESSONS LIVE HERE: when a mistake or correction happens, call action='capture_lesson' (NEVER write lessons to ~/.claude/.../memory/, .cursorrules, or other local markdown — local files are invisible to [LESSONS_WARNING] auto-surfacing on future turns and across sessions). PAST SESSIONS LIVE HERE: use action='recall' FIRST when the user references "last time", "previous", "yesterday", or is continuing prior work — full-text transcripts are indexed across every prior session. context() may surface [GROUNDING]; use action='ground' with user_message for a one-shot bundle (recall + docs + decisions + lessons + skills) outside context(). Actions: capture (save decision/insight), retro_capture (after-the-fact decision/note/snapshot capture from prior work with source provenance — title plus content and/or query/transcript_ids), capture_lesson (mistakes/corrections — title+trigger+impact+prevention), get_lessons (retrieve lessons), update_lesson / delete_lesson (maintain a saved lesson by lesson_id — UUID or lookup text), recall (retrieve past conversation context via ranked fusion of transcripts/snapshots/docs/decisions), ground (one-shot prior-work bundle), remember (quick save), user_context (get preferences), summary (workspace summary), compress (compress chat), delta (changes since timestamp), smart_search (searches MEMORY/conversation history only, not code), decision_trace (trace decision provenance), restore_context (restore state after compaction). Plan actions: capture_plan, get_plan, update_plan, list_plans. Suggested rules actions: list_suggested_rules, suggested_rule_action, suggested_rules_stats. Team actions: team_decisions, team_lessons, team_plans. Team/personal mode: set_account_mode (team|personal|auto).

entityB

Unified CRUD across taxonomy expansion entities. Kinds: ticket, handoff, backlog_view, incident, release, experiment, goal, key_result, sprint, review, risk. Actions: list, get, create, update, delete. Body is free-form JSON forwarded to the API; workspace_id/project_id default to active scope when omitted.

capsuleA

ContextCapsule: portable, shareable, hydrate-on-demand snapshots of project context. Use capsule when the user pastes a /c/ link or capsule token, asks for a handoff/share/team/external-agent link, wants to bootstrap a fresh agent with project state, asks for a paste-ready handoff prompt (bootstrap prompt / prompt for another LLM), wants share-token graphs, or wants to list/audit capsules. Do not use capsule for normal turn-by-turn retrieval; use context instead. Team share links are authenticated and reusable by default; external_agent/public_link/support shares are token-gated and single-use by default.

qaA

ContextStream agent Q&A — ask the workspace/project knowledge base when you get stuck.

When to use:

  • You need workspace-specific knowledge you cannot derive from code: prior decisions ("why was X chosen over Y?"), conventions ("what's the file naming pattern in this repo?"), runbooks ("how does the team handle this kind of incident?"), guardrails ("what's off-limits in this workspace?").

  • You're about to make a non-trivial choice and the workspace probably has prior context that shapes it.

  • A teammate has likely answered this before and you'd rather reuse than re-derive.

When NOT to use:

  • General programming questions you can answer yourself or via web search ("how does Rust async work?").

  • Things you can determine by reading the code right in front of you — read it first.

  • Trivial syntax or single-line questions.

Not a reflex, not a last resort. If you're spending more than ~30 seconds stuck on something workspace-shaped, ask. If you can find the answer in 30 seconds yourself, do that.

Actions:

  • ask: submit a question, get a grounded answer with citations + confidence.

  • search: vector-similarity-free listing of prior Q&A — check before re-asking.

  • save_kb: store guidance/guardrail/faq/runbook/caveat for future asks to reference.

  • list_kb: browse stored knowledge.

  • get_kb / update_kb / delete_kb: manage individual KB items.

  • feedback: rate an answer (-1, 0, +1) so future retrievals weight it appropriately.

Answers come from ContextCode, ContextStream's grounded Q&A agent. Every claim cites the source ([id=decision:abc] / [id=lesson:xyz] / [id=qa_kb_item:def] etc.) so you can verify before acting on it.

memoryA

Persistent memory — docs, runbooks, specs, ADRs, decisions, lessons, tasks, and todos live HERE, never on disk: when the user mentions "the doc on X", "our runbook for Y", or "why we decided Z", use action="search" or list_docs/get_doc — NOT filesystem tools. Tasks here are lightweight project-tracking items; for tickets, bugs, incidents, releases, or handoffs use the entity tool instead. Event actions: create_event, get_event, update_event, delete_event (accepts event_id UUID or exact title; delete_all=true bulk-removes exact-title matches), list_events, distill_event, import_batch (bulk import array of events). Node actions: create_node, get_node, update_node, delete_node (accepts node_id UUID or exact title; delete_all=true bulk-removes exact-title matches), list_nodes, supersede_node. Query actions: search, decisions, timeline, summary. Task actions: create_task (create task, optionally linked to plan), get_task, update_task (can link/unlink task to plan via plan_id), delete_task, list_tasks, reorder_tasks. Todo actions: create_todo, list_todos, get_todo, update_todo, delete_todo, complete_todo. Diagram actions: create_diagram, list_diagrams, get_diagram, update_diagram, delete_diagram. Doc actions: create_doc, list_docs, get_doc, update_doc, delete_doc, create_roadmap. Transcript actions: list_transcripts (list saved conversations), get_transcript (get full transcript by ID), search_transcripts (semantic search across conversations), search_archive (hosted archive tier; local npm returns unavailable), delete_transcript. Team actions (team plans only): team_tasks, team_todos, team_diagrams, team_docs.

graphB

Code graph analysis. Actions: dependencies (module deps), impact (change impact), call_path (function call path), related (related nodes), path (path between nodes), decisions (decision history), ingest (build graph), circular_dependencies, unused_code, contradictions, usages (reverse deps).

projectC

Project management. Actions: list, get, create, update, delete, index (trigger indexing), purge (completely de-index a project — removes file indices, code chunks, and search vectors but keeps the project record), forget_local (stop this machine from re-binding a folder to its saved scope; server data untouched), remove_paths (de-index specific files by exact path — pass paths=[...]), merge (merge source_project_id into project_id), overview, statistics, files, index_status, index_history (audit trail of indexed files), ingest_local (index local folder), team_projects (list all team projects - team plans only), recent_changes (git log/diff for recent file changes).

workspaceC

Workspace management. Actions: list, get, create, delete, associate (link folder to workspace), bootstrap (create workspace and initialize), team_members (list members with access - team plans only), index_settings (get/update multi-machine sync settings - admin only).

reminderC

Reminder management. Actions: list, active (pending/overdue), create, snooze, complete, dismiss.

integrationC

Integration operations for Slack, GitHub, and Notion. Provider: slack, github, notion, all. Actions: status, search, stats, activity, contributors, knowledge, summary, channels (slack), discussions (slack), repos (github), issues (github), create_page (notion), create_database (notion), list_databases (notion), search_pages (notion with smart type detection - filter by event_type, status, priority, has_due_date, tags), get_page (notion), query_database (notion), update_page (notion), team_activity (aggregated team activity - team plans only).

mediaA

Media operations for video/audio/image assets. Enables AI agents to index, search, and retrieve media with semantic understanding - solving the "LLM as video editor has no context" problem for tools like Remotion.

Actions:

  • index: Index a local media file or external URL. Triggers ML processing (Whisper transcription, CLIP embeddings, keyframe extraction).

  • status: Check indexing progress for a content_id. Returns transcript_available, keyframe_count, duration.

  • search: Semantic search across indexed media. Returns timestamps, transcript excerpts, keyframe URLs.

  • get_clip: Get clip details for a time range. Supports output_format: remotion (frame-based props), ffmpeg (timecodes), raw.

  • list: List indexed media assets.

  • delete: Remove a media asset from the index.

Example workflow:

  1. media(action="index", file_path="/path/to/video.mp4") → get content_id

  2. media(action="status", content_id="...") → wait for indexed

  3. media(action="search", query="where John explains authentication") → get timestamps

  4. media(action="get_clip", content_id="...", start="1:34", end="2:15", output_format="remotion") → get Remotion props

helpA

Utility and help. Actions: tools (list available tools), auth (current user), version (server version), editor_rules (generate AI editor rules and install hooks for real-time file indexing), enable_bundle (enable tool bundle in progressive mode), team_status (team subscription info - team plans only).

vcsC

Git version control and remote repo operations.

Local git actions: status, diff, log, blame, branches, stash_list Remote API actions: list_repos, get_repo, sync_repo, list_pulls, get_pull, get_pull_diff, get_pull_comments, get_pull_commits, get_pull_checks, get_pull_summary, summarize_pull, review_pull, comment_pull, merge_pull, list_issues, get_issue, create_issue, update_issue, comment_issue, list_commits, get_commit, get_commit_diff, compare_refs, list_branches_remote, list_tags, get_tree, get_blob, search_code, search_vcs, get_activity, list_notifications, mark_notification_read, mark_all_notifications_read, list_links, create_link, delete_link, list_automations, create_automation, update_automation, delete_automation, register_webhook, unregister_webhook

memory_create_docB

Create a durable doc (spec, runbook, ADR, RFC, etc.). Same handler as memory(action="create_doc").

memory_update_docC

Update an existing doc. Same handler as memory(action="update_doc").

memory_delete_docB

Delete a doc. Same handler as memory(action="delete_doc").

memory_create_taskB

Create a project-tracking task, optionally linked to a plan step. Same handler as memory(action="create_task").

memory_update_taskC

Update a task (status, fields, plan linkage). Same handler as memory(action="update_task").

memory_create_todoC

Create a lightweight todo. Same handler as memory(action="create_todo").

memory_complete_todoB

Mark a todo complete. Same handler as memory(action="complete_todo").

Prompts

Interactive templates invoked by user choice

NameDescription
explore-codebaseGet an overview of a project codebase structure and key components
capture-decisionDocument an architectural or technical decision in workspace memory
review-contextBuild context for reviewing code changes
investigate-bugBuild context for debugging an issue
explore-knowledgeNavigate and understand the knowledge graph for a workspace
onboard-to-projectGenerate onboarding context for a new team member
analyze-refactoringAnalyze a codebase for refactoring opportunities
build-contextBuild comprehensive context for an LLM task
smart-searchSearch across memory, decisions, and code for a query
recall-contextRetrieve relevant past decisions and memory for a query
session-summaryGet a compact summary of workspace/project context
capture-lessonRecord a lesson learned from an error or correction
capture-preferenceSave a user preference to memory
capture-taskCapture an action item into memory
capture-bugCapture a bug report into workspace memory
capture-featureCapture a feature request into workspace memory
generate-planGenerate a development plan from a description
generate-tasksGenerate actionable tasks from a plan or description
token-budget-contextGet the most relevant context that fits within a token budget
find-todosScan the codebase for TODO/FIXME/HACK notes and summarize
generate-editor-rulesGenerate ContextStream AI rule files for your editor
index-local-repoIngest local files into ContextStream for indexing/search

Resources

Contextual data attached and managed by the client

NameDescription
contextstream-openapiMachine-readable OpenAPI from the configured API endpoint
contextstream-workspacesList of accessible workspaces

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/contextstream/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server