MCP
MCP Overview
Let an AI agent see your open SSH tabs and run commands against them over a local MCP endpoint.
Ternux ships a local Model Context Protocol server. Once enabled, any MCP-compatible AI client (Claude Code, Claude Desktop, or another MCP agent) can connect over HTTP on 127.0.0.1 and use two tools: list which SSH tabs you have open, and run a shell command against one of them.
Design
- Scoped to what's already open. The agent can only see and use SSH sessions you already opened yourself in Ternux. It cannot supply a host, user, or password to open a new connection — every tool call is resolved against a
session_idfrom your live session list. - Local only. The server binds to
127.0.0.1and is never reachable from the network. - Token-authenticated. Every request needs a bearer token generated in Settings — there's no unauthenticated access.
- Fresh exec channel, not your terminal. Commands run over a brand-new SSH connection reusing the same credentials, separate from the interactive PTY in your tab. Nothing you type in the agent's commands appears in your terminal, and vice versa.
- Audited. Every tool call — success, failure, or denial — is written to the Audit Log, viewable from Fleet → Audit Log (see Connections).