
一个强大的模型上下文协议(MCP)服务器,操控着iTerm2终端。
概览
终端控制的MCP服务器。通过WebSocket API支持iTerm2(macOS)和通过直接命令支持tmux(跨平台)。 - - 适用于装修型工具的全面Alt键组合 - Alt + 字母(a-z):alt-a到alt-z - Alt + Shift + 字母:大写字母从alt-shift-a到alt-shift-z——Alt + 数字(0-9):alt-0到alt-9 - Alt + 导航键:方向键、主键、结束键、翻页键、翻页键 - Alt + 功能键(F1-F12):alt-f1到alt-f12 - Alt + 特殊键:tab、回车、空格、退格键 - 使用标准终端转义序列(ESC前缀和CSI修饰符) - 启用 Python API:iTerm2 →偏好设置 → 通用 → 魔法 →启用“Python API” - 安装 tmux:brew install tmux / apt install tmux / 等等。 添加到 ~/Library/Application Support/Claude/claude_desktop_config。
概述(AI 翻译)
终端控制的MCP服务器。通过WebSocket API支持iTerm2(macOS)和通过直接命令支持tmux(跨平台)。
📋 最新发布版本(v1.3.0 - 2025-09-03)
添加
- Alt键支持 -
mcpretentious-type工具的全面Alt键组合 - Alt + 字母(a-z):
alt-a至alt-z - Alt + Shift + 字母:
alt-shift-a到alt-shift-z表示大写 - Alt + 数字(0-9):
alt-0至alt-9 - Alt + 导航键:箭头键、主页键、结束键、翻页键、下页键
- Alt + 功能键(F1-F12):
alt-f1到alt-f12 - Alt + 特殊键:Tab、回车、空格、退格
- 使用标准终端转义序列(ESC前缀和CSI修饰符)
完整更新日志请参见 CHANGELOG.md
安装
先决条件
iTerm2(macOS):
- 启用 Python API:iTerm2 →偏好设置 → 通用 → 魔法 →启用“Python API”
TMux(任何平台):
- 安装 tmux:
brew install tmux/apt install tmux/ 等。
配置
克劳德桌面
补充到~/Library/Application Support/Claude/claude_desktop_config.json:
克劳德·科德
主要应用
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCPretentious - Universal Terminal MCP
MCP server for terminal control. Supports iTerm2 (macOS) via WebSocket API and tmux (cross-platform) via direct commands.
📋 Latest Release (v1.3.0 - 2025-09-03)
Added
- Alt key support - Comprehensive Alt key combinations for
mcpretentious-typetool- Alt + Letters (a-z):
alt-athroughalt-z - Alt + Shift + Letters:
alt-shift-athroughalt-shift-zfor uppercase - Alt + Numbers (0-9):
alt-0throughalt-9 - Alt + Navigation keys: arrow keys, home, end, pageup, pagedown
- Alt + Function keys (F1-F12):
alt-f1throughalt-f12 - Alt + Special keys: tab, enter, space, backspace
- Uses standard terminal escape sequences (ESC prefix and CSI modifiers)
- Alt + Letters (a-z):
For full changelog, see CHANGELOG.md
Installation
npm install -g mcpretentious
Prerequisites
iTerm2 (macOS):
- Enable Python API: iTerm2 → Preferences → General → Magic → Enable “Python API”
TMux (any platform):
- Install tmux:
brew install tmux/apt install tmux/ etc.
Configuration
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcpretentious": {
"command": "npx",
"args": ["mcpretentious"]
}
}
}
Claude Code
claude mcp add mcpretentious npx mcpretentious
Main Applications
- TUI application testing: Simulates all human interactions - keyboard, mouse, screen reading
- Remote server management: Persistent terminal sessions allow remote system control over SSH
Features
- Multiple backends: iTerm2 (WebSocket, 20x faster than AppleScript) and tmux (direct commands)
- No focus stealing: Background terminal control
- Real terminal IDs: Access existing terminals, not just MCP-created ones
- Screen reading: Actual viewport content with cursor position and colors
- Mouse support: Full SGR protocol (click, drag, scroll) in both backends
- Token-optimized screenshots: 85-98% reduction via layered format
Backend Comparison
| Feature | iTerm2 | TMux |
|---|---|---|
| Platform | macOS | Cross-platform |
| Method | WebSocket + Protobuf | Direct commands |
| Performance | Fastest | Fast |
| Colors | Full RGB | ANSI 256 |
| Authentication | Cookie/key | Unix permissions |
Tools
mcpretentious-open- Create terminal sessionmcpretentious-type- Send text/keys/ASCII codesmcpretentious-screenshot- Get screen content (configurable layers)
安装
npx mcpretentious配置
{
"mcpServers": {
"mcpretentious": {
"command": "npx",
"args": ["mcpretentious"]
}
}
}