iTerm2 MCP Server

Terminal session access enabling AI agents to read, write, and execute commands in iTerm2.

Data last scanned today · Reviewed yesterday

422 dangerous tools3 tools565TypeScriptMIT

Overview

iTerm2 MCP Server enables AI models to interact directly with your iTerm session. It provides tools for reading terminal output, writing commands, and sending control characters, allowing models to participate in REPL sessions or observe long-running processes by fetching only relevant output lines. The server is designed for integration with MCP-compatible clients like Claude Desktop. It requires iTerm2 to be active and uses minimal dependencies to maintain a lightweight footprint, facilitating rapid setup through npx or the Smithery CLI.

Our verdict

This server carries a high risk level with a security score of 27/100. It lacks any authentication, meaning any process with access to your configuration can command your terminal, and it provides full write access without a read-only mode. Because it executes commands without safety restrictions, users should only employ this tool for focused, monitored tasks and be prepared to manually interrupt the model if necessary.

  • Minimal dependency footprint with only one direct dependency
  • Supports interactive REPL sessions and control character input
  • Allows models to inspect specific terminal output ranges efficiently
  • Open source project under the MIT license
  • Lacks authentication, allowing unauthorized access to the terminal interface
  • No read-only mode, granting full execution and write capabilities
  • No built-in safety evaluation for executed commands
  • Community-maintained project with no official vendor backing

Setup

Claude Desktop
{
  "mcpServers": {
    "iterm-mcp": {
      "args": [
        "-y",
        "iterm-mcp"
      ],
      "command": "npx"
    }
  }
}

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop. Some servers require API keys or tokens as environment variables — check the project's README and add an "env" object if needed.

  • No read-only mode — running this grants full read/write access.
  • No built-in authentication — anyone with access to this config can invoke every tool it exposes.

Tools

ToolDescriptionRisk
write_to_terminalWrites to the active iTerm terminal, often used to run a command. Returns the number of lines of output produced by the command.high
read_terminal_outputReads the requested number of lines from the active iTerm terminal.low
send_control_characterSends a control character to the active iTerm terminal.high

Compatibility

ClientLocalDockerRemoteRead-only
Claude Desktop
Cursor
VS Code
Windsurf
ChatGPT

Frequently asked questions

What are the system prerequisites for using this MCP server?

You must have iTerm2 running and installed on your machine, and Node.js version 18 or greater is required.

Does the server include any safety mechanisms or command restrictions?

No, the server makes no attempt to evaluate the safety of executed commands. Users are responsible for monitoring model activity and aborting tasks if necessary.

How can I interact with a running process or REPL?

The server provides a specific tool called send_control_character to send inputs like ctrl-c or ctrl-z to the active iTerm terminal.

Can the model handle large amounts of terminal output?

Yes, it is designed to inspect only specific portions of the output, such as the last few lines, which helps manage token usage during long-running commands.

Alternatives

Changelog

Badge

iTerm2 MCP Server security score, rated on RepoAI

Maintain this server? Add the live badge to your README.