proc-repl-mcp
Enables driving the htop system monitor via a tmux session, allowing interactive control and monitoring.
Allows interaction with a Python subprocess, enabling code execution in a persistent REPL session.
Offers tools to manage tmux sessions, including sending keys, capturing panes, and resizing windows.
Provides the ability to control the Vim text editor programmatically through a tmux backend.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@proc-repl-mcp Open a Python REPL and run print('hello world')"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
proc-repl-mcp
Stateful subprocess sessions for MCP (Model Context Protocol).
中文文档: README.zh.md
This server is intentionally small: it keeps a subprocess alive across tool calls so you can interact with REPL-ish tools (python, r2/rizin, shells) and optionally drive full-screen TUI programs (vim/htop) via a tmux backend.
Security
This MCP server is a local RCE capability. By default nothing is allowed unless you set:
PROC_MCP_ALLOW: comma-separated allowlist of commands (e.g.python3,r2,sh)
Env overrides from clients are restricted by default (blocks PATH, LD_*,
DYLD_*, etc). See PROC_MCP_ENV_ALLOW / PROC_MCP_ENV_DENY in proc_repl_mcp.py.
Related MCP server: Terminal MCP Server
Tools
open_session,list_sessions,send,read,run,close_sessiontmux_open_session,tmux_list_sessions,tmux_send_keys,tmux_step,tmux_capture_pane,tmux_resize,tmux_close_session
Cursor MCP config (uvx, no manual install)
If you have uv installed, you can run this without pre-installing the package:
{
"mcpServers": {
"proc-repl-mcp": {
"command": "uvx",
"args": ["-q", "-U", "proc-repl-mcp"],
"env": {
"PROC_MCP_ALLOW": "*"
}
}
}
}Notes:
For r2/rizin, use
-0/-q0andrun(until_nul=true)for reliable message boundaries.For TUIs, prefer the tmux tools:
tmux_open_sessionthentmux_stepto send-keys and capture output in one roundtrip.tmux_send_keysnow sends each key as its own tmux operation and keeps a short gap beforeEnter. Tune it withPROC_MCP_TMUX_KEY_DELAY_MSif a TUI needs slower submission timing.PROC_MCP_ALLOW="*"enables everything (local RCE). Prefer a strict allowlist in real setups.
If uvx fails to connect to PyPI in your network, set a mirror index. You can
either pass it via args:
{
"mcpServers": {
"proc-repl-mcp": {
"command": "uvx",
"args": [
"-q",
"-U",
"--default-index",
"https://pypi.tuna.tsinghua.edu.cn/simple",
"proc-repl-mcp"
],
"env": {
"PROC_MCP_ALLOW": "*"
}
}
}
}Or set it via env (recommended):
{
"mcpServers": {
"proc-repl-mcp": {
"command": "uvx",
"args": ["-q", "-U", "proc-repl-mcp"],
"env": {
"PROC_MCP_ALLOW": "*",
"UV_DEFAULT_INDEX": "https://pypi.tuna.tsinghua.edu.cn/simple"
}
}
}
}If you haven't published to PyPI yet, you can run directly from GitHub (pin to a tag or commit):
{
"mcpServers": {
"proc-repl-mcp": {
"command": "uvx",
"args": [
"-q",
"-U",
"--from",
"git+https://github.com/SammySnake-d/proc-repl-mcp.git@main",
"proc-repl-mcp"
],
"env": {
"PROC_MCP_ALLOW": "*"
}
}
}
}Install (pip)
python3 -m pip install proc-repl-mcp
proc-repl-mcpOr run without installing (uvx):
uvx proc-repl-mcpDev
Run smoke tests locally:
python3 test_smoke.py
python3 test_full_smoke.pyAvailable Tools
13 toolsclose_sessionC
Terminate a session and free resources.
Inputs: session_id (required), kill.
list_sessionsB
List active sessions.
Inputs: no named parameters.
open_sessionB
Spawn a stateful subprocess session (PTY by default). Returns a session id.
Inputs: command (required), cwd, env, pty, +2 more.
readC
Read accumulated output from a session.
Inputs: session_id (required), drain, max_bytes, strip_ansi, +1 more.
runB
Convenience: send a command then read until output is idle.
Inputs: command (required), session_id (required), idle_ms, max_bytes, +6 more.
sendC
Send raw input to a session's stdin.
Inputs: data (required), session_id (required), append_newline.
tmux_capture_paneB
Capture the current pane contents as text.
Inputs: session_id (required), ansi, join, end_line, +3 more.
tmux_close_sessionC
Kill a tmux session created by this server.
Inputs: session_id (required).
tmux_list_sessionsA
List active tmux sessions created by this server.
Inputs: no named parameters.
tmux_open_sessionB
Start a detached tmux session running a command (useful for full-screen TUI apps like vim/htop). Returns a tmux session id.
Inputs: command (required), cwd, env, args, +2 more.
tmux_resizeC
Resize a tmux session window.
Inputs: width (required), height (required), session_id (required).
tmux_send_keysA
Send key tokens to a tmux session's active pane (supports keys like Enter, Escape, C-c, Up, Down).
Inputs: keys (required), session_id (required), enter, literal.
tmux_stepA
Send keys, wait briefly for redraw, then return a pane snapshot (one roundtrip for TUIs).
Inputs: keys (required), session_id (required), ansi, join, +7 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
The tools are clearly split into regular subprocess sessions and tmux sessions, each with distinct lifecycles and the tmux_ prefix clearly marking the latter. However, send/read/run could be confused with tmux_send_keys/tmux_capture_pane/tmux_step if descriptions are not carefully read, so a small amount of ambiguity remains.
Regular session tools mix verb_noun patterns (open_session, close_session) with bare verbs (send, read, run). Tmux tools are consistently prefixed with tmux_ but include both verb_noun (tmux_send_keys) and bare verb (tmux_step) forms. The mixed conventions are readable but not fully consistent.
13 tools is well within the ideal range and appropriate for managing two types of interactive sessions (PTY and tmux). Each tool serves a distinct purpose in the workflow, and none feel redundant or excessive.
The tool set provides full lifecycle coverage for both regular and tmux sessions: open, list, send/read, and close, plus useful conveniences like run, step, capture, and resize. There are no obvious dead ends or missing core operations for interacting with external processes.
Maintenance
Related MCP Connectors
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Hosted reverse and forward shell relay for CTFs, labs and authorized testing.
Docs for agent-manager, the terminal UI that runs AI coding agents as live tmux sessions.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables programmatic control over tmux terminal sessions for SSH access, command execution, and terminal automation. Supports creating sessions, sending commands, capturing output, and managing multiple panes for interactive debugging and monitoring.8MIT
- AlicenseAqualityDmaintenanceEnables AI agents to spawn, interact with, and orchestrate multiple concurrent terminal sessions via tmux.9MIT
- AlicenseAqualityDmaintenanceEnables agents to interact with CLI applications like vim, htop, and gdb by sending key inputs and capturing terminal output through tmux sessions.6MIT
- FlicenseAqualityBmaintenanceEnables interaction with long-running interactive programs such as SSH, GDB, and REPLs. Provides tools to start, monitor, control, read/write I/O for these processes.131-