mcpField
I
ITerm MCP Server

ITerm MCP Server

Local
github.com/rishabkoulDeveloper Tools14Updated 83w ago

About ITerm MCP Server

ITerm MCP Server exposes iTerm2 terminal operations to AI assistants, for developers using macOS and iTerm2. It supports session management, command execution, and output reading.

Key features

  1. 01Create and manage terminal sessions
  2. 02Execute commands in a chosen terminal
  3. 03Read terminal output
  4. 04List active terminals
  5. 05Close terminal sessions

Use cases

  1. 01Have an AI assistant run commands in iTerm2
  2. 02Inspect command execution output
  3. 03Manage multiple active terminal sessions

MCP support

The server provides iTerm2 terminal tools to MCP clients, including opening terminals, running commands, reading output, listing sessions, and closing them.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"iTerm-MCP-Server": {
"command": "npx",
"args": [
"-y",
"iterm_mcp_server"
]
}
}
}
Run commandnpx -y iterm_mcp_server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmiterm_mcp_server

Tools

5

Saved tool list · updated 3w ago

This tool takes no parameters.

Details

From the project 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

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

ISC

Author

Rishab Koul

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.