Skip to content

MCP Server

Attyx ships a built-in Model Context Protocol server, so any MCP client — Claude Desktop, Claude Code, or your own — can drive your terminal: list and create tabs and panes, send keystrokes, read pane output, manage sessions, and check agent status.

Every MCP tool maps to the same IPC command the attyx CLI uses, so anything you can script you can also expose to an agent.

Attyx serves MCP two ways. Both drive the running Attyx instance, so Attyx must be open.

Run the bridge as a subprocess. It speaks newline-delimited JSON-RPC 2.0 over stdin/stdout and forwards each call to your running instance:

Terminal window
attyx mcp

Point a client at it with:

{
"mcpServers": {
"attyx": { "command": "attyx", "args": ["mcp"] }
}
}

The stdio bridge works regardless of the [mcp] config below — it’s owned by the trusted parent process, so there’s no auth.

While the UI is open, Attyx also serves a Streamable-HTTP endpoint (POST-only — no SSE) at:

http://127.0.0.1:7333/mcp

Point an HTTP-capable client at the URL:

{
"mcpServers": {
"attyx": { "url": "http://127.0.0.1:7333/mcp" }
}
}

This matches how other local desktop apps expose MCP. Use it when a client can’t spawn a subprocess, or when you want a single always-on endpoint.

The HTTP listener is controlled by the [mcp] section of your config:

[mcp]
enabled = true
host = "127.0.0.1"
port = 7333
OptionTypeDefaultDescription
enabledbooleantrueServe the HTTP endpoint at http://<host>:<port>/mcp while the UI is open
hoststring"127.0.0.1"Bind address. Keep this on loopback — the tools run arbitrary commands in your terminal, so never expose them to the network
portinteger7333HTTP listen port. Set to 0 to disable the HTTP listener while keeping the stdio bridge available

These settings hot-reload — see Configuration.

All tools take an optional session id to target a specific session (omit for the current one). Pane-scoped tools take an optional pane id (omit for the focused pane).

ToolDescription
listList the full session / tab / pane tree
list_tabsList tabs in the current (or targeted) session
list_panesList panes with their stable IPC ids
list_agentsList AI agents running in panes with their status and a usage object (tokens, cost, context window, model). Returns JSON
get_textCapture a pane’s visible screen text; with lines, capture that many trailing rows from scrollback
ToolDescription
send_keysSend keystrokes/text to a pane. Supports C-style escapes (\n, \t, \x03) and named keys like {Enter} {Down}
send_imageAttach an image to a pane (e.g. hand Claude Code a screenshot). Provide path (a file on disk) or data (base64 bytes). The path is injected as a bracketed paste; Enter is not pressed
focusMove keyboard focus between panes (up/down/left/right)
scrollScroll the focused pane (top/bottom/page_up/page_down)
ToolDescription
tab_createOpen a new tab, optionally running a command. With wait=true, blocks until it exits and returns the exit code + output
tab_closeClose a tab (1-based number) or the active tab
tab_selectSwitch to a tab by 1-based index (1–9)
tab_switchSwitch to the next or prev tab
tab_moveMove the active tab left or right
tab_renameRename a tab (1-based number) or the active tab
ToolDescription
splitSplit the focused pane (vertical/horizontal), optionally running a command. With wait=true, blocks until it exits
split_closeClose a pane by id, or the focused pane
split_rotateRotate the pane layout
split_zoomToggle zoom (maximize) for a pane
ToolDescription
session_listList all sessions
session_createCreate a session; with background=true, don’t switch to it
session_killKill a session by id
session_switchSwitch the active window to a session by id
session_renameRename a session (or the current one)
ToolDescription
theme_setSwitch the active color theme by name
config_reloadReload the Attyx config from disk
popupOpen a floating popup pane running a command

There is no watch_agents tool — MCP calls are request/response, so streaming doesn’t fit. Poll list_agents instead. To stream agent state changes, use the CLI’s attyx watch agents.

Claude Code — install the Attyx skill and let Claude Code drive your terminal

Agent Workflows — orchestrate multi-pane agent workflows

Integration — the attyx CLI surface these tools mirror