AN

alejandroqh/npcterm

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

47 stars 2 forks 质量 61 趋势 13Apache-2.0

alejandroqh/npcterm 是一个从 https://github.com/alejandroqh/npcterm. 导入的 MCP 服务器候选人。

概览

alejandroqh/npcterm 是一个从 https://github.com/alejandroqh/npcterm. 导入的 MCP 服务器候选人。

概述(AI 翻译)

终极的智能体利用工具。一个无头内存终端模拟器,用于AI代理,通过MCP(模型上下文协议)公开。

NPCterm 赋予 AI 代理完整的终端访问。能够生成壳体、执行任意命令、读取屏幕输出、发送键盘输入,并与 TUI 应用程序交互。这是你能赋予 AI 代理的最强大能力之一:它实际上等同于赋予它访问计算机的能力。

请谨慎使用。 终端是一个不受限制的执行环境。代理输入的任何命令,系统都会运行。这包括安装软件、修改文件、访问网络以及壳用户能做的其他操作。在沙箱或受控环境中部署NPC术语,并始终遵循最小权限原则。未经适当防护,不要将其暴露给不受信任的代理。

全系统监控均由 btop 通过 MCP 工具由 AI 代理完全启动、读取和导航。

特色

  • 完整的ANSI/VT100终端仿真,通过portable-pty生成PTY]
  • 17 个 MCP 工具,用于对 JSON-RPC 标准的终端完整控制
  • **基于TurboMCP 3构建。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

NPCterm

The ultimate harness agent tool. A headless, in-memory terminal emulator for AI agents, exposed via MCP (Model Context Protocol).

NPCterm gives AI agents full terminal access. The ability to spawn shells, run arbitrary commands, read screen output, send keystrokes, and interact with TUI applications. This is one of the most powerful capabilities you can grant an AI agent: it is effectively equivalent to giving it access to a computer.

Use with precautions. A terminal is an unrestricted execution environment. Any command the agent can type, the system will run. This includes installing software, modifying files, accessing the network, and anything else a shell user can do. Deploy NPCterm in sandboxed or controlled environments, and always apply the principle of least privilege. Do not expose it to untrusted agents without appropriate safeguards.

Full system monitoring with btop, launched, read, and navigated entirely by an AI agent through MCP tools.

Features

  • Full ANSI/VT100 terminal emulation with PTY spawning via portable-pty
  • 17 MCP tools for complete terminal control over JSON-RPC stdio
  • Built on TurboMCP 3.0 – production-grade MCP SDK with auto-generated tool schemas
  • Multi-version MCP protocol support – compatible with clients using 2024-11-05, 2025-06-18, or 2025-11-25 spec versions
  • Incremental screen reads with dirty-row tracking for efficient output consumption
  • 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
  • Built-in web debug viewer – live terminal rendering and activity log in the browser, controllable via MCP tools

Install

cargo install npcterm

Install for any AI CLI / IDE

Installs the binary and auto-configures it for every MCP client detected: Claude Code, Claude Desktop, Codex, OpenCode, OpenClaw.

curl -fsSL https://raw.githubusercontent.com/alejandroqh/marketplace/main/h39.sh | bash

Pre-built binaries

Pre-built binaries are available in the dist/ directory for:

  • macOS ARM64 (Apple Silicon) / x64 (Intel)
  • Linux ARM64 / x64
  • Windows x64

Download the binary for your platform and place it somewhere in your PATH.

Build from source

cargo build --release

The binary will be at target/release/npcterm.

MCP config

Add to your MCP client config:

{
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "npcterm": { "command": "npcterm" } } }