nowfound

AI · January 30, 2025

IM

Iterm-Mcp – AI Terminal/REPL Control for iTerm2

Hi HN! Ever wish you could just point your AI assistant at your terminal and say 'what's wrong with this output?' That's why I built iterm-mcp. It lets MCP clients like Claude Desktop directly interact with your iTerm2 terminal - reading logs, running commands, using REPLs, and helping debug issues. Want to explore data or debug using a REPL? The AI can start the REPL, run commands, and help interpret the results. This is an MCP server that integrates with Claude Desktop, LibreChat, and other Model Context Protocol compatible clients.…

Visit github.comAlternativestop 25% of January 2025

In plain words

Iterm-mcp is an MCP server that connects AI assistants like Claude Desktop to iTerm2 terminals, allowing direct interaction with command-line environments. Users can point their AI assistant at terminal output to get debugging help, run commands, start REPLs, and explore data. The tool integrates with Model Context Protocol compatible clients and optimizes token usage by letting the AI request only relevant output portions. It's designed for developers who want AI assistance directly within their terminal workflow.

written from the facts on this page · September 2026

From the sources

In the maker’s words, at launch

Hi HN! Ever wish you could just point your AI assistant at your terminal and say 'what's wrong with this output?' That's why I built iterm-mcp. It lets MCP clients like Claude Desktop directly interact with your iTerm2 terminal - reading logs, running commands, using REPLs, and helping debug issues. Want to explore data or debug using a REPL? The AI can start the REPL, run commands, and help interpret the results. This is an MCP server that integrates with Claude Desktop, LibreChat, and other Model Context Protocol compatible clients. https://github.com/ferrislucas/iterm-mcp Note: Independent project, not officially affiliated with iTerm2 ## Features *Efficient Token Use:* iterm-mcp gives the model the ability to inspect only the output that the model is interested in. The model typically only wants to see the last few lines of output even for long running commands. *Natural Integration:* You share iTerm with the model. You can ask questions about what's on the screen, or delegate a task to the model and watch as it performs each step. *Full Terminal Control and REPL support:* The model can start and interact with REPL's as well as send control characters like ctrl-c, ctrl-z, etc. *Easy on the Dependencies:* iterm-mcp is built with minimal dependencies and is runnable via npx. It's designed to be easy to add to Claude Desktop and other MCP clients. It should just work. ## Real-World Example: Debugging Sidekiq Jobs I needed to debug a Sidekiq job with complex arguments. The arguments were partially obfuscated in the logs. I asked Claude: "open rails console, show me arguments for the latest XYZ job". The model: 1. Launched Rails console 2. Retrieved job details 3. Displayed the arguments that I was looking for ## Architectural Journey This project had a couple interesting constraints around command execution: ### 1. Token Efficiency Challenge I wanted to constrain tokens as much as possible. I didn't want to send the entire output of a long running command to the model, but there's not a great way to know which parts of the output are important to what the model is doing. Sampling could be used here, but it's not well supported yet. *Solution:* I arrived at a pull-based solution for this. The command from the model is sent to the terminal, and the model is made aware of how many lines of output were generated. The model can choose to retrieve as many lines of the buffer that it thinks are relevant. ### 2. Long-Running Process Support I wanted to support long running processes. It turns out that when you run `brew install ffmpeg` - it takes a while, and it's not always clear when the job is done. In early proof of concepts, the model would assume the command completed successfully and begin sending additional commands to the terminal before the first command had finished. *Solution:* iTerm provides a way to ask if the terminal is waiting for user input, but I found that it tended to show false positives in certain situations. For example, a long running command would result in iTerm reporting that the terminal was waiting for input when in fact the command was still running. I found that inspecting the processes associated with the terminal and waiting until the most interesting of those processes settles to a low resource usage is a fair indicator of long running commands being ready for input. ## Requirements * iTerm2 must be running * Node version 18 or greater ## Safety Considerations * The user is responsible for using the tool safely. * No built-in restrictions: iterm-mcp makes no attempt to evaluate the safety of commands that are executed. * Models can behave in unexpected ways. The user is expected to monitor activity and abort when appropriate. * For multi-step tasks, you may need to interrupt the model if it goes off track. Start with smaller, focused tasks until you're familiar with how the model behaves.

More ai this month

the category →
  • I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.

    AI · 17d ago · simedw.com

  • Astute585

    Automate your B2B brand going viral, with new media creators

    AI · 18d ago · company-app.joinastute.com

  • Grok Bot547

    AI teammates that you can give real work to

    AI · 25d ago · x.ai

  • Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…

    AI · 27d ago · cactuscompute.com

  • Turn website visitors into qualified pipeline

    AI · 19d ago · clarasdr.ai

  • Kane CLI446

    Natural language browser & mobile app tests from terminal

    AI · 24d ago · testmuai.com

Launched alongside, January 2025

the whole month →
  • IM

    Hello! I'm Byran. I spent the past ~6 months engineering a laptop from scratch. It's fully open-source on GH at: https://github.com/Hello9999901/laptop

    Dev tools · 2025 · byran.ee

  • TI

    I realized that the PDF engines of modern desktop browsers (PDFium and PDF.js) support JavaScript with enough I/O primitives to make a basic game like Tetris. It was a bit tricky to find a union of features that work in both engines, but in the end it turns out that showing/hiding annotation "fields" works well to make monochrome pixels, and keyboard input can be achieved by typing in a text input box. All in all it's quite janky but a nice reminder of how general purpose PDF scripting can be. The linked PDF is all ASCII so you can just open it in a text editor, or have a look at…

    Life & fun · 2025 · th0mas.nl

  • 21st.dev1,211

    Github + Pinterest to make your AI websites look beautiful

    Dev tools · 2025 · 21st.dev

  • Stay in flow by blocking distracting apps and websites

    Work · 2025 · raycast.com

  • Create lifelike, personalized AI avatars from text prompts

    AI · 2025 · jogg.ai

  • Turn Figma designs into full stack apps with AI

    Dev tools · 2025 · figma.com