enhanced-iterm
Advanced iTerm2 automation with Python API integration - The ultimate terminal control solution for AI assistants.
claude mcp add --transport stdio 2black0-enhanced-iterm-mcp-server node /path/to/enhanced-iterm-mcp-server/dist/index-python-api.js
How to use
Enhanced iTerm MCP Server provides a bridge between MCP tooling and iTerm2's Python API. It exposes a set of tools for terminal management, pane operations, and real-time session information, enabling automated control of iTerm2 from your AI assistants or automation scripts. With native Python API integration, you can create and configure terminals, split panes, broadcast commands across multiple panes, monitor sessions, and customize tab colors, all through a consistent MCP interface.
To use it, configure the MCP entry for enhanced-iterm in your MCP config (as shown in the example). Once running, you can invoke tools such as open-terminal, split-terminal-horizontal, broadcast-input, get-session-details, and set-tab-color. This lets you programmatically launch new terminals with profiles, split existing windows, or run commands across multiple panes in parallel, while querying session state in real time. The server emphasizes robust error handling and retries, helping maintain reliable automation even when iTerm2 or the environment experiences transient issues.
How to install
Prerequisites:
- Node.js v18 or newer
- npm (comes with Node.js)
- Python 3.8+ for the Python API components
- iTerm2 installed on macOS with Python API access enabled
Installation steps:
- Global installation (recommended for quick setup):
npm install -g enhanced-iterm-mcp-server
- Verify installation and usage:
enhanced-iterm-mcp --help
- (From source) Clone and install dependencies, then build:
git clone https://github.com/2black0/enhanced-iterm-mcp-server.git
cd enhanced-iterm-mcp-server
npm install
./setup-python-api.sh
npm run build
- Add to your MCP configuration (example):
{
"mcpServers": {
"enhanced-iterm": {
"command": "node",
"args": ["/path/to/enhanced-iterm-mcp-server/dist/index-python-api.js"],
"type": "stdio"
}
}
}
- Start the MCP server as part of your environment (depending on your setup).
Additional notes
Tips and common issues:
- Ensure iTerm2 is running and the Python API is enabled: iTerm2 Preferences -> General -> Magic -> Enable Python API, then restart iTerm2.
- If you encounter a connection error, verify the Python virtual environment and the iterm2 package installation (e.g., source iterm_env/bin/activate; pip list | grep iterm2).
- When using the NPX or local installation paths, adjust the dist/index-python-api.js path in your MCP config to match your build output.
- For production deployments, rely on the robust error handling and retries implemented in the Python API integration.
- The npm package name is enhanced-iterm-mcp-server; use npm run build to compile TypeScript before deploying the server.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.