ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

pty-mcp

โดย raychao-oaoรุ่น 0.2.3i★ –iรันบนเครื่อง
ชื่อใน registryio.github.raychao-oao/pty-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Interactive PTY sessions over MCP: local shells, SSH, serial ports, and persistent remote sessions.

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เครื่องมือนักพัฒนา

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

ดาวน์โหลดไฟล์ .mcpb ของผู้ทำ

ลิงก์ไปที่ไฟล์ของผู้ทำเอง เราไม่ได้เก็บหรือแพ็กใหม่ เปิดไฟล์แล้ว Claude Desktop จะติดตั้งให้

พิมพ์คำสั่งนี้ใน Terminal

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 9 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub raychao-oao ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 5585 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 7% ของอีก 5585 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 5585 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

pty-mcp ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.2.3) เข้า registry 8 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี MCPB ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

GitHub

server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้

โดย githubใช้กันมาก★ 34.2Kอัปเดต 6 วันที่ผ่านมา

บนเครื่องหรือคลาวด์

Desktop Commander

MCP server for terminal commands, file operations, and process management

โดย wonderwhy-erใช้กันมาก↓ 709.6K/สัปดาห์★ 10.2Kอัปเดต 18 วันที่ผ่านมา

รันบนเครื่อง

Cloudflare MCP

Cloudflare MCP servers

โดย cloudflareใช้กันมาก★ 4.4Kอัปเดต 14 เดือนที่ผ่านมา

รันบนคลาวด์✓ mcp.cloudflare.com

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

pty-mcp

An MCP (Model Context Protocol) server that gives AI agents interactive terminal sessions — local shells, SSH, serial ports, and persistent remote sessions that survive disconnects.

Built for sysadmins and network engineers who want AI to help with real server and device management, not just code generation.

Why

AI agents run commands in non-interactive shells. They can't:

  • SSH into a server and interact with running processes
  • Connect to routers or switches via serial console
  • Monitor logs and react when a specific event occurs
  • Keep session state across multiple commands
  • Wait for a server to reboot and detect when it's back up

pty-mcp solves all of these by providing real PTY sessions over MCP.

Without pty-mcp, AI agents resort to sleep 30 && check_status loops — burning CPU cycles and API calls waiting for things to happen. With wait_for, the agent blocks server-side until the event occurs. Less polling, less energy, better for polar bears. 🐻❄️

Use Cases

Server administration

# Reboot a server and wait until it's back online

create_local_session("ping myserver") read_output(wait_for: "bytes from", timeout: 300) → blocks until server responds after reboot (~80s, one tool call)

Network device management

# Connect to a router via serial console

create_serial_session(port: "/dev/ttyUSB0", baud: 9600) send_input("show interfaces status") read_output(wait_for: "\\$")

Log monitoring and alerting

# Watch logs and act when something happens

create_ssh_session(host: "prod", user: "admin") send_input("tail -f /var/log/app.log") read_output(wait_for: "ERROR|CRITICAL", timeout: 3600) → returns the error line + context when it appears

Long-running tasks that survive disconnects

create_ssh_session(host: "server", user: "admin", persistent: true)

send_input("apt upgrade -y") detach_session() → close Claude Code, task continues

Reconnect later to check result

Features

FeatureDescription
Local terminalInteractive bash/python/node sessions on local machine
SSH sessionsConnect to remote hosts with key/password auth, SSH config support
Serial portConnect to devices via serial (IoT, embedded, network gear)
Persistent sessionsSessions survive SSH disconnects via ai-tmux daemon
Attach/DetachDetach from a running session, reconnect later
Control keysSend ctrl+c, ctrl+d, arrow keys, tab, escape
Settle detectionWaits for output to settle before returning (smart timeout)
Pattern matchingwait_for blocks until a regex pattern appears in output (v0.2.0)
Bounded memoryRing buffer prevents OOM on long-running sessions (v0.2.0)
Resize terminalResize the PTY window for local, SSH, serial, and persistent remote sessions (v0.10.0)
Audit logOptional voluntary operation log — record send_input commands to a collector for review and traceability (v0.8.0)
Audit redactionCredentials, auth headers, and PEM keys are automatically scrubbed before being written to the audit log (v0.10.0)

Architecture

┌─────────────────────────────────────────────────────┐

│ AI Agent (Claude Code, etc.) │ │ │ │ MCP Tools: create_local_session, send_input, │ │ send_control, read_output, close_session │ └──────────────────────┬──────────────────────────────┘ │ JSON-RPC stdio ┌──────────────────────┴──────────────────────────────┐ │ pty-mcp (MCP Server) │ │ │ │ Session Manager │ │ ├── LocalSession (local PTY via creack/pty) │ │ ├── SSHSession (remote PTY via x/crypto/ssh) │ │ ├── SerialSession (serial port via go.bug.st) │ │ └── RemoteSession (persistent via ai-tmux) │ └─────────────────────────────────────────────────────┘

Persistent mode (ai-tmux):

pty-mcp ──SSH──▶ ai-tmux client ──Unix socket──▶ ai-tmux server (daemon) ├── PTY: bash ├── PTY: ssh admin@router └── PTY: tail -f /var/log/syslog

Quick Start

Claude Code Plugin (recommended)

Installs the binary automatically and registers the MCP server:

claude plugin marketplace add raychao-oao/pty-mcp

claude plugin install pty-mcp@pty-mcp

Restart Claude Code — the binary downloads automatically on session start, then restart once more to activate it. No manual claude mcp add needed.

Updating:

claude plugin marketplace update pty-mcp

claude plugin update pty-mcp@pty-mcp

Restart Claude Code — the new binary downloads automatically on session start, then restart once more to apply the update.

Manual install

One-line install + register (macOS / Linux / WSL2):

curl -fsSL https://raw.githubusercontent.com/raychao-oao/pty-mcp/main/install.sh | sh

claude mcp add pty-mcp -- /usr/local/bin/pty-mcp

Restart Claude Code and the tools are available.

Other install methods

Download from GitHub Releases:

Go to Releases, download the binary for your platform, and make it executable:

PlatformBinary
macOS (Apple Silicon)pty-mcp-darwin-arm64
macOS (Intel)pty-mcp-darwin-amd64
Linux (x86_64) / WSL2pty-mcp-linux-amd64
Linux (ARM64)pty-mcp-linux-arm64
chmod +x pty-mcp-*

sudo mv pty-mcp-* /usr/local/bin/pty-mcp claude mcp add pty-mcp -- /usr/local/bin/pty-mcp

Build from source (requires Go 1.25+):

go install github.com/raychao-oao/pty-mcp@latest

claude mcp add pty-mcp -- $(go env GOPATH)/bin/pty-mcp

WSL2 Notes

pty-mcp works in WSL2 out of the box. Use the Linux binary:

# Inside WSL2

curl -fsSL https://raw.githubusercontent.com/raychao-oao/pty-mcp/main/install.sh | sh claude mcp add pty-mcp -- /usr/local/bin/pty-mcp

Optional: Install ai-tmux on remote servers

For persistent sessions that survive SSH disconnects, install ai-tmux on your remote server:

# Download for your server's architecture

curl -fsSL https://raw.githubusercontent.com/raychao-oao/pty-mcp/main/install.sh | sh

Or just copy the binary:

scp /usr/local/bin/ai-tmux your-server:/usr/local/bin/ai-tmux

Usage Examples

Once registered, the AI agent can use these MCP tools:

Local interactive shell:

create_local_session()                    → {session_id, type: "local"}

send_input(session_id, "cd /tmp && ls") → {output: "...", is_complete: true} send_input(session_id, "python3") → start Python REPL send_input(session_id, "print('hello')") → {output: "hello\n>>>"} send_control(session_id, "ctrl+d") → exit Python close_session(session_id)

SSH to remote server:

create_ssh_session(host: "myserver", user: "admin")

send_input(session_id, "top") send_control(session_id, "ctrl+c") → stop top

Wait for pattern (v0.2.0):

create_local_session("ping myserver")

read_output(session_id, wait_for: "bytes from", timeout: 300) → blocks until server responds or 5 min timeout

send_input(session_id, "docker-compose up") read_output(session_id, wait_for: "ready|error", timeout: 60, context_lines: 3) → returns matched line + 3 lines of context

Send secret / password (v0.3.0):

# AI detects a password prompt, calls send_secret instead of handling the password itself

create_ssh_session(host: "router", user: "admin") read_output(session_id, wait_for: "Password:") → session is waiting for input

send_secret(session_id, prompt: "Router admin password:") → native GUI dialog appears on the operator's screen (macOS: system dialog, WSL2: Windows Get-Credential, Linux: zenity/kdialog) → operator types password — it is sent directly to the PTY session → AI only sees: {success: true, length: 12} → password never appears in AI context or logs

Persistent session (survives SSH disconnect):

create_ssh_session(host: "server", user: "admin", persistent: true)

send_input(session_id, "make build") → start long build detach_session(session_id) → disconnect, build continues

Later (even after restart):

list_remote_sessions(host: "server", user: "admin") → see running sessions create_ssh_session(host: "server", user: "admin", session_id: "abc123") → reattach send_input(session_id, "echo $?") → check build result

MCP Tools

ToolDescription
create_local_sessionStart a local interactive terminal (bash, python3, node, etc.)
create_ssh_sessionSSH to a remote host (supports SSH config aliases)
create_serial_sessionConnect to a serial port device
send_inputSend a command and wait for output to settle
read_outputRead output, optionally wait for a pattern (wait_for, timeout, context_lines, tail_lines)
send_controlSend control keys (ctrl+c, ctrl+d, arrows, tab, etc.)
send_secretPrompt the human operator for a secret via GUI dialog; sends it to the PTY session without exposing it to AI context or logs ¹
list_sessionsList all active sessions
close_sessionClose a session (terminates remote PTY)
detach_sessionDisconnect but keep remote PTY running
resize_sessionResize the terminal window (rows/cols) for any session type
list_remote_sessionsList persistent sessions on a remote host

¹ `send_secret` platform support: macOS uses a native password dialog (osascript). WSL2 uses powershell.exe Get-Credential (Windows GUI dialog). Linux with a display server uses zenity or kdialog. Headless Linux falls back to /dev/tty. On macOS/Linux, if the operator doesn't respond within 60 seconds, the dialog is dismissed and the call returns a timeout error instead of falling through to another dialog or waiting again; cancelling the call (e.g. pressing ESC in Claude Code) dismisses the dialog immediately the same way. WSL2 is the exception: its dialog has no timeout and is never force-closed, including on cancellation — killing a WSL-interop-launched process that owns an open Windows GUI window was found to freeze the hosting terminal (unresponsive to input, scrolling, and selection) until the operator closes that terminal, with no way to recover it short of that. The dialog just waits until the operator answers or clicks Cancel themselves, which exits normally.

Audit Log

pty-mcp includes an optional audit log feature that records every send_input command to a central collector. This lets teams review and trace what AI agents did during a session.

Important: This is a voluntary, self-reporting operation log. It relies on operators choosing to enable it and run the collector. Because pty-mcp runs on the operator's own machine, there is no technical mechanism to enforce logging — a non-compliant operator could simply run pty-mcp without audit enabled. This feature provides traceability for teams that *want* it, but it is not a substitute for system-level audit tools (e.g., auditd, syslog forwarding, SSH session recording) in environments where audit compliance is required.

What it records
  • Timestamp, operator identity, session ID, session type (local/ssh/serial), target host
  • The exact input sent via send_input (including raw=true inputs like menu selecti

ตัดมาแค่ช่วงต้น อ่านต่อใน repo

ถาม PopNx