Skip to content
context-engine

Code intelligence for coding agents

Your coding agent is guessing. Make it know.

Context Engine plugs your agent into the same machinery your IDE runs on: every type resolved, every reference mapped, every dependency API read from its real source — the exact version in your lockfile. It stops improvising your code and starts knowing it.

Context is your agent’s attention. With Context Engine MCP it only ever pays for the code it actually needs to see — and spends the rest on thinking. It happens to shrink your token bill, too.

Runs entirely on your machine. Your code is never sent anywhere — that’s architecture, not a privacy policy.

without Context Engine
df = df.append(row, ignore_index=True)
# ✗ AttributeError. df.append() was real for a decade —
#   pandas 2.0 removed it. Your lockfile: pandas 2.2.
#   The model's memory: pandas 1.5.
with Context Engine
df = pd.concat([df, pd.DataFrame([row])], ignore_index=True)
# ✓ read from pandas 2.2 source — the version you run

Works with any language that has an LSP server — add it to ~/.context-engine/config.toml. Validated end-to-end on Python, TypeScript/JavaScript, Rust, Go, and Markdown.

Works with Claude Code · Cursor · Codex · Antigravity · any MCP agent

This already happened once

There was a time when engineers worked the way agents work now. You held the map of the codebase in your head, because nothing else held it. You learned an API by reading its manual first — no other way in. Renames were grep, sed, and prayer, so large refactorings mostly just didn’t happen. And the compiler told you what you’d broken, one error at a time.

Then IDEs got language servers, and the ceiling moved. Nobody remembers IntelliSense for the keystrokes it saved. What changed was capability: codebases grew past what one memory could hold and stayed workable, because knowledge could be fetched instead of memorized. Engineers reached for libraries they had never read. Refactoring went from feared to routine, and code stopped ossifying around its first mistakes. The head, freed from bookkeeping, went to design.

Your agent is that pre-IDE engineer. It greps. It reads whole files to find one function. It writes your code from a memory of the internet. It meets your call sites one compile error at a time.

Context Engine is the same transition, run again: a headless IDE— definitions, references, resolved types, wired into the agent’s hands. In 2016, code intelligence for humans became a protocol, and every editor adopted it within a few years, because rebuilding it per editor was absurd. That is how it ships for agents too. And because this transition has already happened once, its outcome isn’t a promise. It’s a precedent.

An engineer, 1995Your agent, today
Holds the codebase map in their headHolds the codebase in its context window
Learns an API from the printed manualLearned every API in 2024, from the internet
Renames with grep, sed, and prayerChanges a signature, chases the errors
Finds out from the compilerFinds out from the compiler
For engineers, the fix was the IDE.

And yes — it saves tokens, the way the IDE saved keystrokes: genuinely, and as the smallest part of what changes.

Here are the code intelligence tools your agent gets

Context Engine MCP exposes eight code intelligence tools. Each one answers a question your agent used to guess at, and each output is designed for a model’s attention rather than for a human’s screen. The language server provides the facts; the design work was deciding what an agent should see. One decision holds across all of them: every tool accepts batches — ten symbols, five files, thirty-two stack-trace locations in a single call — because every round trip costs the agent a full turn.

Samples in

outlineexplore API without reading entire files

The complete API of a file — hierarchy and full signatures — without reading a single body.

To use an API, you don't need the file. Not the comments, not the bodies, not the import list — you need the hierarchy and the full signature: name, parameters, return type, and the decorators, annotations, and modifiers that change how you call it. That is what outline returns, and nothing else. Reading a 5,000-token file to find one signature doesn't just cost tokens — it fills the agent's context with irrelevant code, and an agent reasons over everything in its context.

Every symbol comes with a stable handle. Handles survive body edits, comment changes, reformatting, and line shifts — so when your agent edits the file, it does not re-read the outline to find out where everything moved.

Every handle carries a price tag. full 124L | code 48L | docs 76L — the agent knows what a read costs before paying for it, and picks the view it needs: full, code only, docs only.

A 2,261-line file from this codebase:

real output, condensed — Rust
saved: 85.4 KB -> 4.5 KB (95% fewer bytes)

# context-engine-core/src/infrastructure/lsp/process_manager.rs (2261L)
- #[derive(Debug)] pub struct LspProcessHandle { ... } ["1000t003" full 202L | code 17L | docs 185L]
  - pub process_id: u32 ["1000t000" full 2L | code 1L | docs 1L]
  - process_handle: Option<tokio::process::Child> ["1000t002" full 10L | code 1L | docs 9L]
- impl LspProcessHandle { ... } ["1000t00f" full 509L | code 509L]
  - pub fn extract_streams( &mut self, ) -> Result<(ChildStdin, ChildStdout, ChildStderr), StreamExtractionError> { ... } ["1000t006" full 53L | code 13L | docs 40L]
  - pub async fn terminate(&mut self) -> Result<()> { ... } ["1000t00b" full 124L | code 48L | docs 76L]
- #[async_trait::async_trait] pub trait ProcessManager: Send + Sync { ... } ["1000t00w" full 1437L | code 1118L | docs 319L]
  - async fn spawn_lsp_process( &self, config: &LspExecutionConfig, cancellation_token: CancellationToken, ) -> ... ; ["1000t00n" full 39L | code 5L | docs 34L]
  ... (24 more symbols)

The complete API of a 2,261-line file for 4.5 KB — and the price tags show terminate is 48 lines of code but 76 lines of docs, so the agent picks the view it actually needs before reading anything.

Documentation gets the same treatment

Agents re-read your README, your agent instructions, your specs — every session, usually wholesale. Outlining a Markdown file returns the heading hierarchy with the same handles and price tags. The README of the moka caching crate, straight from the dependency registry:

real output, condensed — Markdown
saved: 23.0 KB -> 1.7 KB (93% fewer bytes)

# ~/.cargo/registry/.../moka-0.12.16/README.md (655L)
- Moka ["1000E00v" full 656L]
  - Features ["1000E001" full 57L]
  - Usage ["1000E006" full 16L]
  - Example: Synchronous Cache ["1000E007" full 80L]
  - Example: Asynchronous Cache ["1000E008" full 101L]
  - Expiration Policies ["1000E00b" full 23L]
  - Troubleshooting ["1000E00g" full 45L]
    - Compile Errors on Some 32-bit Platforms ["1000E00f" full 43L]
      - Symptoms ["1000E00d" full 27L]
      - How to Fix ["1000E00e" full 15L]
  ... (15 more sections)

An agent learning this dependency needs the 101 lines of “Example: Asynchronous Cache” — not the other 554 lines of roadmap, credits, and license.

No embeddings. No vector index. No “semantically similar” chunks. Retrieval guesses. Resolution knows.

Every agent in your workspace shares one engine

Agent work stopped being one chat window a while ago. A typical afternoon now: Claude Code in the terminal, Cursor in the editor, a Codex job running in the background — and each of them fanning out subagents. If every one of those processes spawned its own language servers, you’d be running six copies of rust-analyzer and four of tsserver, each holding gigabytes, each indexing the same code.

Context Engine runs as one daemon per machine, managing every workspace you have open. Each agent and subagent connects through its own connector — a 12–15 MiB process that speaks MCP on one side and the daemon on the other. That is the entire per-agent cost. The daemon maintains exactly one set of language servers per workspace, no matter how many connectors are asking. The first agent warms the index; every agent after it gets answers from a hot engine. Fan out as wide as you like — the footprint stays flat.

The engine supervises its fleet, too: it spawns language servers on demand, watches their health, and shuts down the ones unused for more than 30 minutes. A crashed language server is a hiccup the engine absorbs, not a broken agent session.

Context Engine itself is a single native binary written in Rust — no runtime to install, and a footprint that stays negligible next to the language servers it manages.

Context Engine resource topologyFive agents and subagents, each with its own 12 to 15 mebibyte connector, all connect to one Context Engine daemon per machine. The daemon runs one language server set per workspace: workspace A with one rust-analyzer, one vtsls, and one marksman; workspace B with one gopls and one marksman.each connector: 12–15 MiBone set per workspaceClaude CodeconnectorsubagentconnectorCursorconnectorsubagentconnectorCodexconnectorContext Enginedaemonone per machineworkspace A1 rust-analyzer1 vtsls1 marksmanworkspace B1 gopls1 marksman

Two minutes from here to an agent that knows your code

Get your free API key

Sign in with GitHub — identity only, no repository access — and click “Get API key”. About thirty seconds. Free during the Community Preview, no payment card; if terms ever change, preview users get 30 days’ notice, and nothing converts automatically.

Install

curl -fsSL https://context-engine.app/install.sh | sh

Homebrew and Scoop work too — see the download page.

Connect your agent

Pick your agent — each snippet shows where the key goes.

The snippet reads your key from the CONTEXT_ENGINE_API_KEY environment variable — set it once in your shell profile.

# 1. Put your key in your shell profile:
export CONTEXT_ENGINE_API_KEY="<your key>"

# 2. Register the server:
claude mcp add context-engine -- context-engine serve

Then verify:

context-engine license-check

If it prints your tier, you’re done.

Teach your agentoptional

Agents use tools better when told how. Paste our recommended instructions into CLAUDE.md, AGENTS.md, or whatever file your coding agent reads.

## Context Engine

Use Context Engine as the primary way to understand and navigate the codebase. Prefer it over broad text search or reading entire files.

Choose the tool based on what you know:

- Exact file and line: use `line_context`.
- Visible call, method, type, or constructor: use `jump`.
- Full or partial symbol name without a location: use `grep_definition` (add a glob for partial names).
- Known file: use `outline`. If the outline is insufficient, use `extract` only on the required handles.
- References, callers, or change impact: use `show_usage`.
- Type, signature, parameter names, or documentation at a known location: use `hover`.
- Exact line range when no semantic tool fits: use `smart_read`.

Batch related requests when a tool accepts multiple files, symbols, handles, or locations. This reduces tool calls and saves tokens.

Use narrow text search only for arbitrary text such as strings, comments, configuration values, or expressions. Inspect relevant search hits with `line_context` before tracing further.

Use `type_annotated` output by default. Use `plain_text` or `both` only when editing requires exact source text.

Never guess dependency APIs. Resolve visible dependency symbols with `jump`.

If Context Engine returns the answer, do not repeat the same investigation with built-in tools.

Language servers aren’t bundled — Context Engine picks them up from ~/.context-engine/config.toml, with default configurations included for the common ones. The long version, including per-language setup: the quickstart.

Roadmap

Reading code was the first broken interface. Editing is next.

Context Engine now gives agents the read half: a semantic interface for consuming code. The write half deserves the same precision, efficiency, and isolation.

01

Stop regenerating code that already exists

Agents spend expensive output tokens producing both the new code and the old code they must replace. Editing should express the change without reproducing its surroundings.

02

Make concurrent editing predictable

Multiple agents editing the same files can overwrite or invalidate one another's work. Parallel execution needs coordination designed for agents, not optimistic text mutation.

03

Keep unfinished work from blocking the team

Worktrees isolate separate tasks. They do not protect agents collaborating on one task from a shared codebase temporarily broken by another agent's intermediate changes.

04

Make editing semantic

Agents should replace symbols or their docs, declarations, and bodies by handle; insert beside existing symbols; and rename across the workspace without rebuilding textual context.

The honest boundary

Most of this functionality already exists internally. The tools are not public yet.

NowRead-only semantic layer

Ship the foundation, learn from real agents, and polish the interface with engineering feedback.

Next releasesAgent-native editing

Agents stage many edits, validate the complete result, and commit only when everything holds — in parallel, with clean task handoff between agents. Exposed once the read-only contract is proven in production.

From semantic context to an Agentic OS for the whole coding loop.

Free Community Preview

Your coding agent is guessing. Make it know.

One free key, one pasted line, and your agent starts answering from your code instead of its memory.

The Community Preview is free. We will announce any change to availability or terms in advance. There is no automatic conversion to a paid subscription.