iTerm MCP Server

iTerm MCP Server

MCP server for iTerm2 terminal management via the Model Context Protocol.

11
Stars
5
Forks
0
Releases

Overview

An MCP server implementation for iTerm2 terminal integration that lets AI assistants interact with iTerm2 terminals through the Model Context Protocol. It supports creating and managing multiple iTerm2 terminal sessions, executing commands, reading terminal output, listing active terminals, and closing terminals, enabling automated workflows and interactive debugging via MCP. The server runs on Node.js (>=14) and requires iTerm2 on macOS. It offers a standard MCP configuration by default and includes a Cursor integration example via a sample ~/.cursor/mcp.json configuration. All input is validated with Zod schemas, and commands execute in isolated terminal sessions with robust error handling and input sanitization to maintain security and reliability.

Details

Owner
rishabkoul
Language
JavaScript
License
ISC License
Updated
2025-12-07

Features

Create and manage iTerm2 terminal sessions

Spawn new iTerm2 terminals and manage multiple sessions within the MCP server.

Execute commands in terminals

Run shell commands inside a specified iTerm2 terminal session via MCP.

Read terminal output

Fetch or stream terminal output for AI consumption and analysis.

List active terminals

Provide an inventory of all currently open iTerm2 terminals and their metadata.

Close terminals

Terminate a terminal session and clean up resources.

Cursor integration support

Configured to work with Cursor via a sample mcp.json, enabling Cursor-driven workflows.

Input validation with Zod

Validates all MCP inputs with Zod schemas to ensure safety and correctness.

Isolated terminal sessions

Executes commands in isolated sessions to improve security and reliability.

Audience

AI assistantsEnable AI assistants to manage iTerm2 terminals, execute commands, and read outputs via MCP.

Tags

MCPiTerm2terminalmacOSCursorsessionscommandsvalidation