# iterm-mcp

> MCP Server

Iterm-mcp provides a Model Context Protocol server, granting AI models access to your iTerm session for tasks like command execution, output inspection, and REPL interaction, enhancing efficiency and control.

## Overview

- **Category:** Developer Tools
- **Language:** TypeScript
- **Stars:** 567
- **Forks:** 12
- **Owner:** ferrislucas
- **GitHub:** https://github.com/ferrislucas/iterm-mcp
- **Homepage:** https://www.npmjs.com/package/iterm-mcp
- **Created:** 2025-01-09T04:49:23+00:00
- **Updated:** 2025-03-28T14:24:36+00:00
- **Source:** https://model-context-protocol.com/servers/iterm-model-context-protocol-command-execution

## Setup

## Setup

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"
      ]
    }
  }
}
```

To install iTerm for Claude Desktop automatically via [Smithery](https://smithery.ai/server/iterm-mcp):

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

Install dependencies:
```bash
yarn install
```

Build the server:
```bash
yarn run build
```

## Tools

## Available Tools

1. Efficient Token Use: iterm-mcp gives the model the ability to inspect only the output that the model is interested in.
2. Natural Integration: You share iTerm with the model.
3. Full Terminal Control and REPL support: The model can start and interact with REPL's as well as send control characters.
4. Easy on the Dependencies: iterm-mcp is built with minimal dependencies and is runnable via npx.
5. `write_to_terminal` - Writes to the active iTerm terminal, often used to run a command.
6. `read_terminal_output` - Reads the requested number of lines from the active iTerm terminal.
7. `send_control_character` - Sends a control character to the active iTerm terminal.
