A Model Context Protocol server that provides access to the currently active iTerm tab, enabling models to run commands, read output, and send control characters in real-time.
https://github.com/ferrislucas/iterm-mcpStop copy-pasting terminal output into Claude. This MCP server connects your AI directly to your iTerm session, letting it run commands, read output, and interact with REPLs in real-time.
You know the drill: you're debugging something, Claude suggests a command, you run it, copy the output, paste it back, repeat. Or worse - you're trying to describe what's happening in your Python REPL or database console.
iTerm MCP eliminates this friction entirely. Your AI gets direct access to your active terminal session. It can run commands, read just the output it needs, send control characters like Ctrl-C, and even interact with interactive shells and REPLs.
Here's what makes this different from basic command execution: the model only reads the terminal output it actually needs. Running a long-running process that spits out hundreds of lines? The AI can peek at just the last few lines to check status, saving tokens and staying focused.
This isn't just about efficiency - it's about natural workflow. The AI sees your terminal exactly like you do.
Debug Session Collaboration
You: "This Node app is throwing weird errors"
Claude: *runs `npm start`, reads the error output*
Claude: "I see a missing dependency. Let me check your package.json"
*reads file, installs missing package, restarts*
Database Administration
Claude: *connects to your PostgreSQL REPL*
Claude: *runs queries, analyzes slow queries, suggests indexes*
Claude: *stays in the same session, no reconnection needed*
System Troubleshooting
You: "Server response times are slow"
Claude: *checks logs, monitors processes, runs diagnostic commands*
Claude: *identifies the bottleneck, suggests fixes*
Development Environment Setup
Claude: *clones repo, installs dependencies*
Claude: *encounters build error, reads output, fixes config*
Claude: *verifies everything works, all in one continuous session*
This isn't just command execution - it's complete terminal interaction. The AI can:
Add to your Claude Desktop config:
{
"mcpServers": {
"iterm-mcp": {
"command": "npx",
"args": ["-y", "iterm-mcp"]
}
}
}
Or install via Smithery:
npx -y @smithery/cli install iterm-mcp --client claude
Requirements: iTerm2 running, Node.js 18+
This gives the AI real terminal access. Monitor what it's doing, especially for multi-step tasks. Start with smaller, focused tasks until you understand how your AI behaves with terminal access.
The tool makes no attempt to restrict commands - you're responsible for safe usage.
Terminal interaction is a huge part of development work, but it's been awkwardly isolated from AI assistance. iTerm MCP bridges that gap naturally. Instead of describing what you're seeing or manually copying output, you get seamless collaboration where the AI works directly in your environment.
This is particularly powerful for tasks that require multiple steps, state awareness, or interaction with running processes. Your AI assistant becomes a true pair programming partner who can see and interact with your actual development environment.