Context EngineBLOCK
Local-native Context Engine MCP server for codebase indexing, semantic retrieval, planning, and review workflows.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A local-first, agent-agnostic Model Context Protocol (MCP) server for workspace indexing, retrieval, planning, and review workflows, with a setup path that works well for Codex and other OpenAI-powered agents.
New here? Start with the beginner quick start below. If you want client-specific setup help, see docs/MCPCLIENTSETUP.md. If you are on Windows, see docs/WINDOWSDEPLOYMENTGUIDE.md. Historical docs live in docs/archive/INDEX.md if you need the old planning and migration notes.
OpenAI / Codex Showcase
If you want to see what this project demonstrates for OpenAI-style agent workflows, start here:
- Local workspace indexing and retrieval
- Review and planning workflows layered on top of the same MCP server
- Beginner-friendly install and client setup
- Windows support and copy-paste setup examples
- AI-agent-friendly instructions for self-setup
Why This Matters
- It shows how an OpenAI-powered agent can connect to a real workspace and start using tools right away.
- It combines retrieval, review, and planning in one MCP server instead of relying on one-off scripts.
- It gives both humans and AI agents a simple, repeatable setup path, which makes demos and onboarding easier.
Fastest demo path:
npm install npm run build codex mcp add context-engine -- node dist/index.js
Then in Codex, confirm the tools are visible and try:
use semantic_search to find authentication logic
Beginner Quick Start
If you just want to get Context Engine running locally, follow these steps:
- Install Node.js 18+.
- Clone this repository and open it in a terminal at the repo root.
- Install dependencies:
npm install
- Build the server:
npm run build
- Run the verification checks:
npm run verify
- Start the MCP server:
node dist/index.js
By default,
a6b1576c8af7OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add context-engine --env CONTEXT_ENGINE_HTTP_AUTH_ENABLED=${CONTEXT_ENGINE_HTTP_AUTH_ENABLED} --env CONTEXT_ENGINE_HTTP_AUTH_TOKENS=${CONTEXT_ENGINE_HTTP_AUTH_TOKENS} --env REACTIVE_TOKEN_BUDGET=${REACTIVE_TOKEN_BUDGET} -- npx -y [email protected]{
"mcpServers": {
"context-engine": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"CONTEXT_ENGINE_HTTP_AUTH_ENABLED": "${CONTEXT_ENGINE_HTTP_AUTH_ENABLED}",
"CONTEXT_ENGINE_HTTP_AUTH_TOKENS": "${CONTEXT_ENGINE_HTTP_AUTH_TOKENS}",
"REACTIVE_TOKEN_BUDGET": "${REACTIVE_TOKEN_BUDGET}"
}
}
}
}Exposed tools (47)
37 read · 7 write · 3 destructive. Blast radius: 3 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
Coverage | read | Expand test contracts |
add_memory | write | Store a memory for future sessions. Memories are persisted as markdown files and automatically retrieved via semantic search when relevant. **Categories:** - \ |
categories | read | Optional comma-separated category list. |
check_invariants | write | Run YAML invariants deterministically against a unified diff (no LLM). |
clarifications | read | Optional JSON object string of clarification answers. |
clear_index | destructive | Remove saved index state and clear caches without rebuilding. |
compare_plan_versions | read | Generate a diff between two versions of a plan. |
complete_step | read | Mark a step as completed with optional notes. |
create-plan | write | Build a planning request using the repo planning templates. |
current_plan | read | Existing plan JSON string. |
custom_instructions | read | Optional extra review instructions. |
delete_plan | destructive | Delete a saved plan from storage. |
diff | read | Unified diff to review. |
enhance-request | read | Build a request-enhancement prompt using the repo prompt-enhancement templates. |
fail_step | read | Mark a step as failed with error details. |
feedback | read | Optional refinement feedback text. |
find_callees | read | Return deterministic callees of a known function or method symbol. This tool prefers persisted graph call edges and reports explicit degraded-mode receipts when it had to fall back to heuristic extraction. |
find_callers | read | Return deterministic callers of a known function or method symbol. This tool prefers persisted graph call edges and falls back explicitly when graph coverage is unavailable or incomplete. Use when you want call sites for one symbol without the broader combined output of call_relationships. |
get_review_status | read | 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) |
get_review_telemetry | read | Get detailed telemetry data for a review session. Returns: - Token usage statistics - Cache hit/miss rates - Execution timing per step - Reactive configuration in use |
impact_analysis | read | Estimate the direct change surface of a known symbol using graph-backed definition, reference, and call-edge data. This v1 analysis is intentionally bounded to direct references and call edges so degraded-mode behavior stays explicit and deterministic. |
index_status | read | Retrieve current index health metadata (status, last indexed time, file count, staleness). |
list_memories | read | List all stored memories, optionally filtered by category. Shows file stats, entry counts, and content preview for each memory category. |
list_plans | read | List all saved plans with optional filtering. |
load_plan | read | Load a previously saved plan by ID or name. |
pause_review | read | 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 |
refine-plan | read | Build a plan-refinement request using the repo refinement templates. |
reindex_workspace | destructive | Clear current index state and rebuild it from scratch. |
request_approval | write | Create an approval request for a plan or specific steps. |
respond_approval | read | Respond to a pending approval request (approve, reject, or request modifications). |
resume_review | read | Resume a paused reactive review session. Continues execution from where it was paused. |
review-diff | read | Build a code-review request for a diff using the repo review templates. |
review_auto | read | Smart wrapper that chooses review_diff when a diff is provided; otherwise chooses review_git_diff for the current git workspace. |
review_diff | read | Enterprise-grade diff-first review with deterministic preflight and structured JSON output. |
review_git_diff | read | 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:** - |
review_memory_suggestions | read | Review draft memory batches and perform idempotent batch actions. Batch listing enforces the Phase 1 cap (target 3-5, hard cap 5). Approved suggestions remain review-state only in this phase; durable writes stay in the existing memory tools. Undo is pre-promotion only in Phase 1. |
rollback_plan | read | Rollback a plan to a previous version. |
run_static_analysis | write | Run local static analyzers (tsc and optional semgrep) and return structured findings. |
save_plan | write | Save a plan to persistent storage for later retrieval and execution tracking. |
start_step | write | Mark a step as in-progress to begin execution. |
symbol_references | read | Find non-declaration usages of a known identifier across the local codebase. Use this tool when you need to: - Locate call sites or consumers of a known function, class, or constant - Exclude declaration hits from identifier-style navigation - Narrow usage lookup with include_paths or exclude_paths |
tool_manifest | read | Discover available tools and capabilities exposed by the server. |
trace_symbol | read | Trace a known symbol across its canonical definition, non-declaration references, and direct call edges. This tool composes the graph-backed symbol navigation surfaces into one deterministic response and makes degraded-mode behavior explicit per stage. |
view_history | read | View version history for a plan. |
view_progress | read | View execution progress for a plan. |
visualize_plan | read | Generate diagrams from an implementation plan. Use this to visualize the plan |
why_this_context | read | Explain why files were selected into a context bundle using the shared retrieval provenance and explainability contract. This tool reuses the same selection vocabulary exposed by graph-aware retrieval and get_context_for_prompt instead of inventing a parallel explanation path. |
Trust audit
BLOCKgrade F · trust 57/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- declared (3 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
normalized === '169.254.169.254' ||
normalized === 'metadata.google.internal'
- Bulk save must not bypass per-item safety rules.
context-engine.zip
"code_snippet": "const secret = 'my-super-secret-key-12345';"
content: 'const apiKey = "sk-proj-abc123def456ghi789jklmno";',
clear_index, delete_plan, reindex_workspace
context-engine-mcp.skill
flutter-playwright-e2e.skill
.contextignore
.review-invariants.yml
.vscodeignore
--top-k <n> Retrieval top K for offline eval (default: 10)
--retrieve-mode <fast|deep> Retrieval mode for offline eval (default: fast)
' rule: "No eval() usage in source code"',
' rule: "No eval() usage in source code"',
' rule: "No eval()"',
return createHash('sha1')import { FEATURE_FLAGS } from '../../src/config/features.js';import { getToolManifest, MCP_SERVER_VERSION } from '../../src/mcp/tools/manifest.js';import { buildToolRegistryEntries } from '../../src/mcp/server.js';import { listRestApiToolMappings } from '../../src/mcp/tooling/discoverability.js';import { listConvertedToolsWithOutputSchema } from '../../src/mcp/utils/outputSchemaContract.js';/exfiltrat/iu,
Gates applied: instruction_override, no_behavioural_pass, no_license.
a6b1576c8af7full audit observations/trust-audit/mcp-server/kirachon__context-engine-2.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | a6b1576c8af7 | BLOCK | F | 57 | first audit |
Questions
What is the Context Engine MCP server?
Local-native Context Engine MCP server for codebase indexing, semantic retrieval, planning, and review workflows.
What tools does Context Engine expose?
47 in total: 37 read-only, 7 that write, and 3 that can delete or overwrite (clear_index, delete_plan, reindex_workspace). Every one is listed on this page with its risk.
Is Context Engine safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (57/100) and found 3 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 3 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Context Engine need?
It reads CONTEXT_ENGINE_HTTP_AUTH_ENABLED, CONTEXT_ENGINE_HTTP_AUTH_TOKENS and REACTIVE_TOKEN_BUDGET from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Context Engine run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as context-engine at 0.1.1.
How current is this page?
The grade is for one exact copy of the source (a6b1576c8af7), read on 2026-10-08. The repository is watched and re-audited when it changes.