by ferrislucas
Provides a Model Context Protocol server that lets AI models execute commands, read output, and send control characters in the current iTerm session, enabling seamless REPL and CLI assistance.
Iterm Mcp enables an AI model to interact directly with an active iTerm2 terminal. It can run commands, fetch specific lines of output, and send control characters such as Ctrl‑C or Ctrl‑Z, allowing the model to operate like a human user inside the shell.
claude_desktop_config.json
and adding:
{
"mcpServers": {
"iterm-mcp": {
"command": "npx",
"args": ["-y", "iterm-mcp"]
}
}
}
write_to_terminal
, read_terminal_output
, send_control_character
) in your prompts to let the model control the terminal.yarn install
, then yarn run build
(or yarn run watch
for auto‑rebuild). Debug with the MCP Inspector (yarn run inspector
).npx
command, no heavy setup.Q: Do I need any special permissions? A: The tool only requires that iTerm2 is running and that the user running the server has permission to control the terminal.
Q: Is there any safety built‑in to prevent dangerous commands? A: No. The user is fully responsible for monitoring and aborting any unsafe activity.
Q: Can I use Iterm Mcp on Linux? A: It is designed for iTerm2, which is macOS‑only. Windows users can use the provided config path, but the underlying terminal must be iTerm2 via macOS.
Q: How do I debug communication issues?
A: Use the MCP Inspector (yarn run inspector
) which provides a web UI to view the stdio exchange between the client and server.
Q: What Node version is required? A: Node 18 or newer.
A Model Context Protocol server that provides access to your iTerm session.
Efficient Token Use: iterm-mcp gives the model the ability to inspect only the output that the model is interested in. The model typically only wants to see the last few lines of output even for long running commands.
Natural Integration: You 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 REPL's as well as send control characters like ctrl-c, ctrl-z, etc.
Easy on the Dependencies: iterm-mcp is built with minimal dependencies and is runnable via npx. It's designed to be easy to add to Claude Desktop and other MCP clients. It should just work.
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.read_terminal_output
- Reads the requested number of lines from the active iTerm terminal.send_control_character
- Sends a control character to the active iTerm terminal.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
{
"mcpServers": {
"iterm-mcp": {
"command": "npx",
"args": [
"-y",
"iterm-mcp"
]
}
}
}
To install iTerm for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install iterm-mcp --client claude
Install dependencies:
yarn install
Build the server:
yarn run build
For development with auto-rebuild:
yarn run watch
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
yarn run inspector
yarn debug <command>
The Inspector will provide a URL to access debugging tools in your browser.
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "iterm-mcp": { "command": "npx", "args": [ "-y", "iterm-mcp" ], "env": {} } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.