iTerm MCP

iTerm MCP

Integration with iTerm2 terminal emulator for macOS, enabling LLMs to execute and monitor terminal commands.

488
Stars
54
Forks
12
Releases

Overview

Iterm-mcp is a Model Context Protocol server that provides access to your iTerm session. It enables the model to observe terminal output efficiently by focusing on the portion of the stream it needs, typically the last few lines, enabling efficient token usage. The server supports natural integration by sharing the iTerm session with the model, allowing it to ask questions about what's on screen or delegate tasks and watch it execute steps. It provides full terminal control and REPL support, enabling the model to start and interact with REPLs and send control characters (e.g., ctrl-c, ctrl-z). It is designed with minimal dependencies and can run via npx, facilitating easy integration with Claude Desktop and other MCP clients. Tools exposed include write_to_terminal (writes commands to the active terminal and returns lines of output), read_terminal_output (reads a requested number of lines), and send_control_character (sends control characters). Requirements include iTerm2 running and Node 18+. The README also covers installation via Claude Desktop config or Smithery, and development/debugging approaches using the MCP Inspector.

Details

Owner
ferrislucas
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

Efficient Token Use

The model can inspect only the output it is interested in, typically the last few lines of output even for long running commands.

Natural Integration

Share iTerm with the model. You can ask questions about what's on the screen, or delegate a task to the model and watch as it performs each step.

Full Terminal Control and REPL support

The model can start and interact with REPLs as well as send control characters like ctrl-c, ctrl-z, etc.

Easy on the Dependencies

Built with minimal dependencies and runnable via npx. It's designed to be easy to add to Claude Desktop and other MCP clients; it should just work.

Tool: write_to_terminal

Writes to the active iTerm terminal, often used to run a command. Returns the number of lines of output produced by the command.

Tool: read_terminal_output

Reads the requested number of lines from the active iTerm terminal.

Tool: send_control_character

Sends a control character to the active iTerm terminal.

Audience

MCP clientsIntegrate iTerm2 with LLMs; monitor and control terminal sessions via MCP.

Tags

iTerm2terminalMCP serverREPLterminal automationClaude DesktopSmitherynpxCLI