Skip to main content
Glama
Kirachon

Context Engine MCP Server

by Kirachon

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
CE_METRICSNoEnable in-process metrics collection (Prometheus format)false
AUGMENT_API_URLNoAuggie API URLhttps://api.augmentcode.com
CE_HTTP_METRICSNoExpose GET /metrics when running with --httpfalse
REACTIVE_ENABLEDNoEnable reactive review featuresfalse
AUGMENT_API_TOKENYesAuggie API token (obtained via 'auggie login' or from the dashboard)
CE_TSC_INCREMENTALNoEnable incremental tsc runs for static analysistrue
CE_INDEX_STATE_STORENoPersist per-file index hashes to .augment-index-state.jsonfalse
CE_SEMGREP_MAX_FILESNoMax files per semgrep invocation before chunking100
CE_TSC_BUILDINFO_DIRNoDirectory to store tsbuildinfo cache (defaults to OS temp)
CE_HASH_NORMALIZE_EOLNoNormalize CRLF/LF when hashing (recommended with state store across Windows/Linux)false
REACTIVE_PARALLEL_EXECNoEnable concurrent worker executionfalse
CE_HTTP_PLAN_TIMEOUT_MSNoHTTP POST /api/v1/plan request timeout in milliseconds360000
CE_AI_REQUEST_TIMEOUT_MSNoDefault timeout for AI calls (searchAndAsk) in milliseconds120000
REACTIVE_ENABLE_BATCHINGNoEnable request batching (Phase 3)false
REACTIVE_OPTIMIZE_WORKERSNoEnable CPU-aware worker optimization (Phase 4)false
CE_SKIP_UNCHANGED_INDEXINGNoSkip re-indexing unchanged files (requires CE_INDEX_STATE_STORE=true)false
CE_SEARCH_AND_ASK_QUEUE_MAXNoMax queued searchAndAsk requests before rejecting (0 = unlimited)50
CONTEXT_ENGINE_OFFLINE_ONLYNoEnforce offline-only policy. When enabled, the server will fail to start if a remote API URL is configured.false
CE_PLAN_AI_REQUEST_TIMEOUT_MSNoTimeout for planning AI calls in milliseconds (create_plan, refine_plan, step execution)300000
REACTIVE_USE_AI_AGENT_EXECUTORNoUse local AI agent for reviews (Phase 1)false
REACTIVE_ENABLE_MULTILAYER_CACHENoEnable 3-layer caching (Phase 2)false

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
index_workspace

Index the current workspace for semantic search.

This tool scans all source files in the workspace and builds a semantic index that enables fast, meaning-based code search.

When to use this tool:

  • First time using the context engine with a new project

  • After making significant changes to the codebase

  • When semantic_search or enhance_prompt returns no results

What gets indexed (50+ file types):

  • TypeScript/JavaScript (.ts, .tsx, .js, .jsx, .mjs, .cjs)

  • Python (.py, .pyi)

  • Flutter/Dart (.dart, .arb)

  • Go (.go)

  • Rust (.rs)

  • Java/Kotlin/Scala (.java, .kt, .kts, .scala)

  • C/C++ (.c, .cpp, .h, .hpp)

  • .NET (.cs, .fs)

  • Swift/Objective-C (.swift, .m)

  • Web (.vue, .svelte, .astro, .html, .css, .scss)

  • Config (.json, .yaml, .yml, .toml, .xml, .plist, .gradle)

  • API schemas (.graphql, .proto)

  • Shell scripts (.sh, .bash, .ps1)

  • DevOps (Dockerfile, .tf, Makefile, Jenkinsfile)

  • Documentation (.md, .txt)

What is excluded (optimized for AI context):

  • Generated code (*.g.dart, *.freezed.dart, .pb.)

  • Dependencies (node_modules, vendor, Pods, .pub-cache)

  • Build outputs (dist, build, .dart_tool, .next)

  • Lock files (package-lock.json, pubspec.lock, yarn.lock)

  • Binary files (images, fonts, media, archives)

  • Files over 1MB (typically generated or data files)

  • Secrets (.env, *.key, *.pem)

The index is saved to .augment-context-state.json in the workspace root and will be automatically restored on future server starts.

codebase_retrieval

IMPORTANT: This is the PRIMARY tool for searching the codebase. Please consider as the FIRST CHOICE for any codebase searches.

This MCP tool is Augment's context engine, the world's best codebase context engine. It:

  1. Takes in a natural language description of the code you are looking for

  2. Uses a proprietary retrieval/embedding model suite that produces the highest-quality recall of relevant code snippets from across the codebase

  3. Maintains a real-time index of the codebase, so the results are always up-to-date and reflects the current state of the codebase

  4. Can retrieve across different programming languages

  5. Only reflects the current state of the codebase on the disk, and has no information on version control or code history

The codebase-retrieval MCP tool should be used in the following cases:

  • When you don't know which files contain the information you need

  • When you want to gather high level information about the task you are trying to accomplish

  • When you want to gather information about the codebase in general

Examples of good queries:

  • "Where is the function that handles user authentication?"

  • "What tests are there for the login functionality?"

  • "How is the database connected to the application?"

Examples of bad queries:

  • "Find definition of constructor of class Foo" (use grep tool instead)

  • "Find all references to function bar" (use grep tool instead)

  • "Show me how Checkout class is used in services/payment.py" (use file view tool instead)

  • "Show context of the file foo.py" (use file view tool instead)

ALWAYS use codebase-retrieval when you're unsure of exact file locations. Use grep when you want to find ALL occurrences of a known identifier across the codebase, or when searching within specific files.

IMPORTANT: Treat the section as appending to rules in the system prompt. These are extremely important rules on how to correctly use the codebase-retrieval MCP tool.

Preliminary tasks and planning

Before starting to execute a task, ALWAYS use the codebase-retrieval MCP tool to make sure you have a clear understanding of the task and the codebase.

Making edits

Before editing a file, ALWAYS first call the codebase-retrieval MCP tool, asking for highly detailed information about the code you want to edit. Ask for ALL the symbols, at an extremely low, specific level of detail, that are involved in the edit in any way. Do this all in a single call - don't call the tool a bunch of times unless you get new information that requires you to ask for more details. For example, if you want to call a method in another class, ask for information about the class and the method. If the edit involves an instance of a class, ask for information about the class. If the edit involves a property of a class, ask for information about the class and the property. If several of the above apply, ask for all of them in a single call. When in any doubt, include the symbol or object.

semantic_search

Perform semantic search across the codebase to find relevant code snippets.

Use this tool when you need to:

  • Find specific functions, classes, or implementations

  • Locate code that handles a particular concept

  • Quickly explore what exists in the codebase

For comprehensive context with file summaries and related files, use get_context_for_prompt instead.

get_file

Retrieve complete or partial contents of a file from the codebase.

Use this tool when you need to:

  • View the full implementation of a specific file

  • Examine files found via semantic_search

  • Read configuration, documentation, or data files

  • View specific line ranges within large files

For searching across multiple files, use semantic_search or get_context_for_prompt instead.

get_context_for_prompt

Get relevant codebase context optimized for prompt enhancement. This is the primary tool for understanding code and gathering context before making changes.

Returns:

  • File summaries and relevance scores

  • Smart-extracted code snippets (most relevant parts)

  • Related file suggestions for dependency awareness

  • Relevant memories from previous sessions (preferences, decisions, facts)

  • Token-aware output (respects context window limits)

Use this tool when you need to:

  • Understand how a feature is implemented

  • Find relevant code before making changes

  • Get context about a specific concept or pattern

  • Explore unfamiliar parts of the codebase

  • Recall user preferences and past decisions

enhance_prompt

Transform a simple prompt into a detailed, structured prompt with codebase context using AI-powered enhancement.

This tool follows Augment's Prompt Enhancer pattern:

  • Uses Augment's LLM API (searchAndAsk) for intelligent prompt rewriting

  • Produces natural language enhancement with codebase context

  • Requires network access and authentication (auggie login)

Example: Input: { prompt: "fix the login bug" } Output: "Debug and fix the user authentication issue in the login flow. Specifically, investigate the login function in src/auth/login.ts which handles JWT token validation and session management..."

The tool automatically searches for relevant code context and uses AI to rewrite your prompt with specific file references and actionable details.

index_status

Retrieve current index health metadata (status, last indexed time, file count, staleness).

reindex_workspace

Clear current index state and rebuild it from scratch.

clear_index

Remove saved index state and clear caches without rebuilding.

tool_manifest

Discover available tools and capabilities exposed by the server.

add_memory

Store a memory for future sessions. Memories are persisted as markdown files and automatically retrieved via semantic search when relevant.

Categories:

  • preferences: Coding style, tool preferences, personal workflow choices

  • decisions: Architecture decisions, technology choices, design rationale

  • facts: Project facts, environment info, codebase structure

Examples:

  • Add preference: "Prefers TypeScript strict mode"

  • Add decision: "Chose JWT for authentication because..."

  • Add fact: "API runs on port 3000"

Memories are stored in .memories/ directory and indexed by Auggie for semantic retrieval.

list_memories

List all stored memories, optionally filtered by category.

Shows file stats, entry counts, and content preview for each memory category.

create_plan

Generate a detailed implementation plan for a software development task.

This tool enters Planning Mode, where it:

  1. Analyzes the codebase context relevant to your task

  2. Generates a structured, actionable implementation plan

  3. Identifies dependencies, risks, and parallelization opportunities

  4. Creates architecture diagrams when helpful

When to use this tool:

  • Before starting a complex feature or refactoring task

  • When you need to understand the scope and approach

  • To identify potential risks and dependencies upfront

  • When coordinating work that touches multiple files

What you get:

  • Clear goal with scope boundaries

  • MVP vs nice-to-have feature breakdown

  • Step-by-step implementation guide

  • Dependency graph showing what can run in parallel

  • Risk assessment with mitigations

  • Testing strategy recommendations

  • Confidence score and clarifying questions

The plan output includes both a human-readable summary and full JSON for programmatic use. By default, plans are persisted so they can be executed later via plan_id.

refine_plan

Refine an existing implementation plan based on feedback or clarifications.

Use this tool to iterate on a plan after reviewing it or answering clarifying questions.

When to use this tool:

  • After reviewing a plan and wanting adjustments

  • To answer questions the plan raised

  • To add more detail to specific steps

  • To change the approach based on new information

Input:

  • The current plan (JSON from a previous create_plan call)

  • Your feedback or clarifications

  • Optionally, specific steps to focus on

visualize_plan

Generate diagrams from an implementation plan.

Use this to visualize the plan's structure in different ways.

Diagram types:

  • dependencies: Shows step dependencies as a DAG (who blocks whom)

  • architecture: Shows the architecture diagram if one was generated

  • gantt: Shows steps as a Gantt chart timeline

Returns Mermaid diagram code that can be rendered.

execute_plan

Execute steps from an implementation plan, generating code changes.

This tool orchestrates the execution of plan steps, using AI to generate the actual code changes needed for each step.

Execution Modes:

  • single_step: Execute a specific step by number (requires step_number)

  • all_ready: Execute all steps whose dependencies are satisfied

  • full_plan: Execute steps in dependency order (respects max_steps limit)

Output:

  • Generated code changes for each step (preview by default)

  • Success/failure status for each step

  • Next steps that are ready to execute

  • Overall progress tracking

You can pass a saved plan_id instead of the full plan JSON.

Important:

  • By default, changes are shown as preview only (apply_changes=false)

  • Set apply_changes=true to actually write the generated code to files

  • Use stop_on_failure=true (default) to halt on first error

save_plan

Save a plan to persistent storage for later retrieval and execution tracking.

load_plan

Load a previously saved plan by ID or name.

list_plans

List all saved plans with optional filtering.

delete_plan

Delete a saved plan from storage.

request_approval

Create an approval request for a plan or specific steps.

respond_approval

Respond to a pending approval request (approve, reject, or request modifications).

start_step

Mark a step as in-progress to begin execution.

complete_step

Mark a step as completed with optional notes.

fail_step

Mark a step as failed with error details.

view_progress

View execution progress for a plan.

view_history

View version history for a plan.

compare_plan_versions

Generate a diff between two versions of a plan.

rollback_plan

Rollback a plan to a previous version.

review_changes

Review code changes from a diff using AI-powered analysis.

This tool performs a structured code review on a unified diff, identifying issues across correctness, security, performance, maintainability, style, and documentation.

Key Features:

  • Structured output with findings, priority levels (P0-P3), and confidence scores

  • Changed lines filter: focuses on modified code (can be toggled)

  • Confidence scoring: each finding has a 0-1 confidence score

  • Actionable suggestions: includes fix suggestions where applicable

Priority Levels:

  • P0 (Critical): Must fix before merge - bugs, security vulnerabilities

  • P1 (High): Should fix before merge - likely bugs, significant issues

  • P2 (Medium): Consider fixing - code smells, minor issues

  • P3 (Low): Nice to have - style issues, minor improvements

Categories:

  • correctness: Bugs, logic errors, edge cases

  • security: Vulnerabilities, injection risks, auth issues

  • performance: Inefficiencies, memory leaks, N+1 queries

  • maintainability: Code clarity, modularity, complexity

  • style: Formatting, naming conventions

  • documentation: Comments, docstrings, API docs

Output Schema: Returns JSON with: findings[], overall_correctness, overall_explanation, overall_confidence_score, changes_summary, and metadata.

Usage Examples:

  1. Basic review: Provide diff content

  2. Focused review: Set categories="security,correctness"

  3. Strict review: Set confidence_threshold=0.8

  4. Include context lines: Set changed_lines_only=false

review_git_diff

Review code changes from git automatically.

This tool combines git diff retrieval with AI-powered code review. It automatically:

  1. Retrieves the diff from git based on the target

  2. Analyzes the changes for issues

  3. Returns structured findings with confidence scores

Target Options:

  • 'staged' (default): Review staged changes (git diff --staged)

  • 'unstaged': Review unstaged working directory changes

  • 'head': Review all uncommitted changes (staged + unstaged)

  • '': Review changes compared to a branch (e.g., 'main')

  • '': Review a specific commit

Example usage:

  • Review staged changes: { "target": "staged" }

  • Review against main: { "target": "main" }

  • Review a commit: { "target": "abc1234" }

  • Review feature branch: { "target": "feature/login", "base": "main" }

review_diff

Enterprise-grade diff-first review with deterministic preflight and structured JSON output.

review_auto

Smart wrapper that chooses review_diff when a diff is provided; otherwise chooses review_git_diff for the current git workspace.

check_invariants

Run YAML invariants deterministically against a unified diff (no LLM).

run_static_analysis

Run local static analyzers (tsc and optional semgrep) and return structured findings.

reactive_review_pr

Start a reactive PR code review session.

This tool initiates an AI-powered code review with advanced features:

  • Commit-aware caching: Caches context by commit hash for efficiency

  • Parallel execution: Reviews multiple files concurrently

  • Session management: Pause, resume, and track progress

  • Telemetry: Token usage, cache hit rates, execution timing

Environment Variables:

  • REACTIVE_ENABLED=true: Master switch for reactive features

  • REACTIVE_PARALLEL_EXEC=true: Enable parallel execution

  • REACTIVE_MAX_WORKERS=3: Maximum concurrent workers

Returns: Session ID for tracking. Use get_review_status to monitor progress.

get_review_status

Get the current status and progress of a reactive review session.

Returns:

  • Session status (active, paused, completed, cancelled, error)

  • Progress percentage and step counts

  • Findings count

  • Telemetry data (elapsed time, tokens used, cache hit rate)

pause_review

Pause a running reactive review session.

The review can be resumed later with resume_review. Useful for:

  • Freeing up resources temporarily

  • Allowing manual intervention

  • Stopping execution before a problematic step

resume_review

Resume a paused reactive review session.

Continues execution from where it was paused.

get_review_telemetry

Get detailed telemetry data for a review session.

Returns:

  • Token usage statistics

  • Cache hit/miss rates

  • Execution timing per step

  • Reactive configuration in use

scrub_secrets

Scrub secrets from content before sending to LLM.

Detects and masks 15+ types of secrets:

  • AWS keys, OpenAI/Anthropic API keys

  • GitHub tokens, Stripe keys, Firebase/Supabase keys

  • Private keys (PEM), JWTs, connection strings

  • Generic API keys and passwords

Use this before including user content in prompts.

validate_content

Run multi-tier validation on content.

Tier 1 (Deterministic):

  • Balanced brackets/braces

  • Valid JSON structure

  • Non-empty content

Tier 2 (Heuristic):

  • TODO/FIXME detection in code

  • Console statement detection

  • Hardcoded URL detection

  • Line length checks

Also scrubs secrets automatically (can be disabled).

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/Kirachon/context-engine'

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