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
init

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="<project_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.

generate_rules

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

context

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.

search

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).

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

session

Session management operations. Actions: capture (save decision/insight), capture_lesson (save lesson from mistake), get_lessons (retrieve lessons), recall (natural language recall), remember (quick save), user_context (get preferences), summary (workspace summary), compress (compress chat), delta (changes since timestamp), smart_search (context-enriched search), decision_trace (trace decision provenance), restore_context (restore state after compaction). Plan actions: capture_plan (save implementation plan), get_plan (retrieve plan with tasks), update_plan (modify plan), list_plans (list all plans). Suggested rules actions: list_suggested_rules (view ML-generated rule suggestions), suggested_rule_action (accept/reject/modify a suggestion), suggested_rules_stats (view ML accuracy stats). Team actions (team plans only): team_decisions (team-wide decisions), team_lessons (team-wide lessons), team_plans (plans across team workspaces).

memory

Memory operations for events and nodes. Event actions: create_event, get_event, update_event, delete_event, list_events, distill_event, import_batch (bulk import array of events). Node actions: create_node, get_node, update_node, delete_node, 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), delete_transcript. Team actions (team plans only): team_tasks, team_todos, team_diagrams, team_docs.

graph

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.

project

Project management. Actions: list, get, create, update, index (trigger indexing), 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).

workspace

Workspace management. Actions: list, get, 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).

reminder

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

help

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).

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