rex-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| server | No | Passed as rex -S SERVER. Unset means the local server. | |
| rexPath | No | The rex executable. | rex |
| allowLua | No | Allow rex_action_do with script, and init.lua actions. | false |
| stateFile | No | Where the set of created sessions is kept. Relative paths resolve against the repo directory. | .state/owned.json |
| REX_MCP_CONFIG | No | Path 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. | |
| unblockMethods | No | Blocked API methods to allow, such as server.stop. Patterns ending in .* match a prefix (a JSON array; default is empty). | [] |
| writeAllowlist | No | Session IDs or labels rex-mcp may write to besides the ones it created (a JSON array; default is empty). | [] |
| allowClientActions | No | Allow 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
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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. |
| rex_session_viewC | Snapshot of a session: windows, layouts, blocks, focus (session.view). |
| rex_captureB | Screen and scrollback of a terminal block. Without |
| 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). |
| 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 |
| 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_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 |
| rex_waitA | Wait on a block. |
| 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 |
| rex_actions_listC | Actions the server offers (init.lua and block types), or those a client reported with |
| rex_action_doB | Perform an action (rex do NAME --args JSON) or run Lua ( |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 18 tools
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.
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).
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.
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.