AI apps (MCP)
ZestSSH 4.1 can be used by your own AI app: Claude Code, Cursor, VS Code, Windsurf, or any other app that speaks MCP (the Model Context Protocol). The AI app can see the hosts of your own list, open sessions on them in ZestSSH, read a session once you allow it, and run commands that you allow one at a time.
What an AI app can do
Section titled “What an AI app can do”| Tool | What it does | What you decide |
|---|---|---|
list_hosts |
Lists the hosts of your own (Personal) list: name, address, port, user, protocol, group, tags, and whether a session is open. It can filter by text. | Nothing to allow. No password, key, note or start-up command is ever given. |
list_sessions |
Lists the terminal sessions open on those hosts. | Nothing to allow. |
open_session |
Opens a session to a host in ZestSSH, where you see it, or gives the one already open. SSH, Mosh and Eternal Terminal hosts only. | From 4.3, asked once for each host and app: Let Claude Code open a session to web-01?, Open it or Don’t allow. The session opens as if you opened it: the host’s start-up command runs and its automatic port forwards start. A session already open is handed back without asking. ZestSSH also asks what it would ask you anyway, such as a new host key or a password. |
read_output |
Returns the last lines a session’s terminal shows, its scrollback included (100 by default, up to 2,000). | Asked once for each session and each app: Allow reading or Don’t allow. |
run_command |
Types one command line into a session’s terminal, where you see it, and returns what it printed. | Asked for every command, with the command shown in full: Run it or Don’t allow. |
Every question appears in ZestSSH’s own window, which comes to the front. Nothing answered within 2 minutes counts as Don’t allow. Enter does not answer Run it: click it, or Tab to it first. A command that ZestSSH’s dangerous command check flags (rm -rf, reboot, shutdown and the like) shows a warning in the question, whether Dangerous command protection is on or off.
A command is one line: text with a line break or another control character is refused before you are asked. From 4.3 so is a command with a tab, a line or paragraph separator, or any space other than the plain one, since such a character could hide part of the command from you. The question shows the command in the terminal’s font, in a box that scrolls, with the danger warning above it; a character that would draw as nothing is written as its code (such as U+3164), and a command over 200 characters says its length (“Length: 250 characters”).
What you allowed for an app is kept until ZestSSH locks, AI apps is turned off or gets a new token, or the session ends (for reading). A question is answered only while the server still runs with the same token and ZestSSH has not locked meanwhile; otherwise nothing is typed. Locking takes back every question and every call under way.
A command is typed into the terminal as it is at that moment: at a prompt it runs, but in a full-screen program (an editor, top) or a password prompt it is typed there instead, and after a line you started typing it is added to it. Check the session before you allow it.
Most AI apps give up on a tool call after 60 seconds, while ZestSSH’s question waits 2 minutes. When the AI app gives up, the question is taken back and nothing is typed; if you need longer to decide, raise the AI app’s tool timeout (Claude Code: MCP_TOOL_TIMEOUT, in milliseconds). From 4.3 a question’s 2 minutes count from when its request arrived, and at most 3 questions wait behind the one on screen: a request past that gets an error saying you have questions waiting.
Team hosts are not offered in this preview: a team’s hosts, its sessions and its vaults stay out of reach of AI apps.
Turn it on
Section titled “Turn it on”- Open Settings > AI apps.
- Turn on Let AI apps use ZestSSH. Status says Listening at http://127.0.0.1:47390/mcp, on this computer only.
- Under Set up an AI app, copy the setup for your app. It has your token in it, and the clipboard clears it after 3 minutes.
Claude Code
Section titled “Claude Code”Click Claude Code command and paste it into a terminal. It looks like this:
claude mcp add --transport http zestssh http://127.0.0.1:47390/mcp --header "Authorization: Bearer zmcp_..."Cursor, VS Code, Windsurf and others
Section titled “Cursor, VS Code, Windsurf and others”Click JSON setup and paste it where your app takes MCP servers (Cursor: ~/.cursor/mcp.json; VS Code: the mcp.json of your user or workspace, where the top key is servers rather than mcpServers):
{ "mcpServers": { "zestssh": { "type": "http", "url": "http://127.0.0.1:47390/mcp", "headers": { "Authorization": "Bearer zmcp_..." } } }}Claude Desktop
Section titled “Claude Desktop”Claude Desktop starts MCP servers as programs. Use the mcp-remote bridge (it needs Node.js) in claude_desktop_config.json, with your token in place of zmcp_.... The header goes through an environment value, as a space inside an argument can be split on Windows:
{ "mcpServers": { "zestssh": { "command": "npx", "args": ["mcp-remote", "http://127.0.0.1:47390/mcp", "--header", "Authorization:${ZESTSSH_AUTH}"], "env": { "ZESTSSH_AUTH": "Bearer zmcp_..." } } }}Security
Section titled “Security”- Your computer only. ZestSSH listens on 127.0.0.1, never on a network, and only while the switch is on and ZestSSH is unlocked. While ZestSSH is locked every tool answers that it is locked.
- A token. Every request must carry the access token (
Authorization: Bearer ...), compared in constant time. New token in Settings ends the old one at once; set your AI apps up again with the new one. Keep the token like a password: another program on your computer that has it can ask what your AI app asks, though every command still waits for you. - Limits. From 4.3 a request’s body must arrive within 10 seconds (else 408), at most 16 requests are served at once (else 503), and no token is made or kept while AI apps is off.
- Not a web page. A request that a browser sends for a web page (one with another site’s
Origin, aHostthat is not this computer, or a cross-site fetch) is refused, so a page you visit cannot use ZestSSH. - You allow what reaches a host. Opening a session is allowed per host, reading a session per session, running a command per command, in ZestSSH’s window: an AI app cannot answer for you.
- Secrets stay. Passwords, keys, notes, start-up commands and environment values are never given. A terminal shows what it shows, though: anything printed in a session you let an AI app read reaches it.
- What AI apps did in Settings lists the last 20 things AI apps did, newest first, with the app’s name (as the app gave it), the host and the command. What the hosts printed is not kept. The same entries are in your automation history.
ZestSSH listens on port 47390. If another program uses it, Status says so: set another Port (1024 to 65535) and set your AI apps up again with the new address.
Protocol
Section titled “Protocol”ZestSSH serves MCP over Streamable HTTP, revisions 2026-07-28 (without the handshake) and 2025-11-25 back to 2025-03-26 (with initialize), with tools only. Its answers are single JSON responses.