Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
serverNoPassed as rex -S SERVER. Unset means the local server.
rexPathNoThe rex executable.rex
allowLuaNoAllow rex_action_do with script, and init.lua actions.false
stateFileNoWhere the set of created sessions is kept. Relative paths resolve against the repo directory..state/owned.json
REX_MCP_CONFIGNoPath to the rex-mcp config file. If set, it replaces the default config path; the default is rex-mcp.config.json in the repo directory.
unblockMethodsNoBlocked API methods to allow, such as server.stop. Patterns ending in .* match a prefix (a JSON array; default is empty).[]
writeAllowlistNoSession IDs or labels rex-mcp may write to besides the ones it created (a JSON array; default is empty).[]
allowClientActionsNoAllow actions performed by a connected Rex app, and client.perform.false

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
rex_statusA

Rex server identity and version, the sessions rex-mcp owns, and the active policy flags.

rex_listB

List sessions, windows, blocks, or clients. session is required for windows and blocks.

rex_session_viewC

Snapshot of a session: windows, layouts, blocks, focus (session.view).

rex_captureB

Screen and scrollback of a terminal block. Without block, the focused block of the session's default window.

rex_block_infoB

Block details and methods (rex block inspect), plus the terminal process state.

rex_send_textB

Type text into a terminal (rex send, text on stdin). enter: true presses Return afterwards.

rex_send_keysB

Press keys in a terminal (rex send-key), e.g. ["ctrl+c"] or ["enter"].

rex_runA

Run a command in a new block (a new window, or a split beside anchor_block). Never takes focus. With wait_seconds, wait until the command exits, return its screen as output, and close the block (and its window, when this block was the only one). That is the default for a one-off command. Set keep_open true to leave the block up after it exits, for a dev server or an interactive agent. If the wait times out, the program is still running and the block stays open; close it with rex_block_close if you are done with it. Without wait_seconds the call returns once the block exists and does not close it. Rex closes that block when the program exits, unless keep_open is true. Nothing is closed for being idle. A long-lived program closes its own block when it finishes by running rex-mcp close (see the README). That command refuses wispy-fjord, tmux session claude-rc, and claude --remote-control.

rex_session_createA

Create a session (rex new). rex-mcp owns it, so it may write to it. Returns its ID and first block ID. The session stays up for as long as its programs do; it is not closed for being idle. Prefer rex_run with wait_seconds for a one-off command, which closes that block when the command exits. A program in this session can close its own block when it finishes by running rex-mcp close.

rex_session_killB

Kill a session (rex kill) and drop it from the owned set.

rex_block_closeB

Close a block and end its program (rex block close). Rex closes the window too when that was its last block. Never closes a block for being idle, and never closes any other block.

rex_events_pollA

Long-poll buffered Rex server events after cursor (0 = oldest). Returns events and the next cursor; dropped: true means events after your cursor fell out of the buffer.

rex_waitA

Wait on a block. until: exit waits for the terminal's program to exit; until: match polls the capture for pattern (a JS regex). Returns {done, timed_out, exit_code?, match?}.

rex_api_listB

API methods the server offers, each tagged with its rex-mcp policy class.

rex_api_describeB

Schemas and examples for one API method (rex api describe --json).

rex_api_callB

Call any API method (rex api call). Policy class comes from the method table; writes need an owned or allowlisted session via session or args.session_id.

rex_actions_listC

Actions the server offers (init.lua and block types), or those a client reported with client.

rex_action_doB

Perform an action (rex do NAME --args JSON) or run Lua (script). Block actions need a writable session; init.lua actions and scripts need allowLua; client actions need allowClientActions.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.2/5.0

Scored across 18 tools

Disambiguation4/5

Most tools target a distinct resource and action, such as capture vs. block_info and send_text vs. send_keys. There are a few areas an agent could hesitate over, especially status/list/session_view and actions vs. API methods, but the descriptions generally clarify the boundaries.

Naming Consistency3/5

All names use the rex_ prefix and snake_case, which keeps them readable. However, the ordering is mixed: some are resource_action (session_create, api_call), some are action_resource (send_text, send_keys), and some are bare verbs (list, run, wait).

Tool Count3/5

At 18 tools, the surface is borderline heavy for this domain. The generic API and action layers add useful power, but they also contribute overlapping discovery/execution paths that make the set feel larger than strictly necessary.

Completeness4/5

The suite covers session/block lifecycle, input/output, waiting, event polling, and generic API/action escape hatches, so agents are unlikely to hit dead ends. Explicit gaps exist around finer-grained window/focus management, but rex_api_call and actions can generally compensate.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues