CLI reference
Commands and options for license verification and the Context Engine MCP server.
The context-engine binary provides license verification and a stdio MCP server for coding clients.
context-engine <COMMAND>Use context-engine --help to list commands and context-engine --version to print the installed version.
license-check
Verify that Context Engine can start with the configured license.
context-engine license-check [OPTIONS]| Option | Description |
|---|---|
--api-key <API_KEY> | Use this API key for verification. The CONTEXT_ENGINE_API_KEY environment variable supplies the same value. |
--force-online | Ignore the local license lease cache and require an online verification round trip. |
-h, --help | Print command help. |
Without --force-online, Context Engine first checks its local signed lease. It contacts the control plane when the lease requires verification and an API key is available.
A successful check exits with status 0. Hard failures use status 70; transient online-verification failures use status 75.
The license lease cache is separate from the source-analysis cache discussed under containers and virtualized environments.
serve
Start the Context Engine MCP server over stdio.
context-engine serve [OPTIONS] [WORKSPACE]| Argument or option | Description |
|---|---|
[WORKSPACE] | Workspace root directory. Defaults to the current directory. |
--api-key <API_KEY> | Use this API key for license verification. The CONTEXT_ENGINE_API_KEY environment variable supplies the same value. |
--log-file <PATH> | Append logs to the specified file. |
--log-stderr | Write logs to standard error. |
--log-level <LEVEL> | Set the server log level to debug, info, warn/warning, or error. The default is info. |
--legacy-json-schema | Use JSON Schema draft-07 instead of the default draft 2020-12 for legacy clients. |
-h, --help | Print command help. |
The server verifies the license before starting. It reserves standard output for JSON-RPC, so logging is disabled unless --log-file or --log-stderr is supplied. Both logging options can be used together.
See Connect a client for configurations that launch context-engine serve from Codex, Claude Code, Cursor, or Google Antigravity IDE.
update
Update the installed Context Engine using the installation owner recorded beside the executable.
context-engine update| Installation | Action |
|---|---|
| Direct | Run the verified direct update. |
| Homebrew | brew upgrade context-engine |
| Scoop | scoop update context-engine |
| APT | sudo apt-get update, then sudo apt-get install --only-upgrade context-engine (omit sudo when already root) |
| DNF | sudo dnf upgrade context-engine (omit sudo when already root) |
The command reports an actionable error when the adjacent ownership marker is absent or invalid; it never guesses from
the executable path. Direct installations are user-owned under $HOME/.local/lib/context-engine/ on macOS/Linux and
%LOCALAPPDATA%\Context Engine\ on Windows. Package-managed installations do not use direct-update state or locks.
Containers and virtualized environments
Support for containers and virtual machines is experimental. Context Engine automatically detects non-native execution and disables its source-analysis cache and native file watcher. No additional CLI flag is required.
Running without the source-analysis cache is normal in these environments. Context Engine remains fast enough for regular semantic navigation without it.
The limitation is filesystem change propagation. Host-mounted filesystems do not always deliver reliable or timely filesystem events inside a container or virtual machine. Without those events, Context Engine cannot reliably invalidate cached state or notify language servers about every file change. Disabling the Context Engine cache removes one source of stale results, but a language server can still return stale information for recently changed files when it did not receive the corresponding change notification.
If a result appears stale after a recent edit, treat it as a limitation of the current experimental container support. Polling-based file watching for containers will be added later.