Motty
Assistant

MCP server

Let external agents use your sessions through a local, token-protected server.

An optional MCP server exposes the same session tools to external agents such as Claude Code.

It is off by default, listens on loopback only, and requires a bearer token.

Enable it

In Settings > AI assistant, turn on Allow external agents (MCP). The page then shows the endpoint and the access token, with a button to copy the client configuration. Resetting the token disconnects every client.

Access level

LevelWhat a client can do
ObserveRead only.
AskAlso run commands, each one approved in Motty first.

Tools

ToolDoes
list_sessionsList open sessions.
terminal_readRead a terminal's content.
terminal_exec, terminal_exec_manyRun commands in a terminal.
sftp_list, sftp_readList and read remote files.
sftp_write, sftp_removeChange remote files.

In Observe mode only the read tools are available.

Clients that only speak stdio

motty mcp-bridge relays MCP over stdio to the running application:

MOTTY_MCP_TOKEN=<token> motty mcp-bridge --url http://127.0.0.1:<port>/mcp

The token goes in an environment variable because a flag would show in the process list.

Anyone who has the token can use the access level you chose. Keep it out of shared configuration.

On this page