iterm-mcp

iterm-mcp

MCP server for sharing and controlling your iTerm session with AI models.

481
Stars
53
Forks
481
Watchers
12
Issues
iterm-mcp is a Model Context Protocol (MCP) server that enables AI models to access, inspect, and control an active iTerm terminal session. It allows models to read terminal output, write commands, interact with REPLs, and send control characters directly to the terminal. Designed for efficient token usage and seamless integration with desktop AI clients like Claude Desktop, iterm-mcp can be installed easily and comes with minimal dependencies. The tool emphasizes user oversight and provides debugging support through the MCP Inspector.

Key Features

Efficient context and token handling for model access to terminal output
Direct communication with iTerm via standard MCP protocol
Reading and writing to the active terminal window
Support for interactive REPLs within the terminal
Sending control characters like Ctrl-C and Ctrl-Z
Minimal dependencies; easy installation via npx
Integration support for Claude Desktop and other MCP clients
Tools for debugging communication through MCP Inspector
Command-line installation and configuration
No built-in restrictions on command use, allowing broad flexibility

Use Cases

Allowing large language models to observe and interact with terminal sessions
Automating shell tasks via AI models
Enabling AI-powered workflows that require context from the terminal
Having models manage REPL sessions and iterative command execution
AI-assisted troubleshooting and diagnostics in terminal environments
Providing a safe experimentation environment with manual override for model actions
Debugging and developing Model Context Protocol integrations using MCP Inspector
Delegating software installation or configuration tasks to AI via the shell
Real-time monitoring of terminal output for AI interpretation or summarization
Interfacing iTerm terminal with advanced desktop AI applications

README

iterm-mcp

A Model Context Protocol server that provides access to your iTerm session.

Main Image

Features

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.

Safety Considerations

  • The user is responsible for using the tool safely.
  • No built-in restrictions: iterm-mcp makes no attempt to evaluate the safety of commands that are executed.
  • Models can behave in unexpected ways. The user is expected to monitor activity and abort when appropriate.
  • For multi-step tasks, you may need to interrupt the model if it goes off track. Start with smaller, focused tasks until you're familiar with how the model behaves.

Tools

  • 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.

Requirements

  • iTerm2 must be running
  • Node version 18 or greater

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

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

Installing via Smithery

To install iTerm for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install iterm-mcp --client claude

smithery badge

Development

Install dependencies:

bash
yarn install

Build the server:

bash
yarn run build

For development with auto-rebuild:

bash
yarn run watch

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

bash
yarn run inspector
yarn debug <command>

The Inspector will provide a URL to access debugging tools in your browser.

Star History

Star History Chart

Repository Owner

Repository Details

Language TypeScript
Default Branch main
Size 1,296 KB
Contributors 6
License MIT License
MCP Verified Nov 11, 2025

Programming Languages

TypeScript
87.95%
JavaScript
12.05%

Tags

Topics

ai claude claude-ai mcp mcp-server repl

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • PiloTY

    PiloTY

    AI Pilot for PTY Operations via the Model Context Protocol

    PiloTY is an MCP server that enables AI agents to control interactive terminals as if they were human users. It provides stateful, context-preserving terminal sessions that support interactive programs, SSH connections, and background process management. The system allows secure integration with AI platforms like Claude Code or Claude Desktop to translate natural language instructions into complex terminal workflows. Designed for extensibility and real-world development scenarios, PiloTY empowers agents to manage remote environments, debug interactively, and automate multi-step operations.

    • 12
    • MCP
    • yiwenlu66/PiloTY
  • MCP Server for Iaptic

    MCP Server for Iaptic

    A Model Context Protocol server for accessing and managing Iaptic data with AI agents.

    MCP Server for Iaptic implements the Model Context Protocol to enable AI models, such as Claude, to securely and efficiently interact with Iaptic's customer, purchase, transaction, and statistics data. The server provides a standardized interface and command set for querying and managing information related to customers, purchases, transactions, events, and application management. Designed for integration with Claude Desktop and similar AI clients, it offers both automated and manual installation options.

    • 5
    • MCP
    • iaptic/mcp-server-iaptic
  • CipherTrust Manager MCP Server

    CipherTrust Manager MCP Server

    Enables AI assistants to access CipherTrust Manager securely via the Model Context Protocol.

    CipherTrust Manager MCP Server provides an implementation of the Model Context Protocol (MCP), offering AI assistants such as Claude and Cursor a unified interface to interact with CipherTrust Manager resources. Communication is facilitated through JSON-RPC over stdin/stdout, enabling key management, CTE client management, user management, and connection management functionalities. The tool is configurable via environment variables and integrates with existing CipherTrust Manager instances using the ksctl CLI for secure resource access.

    • 7
    • MCP
    • sanyambassi/ciphertrust-manager-mcp-server
  • interactive-mcp

    interactive-mcp

    Enable interactive, local communication between LLMs and users via MCP.

    interactive-mcp implements a Model Context Protocol (MCP) server in Node.js/TypeScript, allowing Large Language Models (LLMs) to interact directly with users on their local machine. It exposes tools for requesting user input, sending notifications, and managing persistent command-line chat sessions, facilitating real-time communication. Designed for integration with clients like Claude Desktop and VS Code, it operates locally to access OS-level notifications and command prompts. The project is suited for interactive workflows where LLMs require user involvement or confirmation.

    • 313
    • MCP
    • ttommyth/interactive-mcp
  • MCP Manager for Claude Desktop

    MCP Manager for Claude Desktop

    A desktop app to manage Model Context Protocol (MCP) servers for Claude Desktop on MacOS.

    MCP Manager for Claude Desktop provides a user-friendly interface to manage Model Context Protocol (MCP) servers, enabling Claude to access private data, APIs, and local or remote services securely from a MacOS desktop. It facilitates rapid configuration and integration with a wide variety of MCP servers, including productivity tools, databases, and web APIs. The app runs locally to ensure data privacy and streamlines connecting Claude to new sources through simple environment and server settings management.

    • 270
    • MCP
    • zueai/mcp-manager
  • Desktop Commander MCP

    Desktop Commander MCP

    AI-powered local tool for managing files, processes, and terminals using Model Context Protocol.

    Desktop Commander MCP enables users to search, manage files, run terminal commands, and automate development tasks through Model Context Protocol (MCP). It offers interactive process management, in-memory code execution, advanced file operations, pattern-based file editing, and comprehensive audit logging. Built on top of MCP Filesystem Server, it integrates multiple developer tools within a conversational interface, supporting enhanced process control and efficient workflow automation.

    • 4,883
    • MCP
    • wonderwhy-er/DesktopCommanderMCP
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results