iTerm MCP Server
iterm-mcp
A Model Context Protocol server that provides access to your iTerm session.
Features
- Efficient Token Use: Only the visible content of the terminal is passed to the model. The model can retrieve content that's not visible if necessary.
- Supports Long-Running Processes: iterm-mcp knows when the terminal is waiting for user input. Long-running processes are handled gracefully.
- Interrupt When Needed: Send control characters to the terminal to interrupt processes.
- Inspect Terminal Activity: Gives the model visibility into the current terminal content.
<a href="https://glama.ai/mcp/servers/h89lr05ty6"><img width="380" height="200" src="https://glama.ai/mcp/servers/h89lr05ty6/badge" alt="iTerm Server MCP server" /></a>
Tools
write_to_terminal
- Writes to the active iTerm terminal, often used to run a command.read_terminal_output
- Reads the output from the active iTerm terminal.send_control_character
- Sends a control character to the active iTerm terminal.
Installation
To use with Claude Desktop, add the server config:
On macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
Installing via Smithery
To install iTerm for Claude Desktop automatically via Smithery:
Development
Install dependencies:
Build the server:
For development with auto-rebuild:
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.
This MCP server enables users to execute shell commands in the current iTerm2 session through integration with Claude Desktop, facilitating seamless command execution via the Model Context Protocol.