iTerm MCP logo

iTerm MCP

Free

集成 macOS 的 iTerm2 终端,让 AI 执行和监控终端命令。

FreeFree tier
Type
Open Source

About iTerm MCP

iTerm MCP is a Model Context Protocol (MCP) server that provides AI models with direct access to an active iTerm2 terminal session. It enables models to execute commands, read terminal output, and send control characters (e.g., Ctrl+C, Ctrl+Z) within the user's iTerm environment. The server is designed for efficient token usage, allowing the model to inspect only the output it needs, and supports natural integration where the user shares the terminal with the AI. Built with minimal dependencies and runnable via npx, it is easy to set up with Claude Desktop and other MCP clients. Key tools include write_to_terminal, read_terminal_output, and send_control_character. Users are responsible for monitoring commands as there are no built-in safety restrictions.

Key Features

Efficient token use: model inspects only relevant output, even for long-running commands
Natural integration: user shares iTerm with the model and can watch each step
Full terminal control and REPL support: model can start and interact with REPLs, send control characters (ctrl-c, ctrl-z)
Minimal dependencies: built with minimal deps, runnable via npx, easy to add to Claude Desktop and other MCP clients
Three primary tools: write_to_terminal, read_terminal_output, send_control_character

Pros & Cons

Pros
  • Efficient token usage reduces cost and latency for long outputs
  • Seamless integration with existing iTerm2 sessions - no need for a separate sandbox
  • Supports full terminal control including control characters for interruption and job control
  • Lightweight and easy to install via npx
  • Open source with MIT license and active development on GitHub
Cons
  • No built-in safety restrictions - user must actively monitor and abort unsafe commands
  • Requires iTerm2 to be running and Node.js 18+ installed
  • Only works on macOS (iTerm2 is macOS-only)

Best For

REPL assistance: let an AI model start and interact with REPL sessions for iterative developmentCLI assistance: delegate command-line tasks to an AI model and monitor its actions in the terminalTerminal monitoring: query the model about current terminal screen contents or output logs

FAQ

What is iTerm MCP?
iTerm MCP is a Model Context Protocol server that provides AI models (like Claude) access to an active iTerm2 terminal session. It allows the model to write commands, read output, and send control characters, enabling REPL and CLI assistance.
What are the requirements to use iTerm MCP?
You need iTerm2 running on macOS, Node.js version 18 or greater, and an MCP-compatible client like Claude Desktop.
How do I install iTerm MCP?
The easiest way is to add the server config to your Claude Desktop configuration file. On macOS it's ~/Library/Application Support/Claude/claude_desktop_config.json, on Windows %APPDATA%/Claude/claude_desktop_config.json. The configuration uses npx to run iterm-mcp directly.
Is iTerm MCP safe to use?
iTerm MCP does not have built-in safety restrictions. The user is responsible for monitoring commands executed by the model. It is recommended to start with small, focused tasks and be ready to interrupt the model if it goes off track.
What tools does iTerm MCP provide?
It provides three tools: write_to_terminal (writes to the active terminal), read_terminal_output (reads requested number of lines from the terminal), and send_control_character (sends control characters like Ctrl+C).