NPCterm: Full PTY Terminal Emulator for AI Agents via MCP

NPCterm is a headless, in-memory full PTY terminal emulator for AI agents, exposed via MCP (Model Context Protocol). It gives AI agents full terminal access, not just bash, allowing them to spawn shells, run arbitrary commands, read screen output, send keystrokes, and interact with TUI applications.
Key Features
- Full ANSI/VT100 terminal emulation with PTY spawning via portable-pty
- 15 MCP tools for complete terminal control over JSON-RPC stdio
- Process state detection – knows when a command is running, idle, waiting for input, or exited
- Event system – ring buffer of terminal events (CommandFinished, WaitingForInput, Bell, etc.)
- AI-friendly coordinate overlay for precise screen navigation
- Mouse, selection, and scroll support for interacting with TUI applications
- Multiple concurrent terminals with short 2-character IDs
Example MCP Flow
The source provides a concrete example of using NPCterm to open and quit Vim:
// 1. Create a terminal
// -> terminal_create {}
// <- {"id": "a0", "cols": 80, "rows": 24}
// 2. Open vim
// -> terminal_send_keys {"id": "a0", "input": [{"text": "vim"}, {"key": "Enter"}]}
// <- {"success": true}
// 3. Read the screen to confirm vim is open
// -> terminal_show_screen {"id": "a0"}
// <- ~ VIM - Vi IMproved
// <- ~ version 9.2.250
// <- ~ by Bram Moolenaar et al.
// <- ~ type :q<Enter> to exit
// <- ...
// 4. Quit vim
// -> terminal_send_keys {"id": "a0", "input": [{"text": ":q"}, {"key": "Enter"}]}
// <- {"success": true}
The source includes a warning: "Use with precautions. A terminal is an unrestricted execution environment." This tool is effectively equivalent to giving an AI agent access to a computer.
The project is available on GitHub at github.com/alejandroqh/npcterm.
📖 Read the full source: r/ClaudeAI
👀 See Also

Replacing Kafka, Redis, and RabbitMQ with NATS: A Developer's Experience
A developer replaced Kafka, Redis, and RabbitMQ with NATS in their architecture, sharing specific implementation details and lessons learned from consolidating multiple messaging systems into one tool.

Open Source Chrome Extension Development Skills Package Released
Developer quangpl has packaged four years of Chrome extension development experience into eight AI agent skills covering scaffolding with WXT, manifest generation, security auditing, testing, asset generation, publishing, and MV2 to MV3 migration.

Cloudflare's AI Platform: Unified Inference Layer for AI Agents
Cloudflare's AI Platform provides a single API to access 70+ models across 12+ providers, including multimodal support for image, video, and speech models. It enables switching between models with one-line code changes and offers centralized cost monitoring with custom metadata.

Kubeez MCP Server Connects Claude to 70+ AI Media Models
Kubeez has released an MCP server that connects Claude to over 70 AI models for image, video, music, and voice generation. The server supports OAuth authentication and provides async generation with Claude polling for status and returning CDN URLs.