@kaylee1337/mxr
v0.1.19
Published
mxr — AI Model Router CLI
Readme
mxr
AI Model Router command-line client.
Install
npm install --global mxr
mxr loginRequires Node.js 18 or newer.
Commands
Run mxr --help for the current command list.
Long agent sessions compact automatically before the active model reaches its
context limit. Use mxr, then /compact, to compact immediately; /status
shows the current token estimate. Older tool output is pruned automatically,
while goals, decisions, completed work, and relevant files are retained in a
continuation summary.
Use /reasoning to choose auto, none, low, medium, or high. Auto mode
selects a level per request and shows the effective choice in the header, for
example think:auto→medium. Grok 4.5 safely falls back from none to low.
The same default can be set outside the TUI with mxr config --reasoning auto.
The TUI keeps messages left-aligned, persists tool activity as compact cards, and renders file edits as a unified diff in narrow terminals or a side-by-side diff when the terminal is wider than 120 columns. Grok requests reuse a stable prompt cache key and report live streaming progress. Grok 4.3, Grok 4.5, and Grok Build 0.1 are supported by the xAI Responses adapter.
MCP and Codex-format plugins
MXR is an autonomous MCP client; Codex does not need to be installed. Every model available through MXR receives the same connected MCP tools.
Add a Streamable HTTP server:
mxr mcp add docs --url https://example.com/mcpAdd a local STDIO server (the JSON form keeps command arguments portable):
mxr mcp add context7 --command npx --args '["-y","@upstash/context7-mcp"]'Browser automation on Windows using the built-in Edge installation:
mxr mcp add playwright --command npx --args '["-y","@playwright/mcp@latest","--browser=msedge"]'Playwright accessibility snapshots linked from tool output are expanded back into the model context. Screenshot image-content is forwarded through MXR's multimodal message path, so vision-capable models can inspect the actual frame.
Configurations are stored in ~/.mxr/mcp.json. Inside the TUI, /mcp shows
connection state and /mcp reload reconnects all servers. You can also ask the
agent in plain language to install an MCP; it uses the built-in install_mcp
tool, asks for confirmation, saves the config, and connects it immediately.
MXR also accepts plugin packages that use the Codex layout
.codex-plugin/plugin.json plus a manifest mcpServers entry:
mxr plugin install ./my-plugin
mxr plugin install https://github.com/example/my-plugin.gitPlugins are copied into ~/.mxr/plugins, so their original source and a Codex
installation are not needed afterward. MCP tools are namespaced as
mcp__<plugin>__<server>__<tool> to prevent collisions between plugins.
Check for a new release or install it from npm:
mxr update --check
mxr updatemxr checks for releases at most once every 24 hours and only shows a notification by default. Optional automatic updates can be enabled with:
mxr config --auto-update on
mxr config --auto-update off