iterm-mcp
提供对您的 iTerm 会话的访问的模型上下文协议服务器。
特征
高效的令牌使用: iterm-mcp 使模型能够仅检查模型感兴趣的输出。即使对于长时间运行的命令,模型通常也只想查看最后几行输出。
**自然集成:**您可以与模型共享 iTerm。您可以针对屏幕上的内容提问,或将任务委托给模型,并观察其执行每个步骤。
**完全终端控制和 REPL 支持:**该模型可以启动并与 REPL 交互,以及发送控制字符,如 ctrl-c、ctrl-z 等。
依赖关系极少: iterm-mcp 构建时依赖关系极少,可通过 npx 运行。它易于添加到 Claude Desktop 和其他 MCP 客户端。它应该能够正常工作。
安全考虑
- 用户有责任安全使用该工具。
- 没有内置限制:iterm-mcp 不会尝试评估所执行命令的安全性。
- 模型可能会以意想不到的方式运行。用户应监控模型活动并在适当的时候中止运行。
- 对于多步骤任务,如果模型偏离轨道,你可能需要中断它。从较小、重点突出的任务开始,直到你熟悉模型的行为方式。
工具
write_to_terminal
- 写入活动的 iTerm 终端,通常用于运行命令。返回该命令生成的输出行数。read_terminal_output
- 从活动的 iTerm 终端读取请求的行数。send_control_character
- 向活动的 iTerm 终端发送控制字符。
要求
- iTerm2 必须正在运行
- Node 版本 18 或更高版本
安装
要与 Claude Desktop 一起使用,请添加服务器配置:
在 macOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 iTerm:
发展
安装依赖项:
构建服务器:
对于使用自动重建的开发:
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
local-only server
The server can only run on the client's local machine because it depends on local resources.
该 MCP 服务器通过与 Claude Desktop 集成,使用户能够于当前 iTerm2 会话中执行 shell 命令,从而通过模型上下文协议实现无缝命令执行。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityModel Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.Last updated -101,147167JavaScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server built with mcp-framework that allows users to create and manage custom tools for processing data, integrating with the Claude Desktop via CLI.Last updated -325TypeScript
- -securityFlicense-qualityAn MCP server that allows AI assistants like Claude to execute terminal commands on the user's computer and return the output, functioning like a terminal through AI.Last updated -46Python
- -securityFlicense-qualityA simple MCP server that allows running terminal commands with output capture, enabling command execution on the host system from MCP-compatible clients like Claude Desktop.Last updated -1Python