CLI Reference
The Matrix command-line surfaces: mclc, mcl-execute, mcl-tools, mcl-validate, cortex-shell, cortex-mcp, deusctl, and neo, and what each subcommand does.
Matrix ships several CLIs built by make install into ./bin. They share flags like -cortex-root, -manifest, and -skills-root.
mclc -- the compiler
| Subcommand | Purpose |
|---|---|
compile | Compile prose + a skill + a verb into an Intent Frame |
validate | Strict validation of a SKILL.mtx |
hash | Compute the canonical AST digest |
parse | Parse and dump the AST |
./bin/mclc compile -skill skills/writing-plans/SKILL.mtx \
-prose "Build a deployment pipeline" -verb build [-dry-run]
mcl-execute -- the runtime
| Subcommand | Purpose |
|---|---|
walk | Compile an intent, synthesize a PlanTree, and walk it to completion |
classify | Run the materiality classifier on an intent |
loader | Load and inspect an agent manifest + its skills |
daemon | Run the per-user HTTP + SSE daemon |
./bin/mcl-execute walk -prose "Summarise the README" \
-manifest agents/default.json -cortex-root ./runs/dev-cortex -skills-root ./skills
mcl-tools -- MCP tool inspection
| Subcommand | Purpose |
|---|---|
verify | Verify a manifest's tool bijection (declared == discovered) |
list | List tools exposed by the manifest's MCP servers |
describe | Show a tool's schema |
call | Invoke a tool directly |
mcl-validate
Validates a single SKILL.mtx. The mtx-corpus CI job runs this across the whole corpus on every PR.
./bin/mcl-validate skills/<slug>/SKILL.mtx
cortex-shell
Inspect and maintain a cortex store. The load-bearing command is the replay verifier:
cortex-shell rebuild -verify-only # drop derived, rebuild, assert byte-identical OverallRoot
cortex-mcp
An HTTP server that exposes cortex memory verbs as MCP tools. Runs on 127.0.0.1:4242 by default.
Transport: JSON-RPC 2.0 over HTTP POST (MCP Streamable HTTP transport).
Auth: Authorization: Bearer <CORTEX_MCP_TOKEN>
MCP tools
| Tool | Purpose |
|---|---|
cortex_recall | Load all persistent memories (call at session start) |
cortex_guard | Print hard + firm rules fail-closed (call before destructive actions) |
cortex_verify | Tamper-check the memory store (Merkle journal replay) |
cortex_brief | Salience-ranked, budget-bounded context bundle |
cortex_search | Targeted semantic search of persistent memory |
cortex_remember_fact | Store a durable fact |
cortex_remember_preference | Store a stated preference (like/dislike) |
cortex_remember_constraint | Store a standing rule or guardrail |
cortex_remember_decision | Store a locked decision |
cortex_note_outcome | Record the result of a completed task |
Configuration
| Env var | Default | Purpose |
|---|---|---|
CORTEX_MCP_PORT | 4242 | Listen port |
CORTEX_MCP_TOKEN | (empty) | Bearer token for auth |
CORTEX_MEM_SCRIPT | ~/.cursor/cortex-mem.sh | Backend shell script |
Memory types for search
cortex_search accepts an optional type filter: Fact, Preference, Belief, Event, Goal, Constraint, Capability, Pattern, Identity.
deusctl
Operate the Deus marketplace control plane:
| Purpose |
|---|
| Validate service manifests |
| Register and publish services |
| Manage deployments |
| Query analytics and earnings |
go run ./cmd/deusctl manifest validate test/fixtures/proxy-weather.json
neo
Run the Neo conversational agent locally (CLI reporter to stdout/stderr).
./bin/neo
Web Search (MCP stdio)
The web-search MCP server gives Matrix agents real internet search. It pairs with the built-in fetch server: web_search/web_news FIND sources, fetch READS them.
Provider: Tavily (recommended) or Brave Search. Selected by WEBSEARCH_PROVIDER, else auto: Tavily if TAVILY_API_KEY is set, otherwise Brave.
| Env var | Default | Purpose |
|---|---|---|
TAVILY_API_KEY | (required for Tavily) | Tavily API key |
BRAVE_API_KEY | (required for Brave) | Brave Search API key |
WEBSEARCH_PROVIDER | auto | tavily or brave |
WEBSEARCH_TIMEOUT_MS | 15000 | Request timeout |
WEBSEARCH_MAX_RESULTS | 10 | Max results per search (cap 20) |
No API key is required to boot: the server always starts and advertises its tools; a missing key degrades to a structured "not configured" result at call time.
Scaffold tools
Matrix ships scaffold scripts for bootstrapping projects in multiple frameworks:
| Script | Framework |
|---|---|
scaffold-angular.sh | Angular |
scaffold-astro.sh | Astro |
scaffold-cpp.sh | C++ |
scaffold-go.sh | Go |
scaffold-kotlin.sh | Kotlin |
scaffold-nextjs.sh | Next.js |
scaffold-node.sh | Node.js |
scaffold-php.sh | PHP |
scaffold-py.sh | Python |
scaffold-react-router.sh | React Router |
scaffold-rust.sh | Rust |
scaffold-svelte.sh | Svelte |
scaffold-ts.sh | TypeScript |
scaffold-vite.sh | Vite |
scaffold-vue.sh | Vue |
paxeer (MCP stdio)
The paxeer-net MCP server exposes Paxeer blockchain tools to agents: wallet operations, RPC calls, precompile access, PaxScan explorer queries, market data, and agent auth helpers.
media (MCP stdio)
The media MCP server provides media processing tools for agents.
layerx (MCP stdio)
The layerx MCP server bridges agent access to the LayerX settlement fabric: balance queries, payments, receipt lookups, and transfers.
