interactive-cli MCP server
2026년 11월 4일 커밋pseudo-terminal과 headless xterm 렌더링을 사용하여 AI agent가 프롬프트 및 REPL을 처리하며 터미널 프로세스와 상호작용할 수 있도록 합니다.
다른 이름 ohernandezdev/interactive-cli
- 스타
- 1
- Tools
- 9
- 다운로드, 30일
- —
- 최신 버전
- —
- 마지막 커밋
- 2026년 11월 4일
- 라이선스
- MIT
interactive-cli MCP란?
interactive-cli은(는) MCP server입니다. pseudo-terminal과 headless xterm 렌더링을 사용하여 AI agent가 프롬프트 및 REPL을 처리하며 터미널 프로세스와 상호작용할 수 있도록 합니다. 9개 도구를 제공합니다. 예: spawn, send_input, send_keys.
프로젝트 README에서 생성된 요약
interactive-cli MCP server 정보
이 MCP server는 설치 프로그램, SSH 세션 또는 REPL과 같은 대화형 터미널 프로세스를 AI agent로 제어할 수 있게 합니다. 표준 쉘 도구는 사용자 입력을 기다리는 동안 agent를 멈추게 하는 경우가 많지만, 이 server는 실제 pseudo-terminal과 headless xterm 렌더링을 사용하여 깨끗한 텍스트 그리드 화면을 제공합니다. 이를 통해 agent는 사람이 하는 것과 똑같이 프롬프트를 확인하고, 메뉴를 탐색하며, 답변을 입력할 수 있습니다.
개발자는 Claude Code, Cursor, Windsurf, Codex를 포함하여 stdio를 지원하는 모든 MCP client를 통해 macOS 또는 Linux에서 이를 사용할 수 있습니다. 이 server는 프로세스를 시작하는 spawn, 키보드 탐색을 시뮬레이션하는 send_keys, 폼에 텍스트를 입력하는 send_input과 같은 특정 도구를 제공합니다. 또한 빌드 완료 또는 에러와 같은 특정 패턴을 모니터링하기 위해 regex를 사용하는 wait_for 도구도 포함되어 있습니다.
이 server는 로컬 쉘을 통해 명령을 실행하므로 agent는 기존 권한을 그대로 사용하여 작동합니다. client에 과부하가 걸리는 것을 방지하기 위해 화면 캡처는 80,000자로 제한되며, 시스템은 1,000행의 스크롤백 버퍼를 유지합니다.
활용 사례
- 1복잡한 빌드 프로세스 자동화agent에게 빌드를 실행하고 특정 성공 또는 에러 메시지가 나타날 때까지 기다리도록 지시할 수 있습니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
interactive-cli MCP 도구 9
README에서 감지됨spawnsend_inputsend_keysget_screenwait_forwait_for_exitresizelist_sessionsclose
| spawn | — | |
| send_input | — | |
| send_keys | — | |
| get_screen | — | |
| wait_for | — | |
| wait_for_exit | — | |
| resize | — | |
| list_sessions | — | |
| close | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →아직 인증되지 않았습니다. 서버는 80점 이상의 점수, 심각한 결함 없음, 그리고 검사에 충분한 데이터를 갖추어야 합니다. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능ohernandezdev/interactive-cli is public and reachablegithub.com/ohernandezdev/interactive-cli ↗통과
- 패키지가 이 저장소를 소스로 명시검사되지 않음
- 빌드 출처(Sigstore 증명)검사되지 않음
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-11-04github.com/ohernandezdev/interactive-cli ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음검사되지 않음
- 패키지 및 해당 종속성에 중요한 보안 권고 없음검사되지 않음
- 모델에 대한 숨겨진 지침 없음9 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기interactive-cli
An MCP server that runs commands in a real pseudo-terminal and hands your AI agent the rendered screen, so it can answer prompts, pick menu items and drive REPLs, SSH and installers the way you would.
Site: https://ohernandezdev.github.io/interactive-cli/
Works with Claude Code, Codex, Cursor, Windsurf, or any MCP client that speaks stdio.
Why
A shell tool sends a command and waits for it to finish. An interactive command never finishes: it waits for a person. The agent hangs, times out or kills it, and you end up typing the answer yourself.
$ npm init
package name: (my-app)
waiting for input…
interactive-cli bridges that gap. It spawns the process in a PTY, renders the screen with xterm headless (clean text, no ANSI escape soup), and lets the agent send input or keys and wait for patterns.
Install
Requires Node 18 or later, on macOS or Linux.
Claude Code
claude mcp add interactive-cli -- npx -y interactive-cli-mcp
Codex CLI
codex mcp add interactive-cli -- npx -y interactive-cli-mcp
This writes [mcp_servers.interactive-cli] with command = "npx" and args = ["-y", "interactive-cli-mcp"] to ~/.codex/config.toml.
Cursor
Add this to ~/.cursor/mcp.json:
{
"mcpServers": {
"interactive-cli": {
"command": "npx",
"args": ["-y", "interactive-cli-mcp"]
}
}
}
Any MCP client
Point a stdio MCP client at:
npx -y interactive-cli-mcp
From source
git clone https://github.com/ohernandezdev/interactive-cli.git
cd interactive-cli
npm install && npm run build
claude mcp add interactive-cli -- node /absolute/path/to/interactive-cli/dist/index.js
What a session looks like
An illustrative eas build session. The agent calls the tools; the server answers with the rendered screen.
spawn("eas build --platform ios")
? Select a build profile ›
❯ development
preview
production
get_screen()
(same screen)
send_keys(["down", "down", "enter"])
✔ Selected profile: production
? Do you want to log in to your Apple account? › (Y/n)
send_input("y")
✔ Logged in
Building…
wait_for("Build complete|error", 600000)
✔ Build complete
close()
exit 0
(sessionId is omitted above for brevity; every call after spawn takes the id that spawn returned.)
Tools
| Tool | Parameters (defaults) | Read-only |
|---|---|---|
spawn |
command, cwd?, env?, cols = 120, rows = 30, waitMs = 2000 |
No |
send_input |
sessionId, text, pressEnter = true, waitMs = 2000 |
No |
send_keys |
sessionId, keys[], delayBetweenMs = 50, waitMs = 1500 |
No |
get_screen |
sessionId, search?, waitMs = 500 |
Yes |
wait_for |
sessionId, pattern, timeoutMs = 30000, intervalMs = 1000 |
No |
wait_for_exit |
sessionId, timeoutMs = 30000 |
No |
resize |
sessionId, cols, rows |
No |
list_sessions |
none | Yes |
close |
sessionId |
No |
spawnruns the command as$SHELL -c "<command>"(/bin/zshwhenSHELLis unset), so pipes, redirects and builtins work.envis merged with the current environment.waitMsis how long to wait for the first output.send_inputappends Enter unlesspressEnterisfalse, which types without submitting (useful for forms and password fields).send_keyssends the keys in order withdelayBetweenMsbetween them, then waitswaitMs.get_screenwaitswaitMsbefore capturing (default 500;0for an instant capture).searchis a regex: the result adds the matching lines with 2 lines of context.wait_fortakes a regex, matched case-insensitively. Use a longtimeoutMsfor builds.closesends SIGTERM, then SIGKILL if needed, and returns the final screen.spawn,send_input,send_keysandcloseare annotated as destructive, so clients such as Claude Code ask before using them.get_screenandlist_sessionsare annotated read-only.- Every result is JSON.
Keys
send_keys accepts: enter tab escape space up down left right backspace delete home end page_up page_down f1 to f12 ctrl+c ctrl+d ctrl+z ctrl+l ctrl+a ctrl+e ctrl+r ctrl+w ctrl+u ctrl+k ctrl+p ctrl+n y n 0 to 9
Resources
interactive-cli://sessions: JSON list of all sessionsinteractive-cli://sessions/{sessionId}/screen: live screen content of a session (text/plain)
Prompts
Prompt templates for common flows. In Claude Code they appear as slash commands (/mcp__interactive-cli__eas_build).
| Prompt | Arguments |
|---|---|
eas_build |
platform? (default ios), profile? (default production), cwd? |
ssh_session |
host (user@hostname), commands? (semicolon-separated) |
repl_session |
command (python3, node, psql, ...), setup? (semicolon-separated) |
docker_interactive |
image, shellCmd? (default /bin/sh) |
eas_build runs eas build --platform <platform> --profile <profile> --auto-submit. docker_interactive runs docker run -it <image> <shellCmd>.
How it works
graph LR
A[AI Agent] <-->|MCP Protocol| B[interactive-cli server]
B --> C[Session Manager]
C --> D[node-pty<br/><i>real PTY</i>]
C --> E[xterm headless<br/><i>screen render</i>]
C --> F[Truncation<br/><i>80K limit</i>]
D <--> G[Child Process<br/>ssh, eas, python...]
- node-pty spawns a real pseudo-terminal (
xterm-256color), so the child process behaves as it does in your terminal. - xterm headless keeps a virtual terminal (1,000 lines of scrollback) and renders it into a clean 2D text grid.
- Screens are capped at 80,000 characters, cut in the middle with a marker so the start and the end survive. Claude Code caps tool results at 100,000.
Typical flow:
sequenceDiagram
participant Agent as AI Agent
participant MCP as interactive-cli
participant PTY as Process (PTY)
Agent->>MCP: spawn("eas build --platform ios")
MCP->>PTY: Start process in PTY
PTY-->>MCP: Initial output
MCP-->>Agent: sessionId + screen
Agent->>MCP: send_keys(["down","down","enter"])
MCP->>PTY: ↓ ↓ ⏎
PTY-->>MCP: "✔ Selected profile: production"
MCP-->>Agent: updated screen
Agent->>MCP: wait_for("Build complete|error", 600000)
PTY-->>MCP: "✔ Build complete"
MCP-->>Agent: matched + screen
Agent->>MCP: close(sessionId)
MCP->>PTY: SIGTERM
MCP-->>Agent: final screen + exit code
Limits
- macOS and Linux only. Commands run through your shell (
$SHELL -c), and Windows is not supported. - Any screen in a result is capped at 80,000 characters.
- Scrollback is 1,000 lines.
- The agent runs commands with your permissions, in your shell. Review what your client approves.
Development
npm install
npm run build
node dist/index.js
Dependencies: @modelcontextprotocol/sdk, node-pty, @xterm/headless, zod.
License
MIT
interactive-cli MCP 질문
interactive-cli MCP는 어떤 도구를 제공하나요?
9개 도구를 제공합니다. 예: spawn, send_input, send_keys, get_screen, wait_for.
지원되는 운영체제는 무엇인가요?
이 MCP server는 macOS 및 Linux에서만 작동하며, Windows는 지원하지 않습니다.
agent가 npm init과 같은 대화형 프롬프트를 처리할 수 있나요?
네, PTY에서 프로세스를 생성하고 화면을 렌더링하므로 agent가 프롬프트에 답하거나 메뉴 항목을 선택할 수 있습니다.
대용량 터미널 출력은 어떻게 처리하나요?
제한 범위 내에 들어오도록 화면은 80,000자로 제한되며, 스크롤백은 1,000행으로 제한됩니다.