MM

michaellee8/mcp-tui-driver

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

34 stars 5 forks 质量 69 趋势 12MIT

MCP服务器,用于无头TUI自动化。使LLM能够通过模型上下文协议(MCP)运行、查看并与终端应用交互。

概览

MCP服务器,用于无头TUI自动化。使LLM能够通过模型上下文协议(MCP)运行、查看并与终端应用交互。 编辑配置文件:- : ~/Library/Application Support/Claude/claude_desktop_config.json - : %APPDATA%\Claude\claude_desktop_config.json 编辑 ~/.cursor/mcp.json(或在你的项目根中用 .cursor/mcp.json): 编辑 ~/.codeium/windsurf/mcp_config.json: - : 使用完整路径(例如 /Users/ /.cargo/bin/mcp-tui-driver) - : 运行 chmod +x $(该 mcp-tui-driver ) - : 在服务器配置中添加 “env”: {“RUST_LOG”: “debug”} - 同时启动和管理多个 TUI 会话 - 将终端内容以纯文本或无障碍快照形式读取 - 发送键盘输入(按键、文本、修饰键组合)- 鼠标操作(点击、双击、右键)- 等待屏幕内容或空闲状态 - 截取终端输出的 PNG 截图 - 复杂自动化工作流程的 JavaScript 脚本 - 会话管理(调整大小、信号、信息)- 会话......

概述(AI 翻译)

剧作家MCP,但适用于TUI应用。

MCP服务器,用于无头TUI自动化。使LLM能够通过模型上下文协议(MCP)运行、查看并与终端应用交互。

快速安装

MCP 配置

Claude 代码(CLI)

编辑 ~/.claude/settings.json:

Claude Desktop

编辑配置文件:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

光标

编辑 ~/.cursor/mcp.json(或在你的项目根中写成.cursor/mcp.json):

VS 代码(继续扩展)

编辑 ~/.continue/config.json:

风帆冲浪(Codeium)

编辑 ~/.codeium/windsurf/mcp_config.json:

OpenAI Codex CLI

编辑 ~/.codex/config.json:

故障排除

  • 二进制未找到:使用完整路径(例如,/Users/ /.cargo/bin/mcp-tui-driver)
  • 许可被拒:运行chmod +x $(which mcp-tui-driver)
  • 调试日志:在服务器配置中添加"env": {"RUST_LOG": "debug"}

特色

  • 同时启动和管理多个TUI会话
  • 将终端内容以纯文本或无障碍快照形式读取

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

mcp-tui-driver

Playwright MCP, but for TUI apps.

MCP server for headless TUI automation. Enables LLMs to run, view, and interact with terminal applications through the Model Context Protocol (MCP).

Quick installation

cargo install --git https://github.com/michaellee8/mcp-tui-driver

MCP Configuration

Features

  • Launch and manage multiple TUI sessions concurrently
  • Read terminal content as plain text or accessibility-style snapshots
  • Send keyboard input (keys, text, modifier combinations)
  • Mouse interaction (click, double-click, right-click)
  • Wait for screen content or idle state
  • Take PNG screenshots of terminal output
  • JavaScript scripting for complex automation workflows
  • Session management (resize, signals, info)
  • Session recording to asciicast format for playback with asciinema

Session Recording

TUI sessions can be recorded to asciicast v3 format files (.cast) for later playback with asciinema or other compatible players.

Enabling Recording

To enable recording, pass a recording configuration when launching a session:

{
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "tui-driver": { "command": "mcp-tui-driver", "args": [] } } }