MCP

Control iTerm2 Terminals with AI

MCP server that connects AI assistants to iTerm2 terminals on macOS, enabling command execution, output reading, and session management through the Model

Works with node.jsiterm2
⚠️ This tool looks unmaintained — no upstream commits in 12+ months.

12
Spark score
out of 100
Updated Mar 2025
Version 1.0.0
Models

Add to Favorites

Why it matters

Integrate AI assistants with your iTerm2 terminal on macOS. This asset allows AI to programmatically create, manage, and interact with terminal sessions, enabling automated command execution and output retrieval.

Outcomes

What it gets done

01

Open new iTerm2 terminal instances

02

Execute commands within specific terminals

03

Read and process terminal output

04

List and manage active terminal sessions

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-iterm-mcp-server | bash

Capabilities

Tools your agent gets

open_terminal

Open a new terminal instance

execute_command

Execute a command in a specific terminal

read_output

Read output from a specific terminal

close_terminal

Close a specific terminal

list_terminals

Display a list of all active terminals and their information

Overview

iTerm MCP Server

What it does

The iTerm MCP Server bridges AI assistants and iTerm2 terminal sessions through the Model Context Protocol. It exposes five core tools that let AI clients create terminal instances, execute shell commands, read output, list active sessions, and close terminals-all programmatically through a standardized interface.

How it connects

Use this connector when you need an AI assistant to interact with iTerm2 terminals on macOS. The server provides tools for opening terminals, executing commands, reading terminal output, listing active terminals, and closing terminals. This server requires macOS because iTerm2 is macOS-only. It also requires Node.js 14.x or higher.

Source README

ITerm MCP Server

A Model Context Protocol (MCP) server implementation for iTerm2 terminal integration. This server allows AI assistants to interact with iTerm2 terminals through the Model Context Protocol.

Features

  • Create and manage iTerm2 terminal sessions
  • Execute commands in terminals
  • Read terminal output
  • List active terminals
  • Close terminals

Requirements

  • Node.js >= 14.x
  • iTerm2
  • macOS (since iTerm2 is macOS-only)

Configuration

Standard Configuration

The server uses the standard MCP configuration options. No additional configuration is required.

Cursor Configuration

To use this server with Cursor, add the following configuration to your ~/.cursor/mcp.json file:

{
  "mcpServers": {
    "terminal": {
      "command": "npx",
      "args": ["iterm_mcp_server"]
    }
  }
}

Tools

  • open_terminal: Open a new terminal instance
  • execute_command: Execute a command in a specific terminal
  • read_output: Read the output from a specific terminal
  • close_terminal: Close a specific terminal
  • list_terminals: List all active terminals and their information

Security Considerations

  • The server validates all input using Zod schemas
  • Commands are executed in isolated terminal sessions
  • Proper error handling and input sanitization is implemented

Author

Rishab Koul

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.