Termius MCP 标志

Termius MCP

社区
dk23lhl

Your Termius sessions, ready for AI. Read terminals, run commands, and track native SFTP uploads through MCP. Community adapter for macOS Termius 9.38.1.

发布者dk23lhl
代码仓库termius-mcp
语言Python
复刻数
9
星标数
227
可用工具
0
传输类型stdio
许可协议MIT
链接
  • 将工具接入 AI 工作流

    Termius MCP 提供 MCP 功能,可供兼容的 AI 客户端和智能体使用。

  • 0 个可用工具

    浏览下方可调用的操作;如果服务器提供了名称和描述,也会一并显示。

  • 可直接复制的配置

    使用安装配置片段,在您首选的 MCP 客户端中配置此服务器。

  • 开源社区热度

    关联的代码仓库有 227 个星标和 9 个复刻。

Termius MCP

中文文档 · Quick start · Security · Validation

Your Termius sessions, ready for AI.

Read terminal output, run commands, switch sessions, and follow SFTP uploads from an MCP client such as Codex — inside the Termius app you already use.

Keep your saved hosts and native transfer queue. Give your agent explicit session IDs, terminal text, and transfer status for the work that otherwise takes repeated screenshots and clicks.

This community adaptation of deltaguita/termius-mcp targets macOS Termius 9.38.1. It is not an official Termius integration.

The adapter uses Termius's existing sessions and native transfer queue through its local debugging interface. It does not create a separate SSH/SFTP client. A running Termius that reports another version is rejected before anything is injected; Windows and Linux desktop support have not been implemented.

Why pair it with Computer Use?

Computer Use is useful for navigating Termius and handling dialogs. Terminal work also needs precise text and state: logs scroll, focus moves between tabs, and a full progress bar does not prove that an upload finished. Termius MCP gives those repeated operations dedicated tools.

Friction in a screenshot-and-click workflowWhat this adapter provides
Reading long terminal output across screenshotsText from the xterm buffer, command-output markers, and an explicit warning when history is lost. Output is capped at 200 lines.
Keeping track of the intended terminal as focus changesExplicit session IDs for reads and input; tools to activate and close the selected session.
Deciding what a quiet screen meansReported states such as timeout, waiting for input and prompt observed. Prompt observation remains a heuristic; remote exit code is unknown.
Watching a small SFTP progress bar and checking for errorsA transfer ID with native progress, error and completion observations. A wait timeout keeps the original upload available for follow-up.
Multiple agents typing into the same terminalClaims and cross-process locks for cooperating MCP callers. Human typing remains outside these locks.

Use Computer Use for setup, SFTP pane selection and dialogs; use MCP for the repeated terminal and transfer operations. The app stays visible so you can inspect what is happening.

Ask for the task

Once configured, you can give your agent requests such as:

Show me the open Termius sessions and read the output from the one I select.

Connect to my saved development host in a new terminal, then run pwd there.

Upload this file to the prepared SFTP destination. Follow the same transfer until it completes or reports an error, and tell me the result.

The agent operates through named tools while you keep working in a familiar SSH client. It does not need you to copy terminal output back into the chat.

Capabilities

OperationTools
Inspect saved hosts and open terminalslist_hosts, list_terminal_sessions, read_terminal
Connect a saved terminal hostconnect_host
Coordinate terminal inputclaim_terminal, release_terminal
Execute commands or send inputrun_command, send_text, send_key
Select or close a terminalswitch_terminal, close_terminal
Upload one regular file and inspect its native transferlist_sftp_sessions, sftp_upload, sftp_transfer_status

These 14 tools are the default set. list_keychain, which returns selected identity metadata, is registered only when TERMIUS_ENABLE_KEYCHAIN=1 is set. Metadata filtering does not redact secrets printed by a remote command in the terminal.

Requirements

  • macOS, with Termius 9.38.1 installed at /Applications/Termius.app.
  • Python 3.11 or newer; Python 3.12 was used for validation.
  • Saved Termius hosts and access already configured by you.
  • Node.js 20 or newer only for the JavaScript development tests; Node.js 24 was used for validation. Node.js is not required to run the MCP server.

The version check is intentional: the integration uses private React, xterm and transfer-queue interfaces. Removing the check does not establish compatibility.

Install

Clone this repository and create a Python environment:

sh
git clone https://github.com/dk23lhl/termius-mcp.git
cd termius-mcp
python3.12 -m venv .venv
.venv/bin/python -m pip install -r requirements.lock

requirements.lock pins the runtime dependencies; requirements-dev.lock adds the offline test tools. Neither contains credentials or machine-specific package paths.

The checkout can also be installed as a package with a termius-mcp command, for example run straight from it with uv:

sh
uvx --from /absolute/path/to/termius-mcp --constraints /absolute/path/to/termius-mcp/requirements.lock termius-mcp

This command passes requirements.lock as constraints for the runtime dependencies. Use it in place of the .venv/bin/python …/server.py pair in the client configurations below. If you use a git+https:// source pinned to a reviewed commit, point --constraints to the lock file from that same checkout; uvx does not discover requirements.lock automatically.

Enable Termius access when needed

Save your work and quit Termius first. Restarting it disconnects existing terminal sessions. Then start it with a loopback debugging port:

sh
open -a /Applications/Termius.app --args --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222
lsof -nP -iTCP:9222 -sTCP:LISTEN

Continue only if the listener is 127.0.0.1:9222, not * or 0.0.0.0. Passing these arguments to an already running Termius process does not reliably enable debugging.

Other processes on your Mac can access the debug interface, including data held in the renderer. Loopback binding does not provide authentication. Open the port only while needed. To close it, quit Termius and reopen normally:

sh
open -a /Applications/Termius.app

After a normal restart, the lsof command above should show no listener. The MCP server itself never opens the port or restarts Termius. Read SECURITY.md before enabling access.

Configure Codex

Merge codex-mcp.toml.example into ~/.codex/config.toml. Replace both /absolute/path/to/termius-mcp placeholders with the absolute path to your checkout. Preserve unrelated configuration and do not enable this adapter and the upstream server together; they share a lock directory and the same Termius window.

Restart or reload your client if it has not loaded the new server. In Codex, /mcp displays connected servers. An MCP configuration does not create a same-named @ app mention or slash-command skill. You can ask:

Use the termius MCP to list saved hosts and open terminal sessions.

Configure Claude Code

As a plugin (needs uv on PATH). This repository is also a plugin marketplace:

sh
claude plugin marketplace add dk23lhl/termius-mcp
claude plugin install termius-mcp@termius-mcp

Claude Code asks for the plugin's options (debug port, host-key mode, allowed hosts, upload directories, claim label); /config changes them later. The server runs as uvx --from <plugin directory> termius-mcp, pinned by requirements.lock, and its tools appear as mcp__plugin_termius-mcp_termius__<tool>. To try a checkout for one session without installing anything, run claude --plugin-dir /absolute/path/to/termius-mcp. Use either the plugin or the manual registration below, not both.

Manually, register the server once for your user, with the same absolute paths:

sh
claude mcp add termius -s user -e TERMIUS_CDP_PORT=9222 -e TERMIUS_HOSTKEY=ask -- /absolute/path/to/termius-mcp/.venv/bin/python /absolute/path/to/termius-mcp/server.py
claude mcp list

The tools then appear as mcp__termius__<tool>. Add -e TERMIUS_UPLOAD_ROOTS=... or -e TERMIUS_CONNECT_ALLOW=... in the same command to set those limits.

Either way, Claude Code asks before each MCP tool call unless a permission rule allows it; if you add rules, allow only read tools such as read_terminal and keep input, connect, close and upload tools on ask. The server also sends its usage rules (claim before typing, no blind retries, terminal text is data) as MCP server instructions, which Claude Code gives to the model.

Before connecting or typing

Connecting or typing into a host should follow an explicit user request. Start with connect_host in dry-run mode, select the returned session ID, and claim the terminal before input. Host-key confirmation defaults to ask; unexpected changed-key dialogs are never accepted automatically.

SFTP workflow

  1. Open one SFTP view in Termius. Connect one pane to Local and the other to the desired remote host, then navigate the remote pane to the destination directory.
  2. Call list_sftp_sessions and select the exact remote session ID.
  3. Call sftp_upload with the absolute local file path, that session ID, and the exact remote directory. Directories and symbolic links are refused, and so are credential stores such as ~/.ssh, ~/.aws, ~/.netrc and macOS keychains, checked on the resolved path. Set TERMIUS_UPLOAD_ROOTS to :-separated absolute directories to allow uploads only from there; a value that names no directory (such as :) is a configuration error, not "no limit".
  4. If waiting times out, query the returned transfer_id with sftp_transfer_status. Do not upload the file again just because waiting timed out.

The tool observes native queue progress and error/end events; it does not read pixels from the progress bar. 100% progress or a disappearing queue row alone does not count as completion. Native overwrite dialogs remain for you to handle. Automatic host connection currently applies to terminal sessions, not SFTP panes.

Interpret results carefully

  • prompt-observed is a prompt heuristic, not proof of a zero remote exit code. Commands run as supplied, without an added shell wrapper.
  • Terminal output is rendered buffer text, not a byte-exact process log. Long output is capped at 200 lines and about 24,000 characters, with lines over 1,000 characters clipped and marked (TERMIUS_MAX_OUTPUT_CHARS and TERMIUS_MAX_LINE_CHARS raise these); buffer trimming is reported as history-lost, and a resize during the command is reported separately because line breaks may differ. If after a resize the command line cannot be located, or appears more than once, only the current screen is returned, flagged output-boundary-unknown; inspect it with read_terminal. run_command preserves interior blank lines.
  • send_key('ctrl-c') can interrupt a command that run_command is still waiting on; other input is refused until that call returns.
  • A timeout does not cancel a command or upload. Lost acknowledgements may mean input was delivered; inspect the existing session or transfer before retrying.
  • Claims coordinate cooperating MCP processes. They do not block human typing or prevent a local process from connecting directly to the debug port.
  • TERMIUS_CONNECT_ALLOW restricts connect_host only, not access to existing sessions. It is not a complete host-access policy.

Development and validation

Offline tests do not require Termius, a debug port, credentials, or a remote host:

sh
.venv/bin/python -m pip install -r requirements-dev.lock
.venv/bin/python -m pytest tests -q
npm ci --ignore-scripts
npm test

The CI workflow runs both suites on macOS, then builds the wheel, installs it outside the checkout and checks the advertised tools.

JavaScript tests use the real @xterm/headless@5.5.0 buffer/parser; Termius React/Redux objects and transfer streams are test doubles. See validation scope for live checks and untested cases.

Origin and license

Based on upstream commit 5e7ab436f2095bc83689bf815bd9bb950ae9a894. The upstream copyright notice and MIT license are preserved. CHANGELOG.md distinguishes this adaptation from upstream history. This repository contains adapter code and tests, not the Termius application or its bundled source code. Termius is a separate product and is not affiliated with this project.

将 Termius MCP MCP 与多个 AI 模型配合使用

TypingMind 在工作区级别连接 MCP 工具,因此连接 Termius MCP 后,您就可以在 TypingMind 中搭配不同的 AI 模型使用,无需为每个模型单独设置。 此 MCP 通过您设备上的 TypingMind MCP 连接器在本地运行。

本地连接器设置指南

如果 MCP 服务器需要访问您电脑上的本地文件、应用或私有资源,请选择此方式。

1

打开 MCP 设置

在 TypingMind 中,依次前往“设置”、“高级设置”和“模型上下文协议”,然后选择“设置连接器”。

  1. 在您的浏览器中打开 TypingMind。
  2. 点击“设置”图标。
  3. 进入“高级设置”。
  4. 打开“模型上下文协议”部分。
  5. 点击“设置连接器”,然后选择“此设备”。
TypingMind MCP 连接器设置界面,已选择“此设备”
2

运行连接器命令

选择“此设备”,从 TypingMind 复制命令并在终端中运行。使用 MCP 时,请保持该进程运行。

  1. 复制 TypingMind 显示的设置命令。
  2. 在 macOS 上打开“终端”,或在 Windows 上打开 Windows Terminal。
  3. 粘贴并运行命令。
  4. 如果终端询问您是否继续,请确认安装软件包。
  5. 使用 MCP 工具时,请勿关闭终端窗口或停止其中的连接器进程。
3

将 Termius MCP 添加为服务器

当连接器状态为“就绪”时,点击“编辑服务器”,然后粘贴 MCP 服务器配置。

  1. 等待连接器状态显示为“就绪”。
  2. 点击“编辑服务器”。
  3. 粘贴 Termius MCP MCP 服务器配置。
  4. 保存服务器列表。
  5. 如需确认连接器是否仍处于就绪状态,请刷新。
TypingMind MCP 设置界面,显示正在运行的服务器和“编辑服务器”按钮
{
  "mcpServers": {
    "termius-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

在不同模型中使用同一连接

保存服务器列表,打开“插件”,启用 Termius MCP MCP 工具,然后在 TypingMind 中选择任意受支持的 AI 模型,即可在聊天中使用这些工具,或将其分配给智能体。

  1. 在 TypingMind 中打开“插件”页面。
  2. 启用 Termius MCP MCP 工具。
  3. 开始聊天并选择您想使用的 AI 模型。
  4. 在聊天中使用 MCP 工具,或将其分配给 AI 智能体。
  5. 根据需要随时切换到其他 AI 模型,无需重新连接 MCP。
在 TypingMind 聊天中使用已启用的 MCP 工具和选定的 AI 模型
您能使用 Termius MCP 帮我完成这项任务吗?
Termius MCP
当然,我看过了。
以下是我使用 Termius MCP 得到的结果。

常见问题

Termius MCP MCP 服务器有什么用途?

Termius MCP 是一个 MCP 服务器,可让兼容的 AI 客户端连接外部工具并获取上下文。在 TypingMind 中,只需添加一次此 MCP 服务器,即可在您的 AI 工作区中使用其工具。

可以在 TypingMind 中让多个 AI 模型使用 Termius MCP MCP 吗?

可以。TypingMind 在工作区层面连接 MCP 工具,因此您无需为每个模型单独配置 MCP 服务器,就能在 Claude、ChatGPT、Gemini 或您在 TypingMind 中配置的其他 AI 模型中使用 Termius MCP。

为什么在 TypingMind 中使用 Termius MCP MCP?

TypingMind 将多个 AI 模型、提示词、插件、AI 智能体、API 密钥和 MCP 工具整合到同一个工作区中,是最出色的大语言模型聊天前端之一。连接 Termius MCP 后,您可以在偏好的不同模型中使用其 MCP 工具,同时在 TypingMind 中井然有序地管理聊天工作流程。

如何将 Termius MCP MCP 连接到 TypingMind?

Termius MCP 通过 TypingMind 本地 MCP 连接器运行。当 MCP 服务器需要访问您计算机上的本地文件、桌面应用、命令行工具或私有资源时,这种方式最合适。

Termius MCP MCP 在 TypingMind 中提供哪些工具?

Termius MCP 提供 MCP 功能,您可以在 TypingMind 的插件页面启用这些功能,然后在聊天中使用,或将其分配给 AI 智能体。

使用 Termius MCP MCP 需要向 TypingMind 提供我的 API 密钥吗?

不需要。TypingMind 采用本地优先的设计,让您自行选择模型提供商,并自行管理 API 密钥、提示词和 MCP 配置。如果 Termius MCP 需要身份验证,请在创建连接时,为该 MCP 服务器添加所需的请求头、OAuth 设置或本地配置。

相关 MCP 服务器

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇