MCP agents

MCP lets Codex, Claude Code, or Antigravity CLI use DR-Terminal tools. An agent can inspect sessions and saved connections, open a connection, read terminal output, type commands, transfer files, and navigate the app. MCP Mode is available during an active trial and with Pro.

Add DR-Terminal to an agent

  1. Click MCP in the DR-Terminal title bar.
  2. Choose Add to Codex, Add to Claude, or Add to Antigravity. This creates a user-level dr-terminal entry that runs the packaged DR-Terminal bridge; no token or endpoint is stored in the client configuration. Antigravity 2.0, Antigravity IDE, and agy share this entry in ~/.gemini/config/mcp_config.json.
  3. Choose Open or open the client normally. The first connection raises DR-Terminal and asks you to Allow or Deny it.
  4. After allowing the connection, paste the first prompt and send it.
Show my active DR-Terminal sessions.

The selected CLI must be installed and available in PATH. Installation is supported from an installed DR-Terminal package; development runs from Gradle or an IDE deliberately do not create a persistent entry. Remove deletes only an exact DR-Terminal-owned entry and asks for confirmation. A different existing dr-terminal entry is reported as a conflict and is never overwritten.

Useful prompts

Use a session name or identifier when more than one session is open. If an agent reports that no session exists, open a connection in DR-Terminal or ask the agent to list saved connections first.

Approvals and indicators

Reading session metadata and terminal output does not normally interrupt your work. Sensitive actions such as typing, pressing keys, transferring files, and disconnecting require your approval.

When approval is needed, the MCP chip pulses and the confirmation dialog receives keyboard focus. Review the target session and payload, then choose Allow once, Allow for this session, or Deny. The affected session tab has a static MCP marker while an action is running; the chip color shows the global MCP state.

The agent never receives passwords or private keys saved by DR-Terminal. Approval for a session applies only while the current MCP server run remains active.

Local connection security

The MCP server listens only on the loopback interface, so it is not exposed to the network. Every request still requires a bearer token stored in an owner-only local file. The title-bar popover never displays or copies that token.

The endpoint is shown only under Endpoint and recent actions for diagnostics. Do not share the token file or copy its contents into prompts, chat messages, logs, or screenshots.

Stop MCP

Choose Stop in the MCP popover to reject any pending approval, stop accepting tool calls, and close clients launched by the current MCP run. Starting MCP again creates a fresh run; previous session approvals do not carry over.

Clicking the MCP badge only opens the popover. It never starts the server implicitly. Use the explicit Start MCP action for a manual run; a registered client can also start it through the visible connection approval flow.

Troubleshooting

CLI not found

Install the selected Codex, Claude Code, or Antigravity CLI (agy) and make sure its executable is available in PATH. Restart DR-Terminal after changing your shell environment, then choose Check again.

Port already in use

Another process is using the configured MCP port. Stop that process or select another port under Settings → MCP Mode, then start MCP again.

No active session

Open an SSH, Telnet, serial, or local terminal session first. You can also ask the agent to show saved connections and open one after you approve the action.

Client is running but MCP is not confirmed

The CLI process started, but DR-Terminal has not yet received an MCP tool call. Check the new terminal tab for login, configuration, or handshake errors. Then send the sample prompt again. Running describes the local process, not a confirmed MCP connection.

An approval dialog is waiting

Return to DR-Terminal and review the focused dialog. The agent cannot continue that sensitive action until you allow or deny it. Stopping MCP denies the pending request.