npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hazzel-cn/node-pty-mcp

v1.1.2

Published

MCP server for interactive terminal operations using node-pty with proper terminal emulation via @xterm/headless.

Readme

@hazzel-cn/node-pty-mcp

MCP server for interactive terminal operations using node-pty with proper terminal emulation via @xterm/headless.

Features

  • True Terminal Emulation: Uses @xterm/headless for proper TUI application support
  • Interactive Terminal Sessions: Create and manage persistent terminal sessions
  • Real-time Screen Reading: Read current terminal screen content with proper rendering
  • TUI Application Support: Optimized for vim, nano, htop, and other interactive applications
  • Session Management: List, resize, and kill terminal sessions
  • MCP Protocol: Full Model Context Protocol support with stdio transport

Available Tools

  • create_terminal_session - Create a new terminal session
  • list_terminal_sessions - List all active terminal sessions
  • send_terminal_input - Send text input to a terminal
  • send_terminal_key - Send special keys (Enter, Tab, Escape, Ctrl+C, etc.)
  • read_terminal_screen - Read the current screen content (proper TUI rendering)
  • resize_terminal_session - Resize terminal dimensions
  • kill_terminal_session - Terminate a terminal session

Installation & Configuration

Quick Start (Recommended)

Using npx - no installation required:

{
  "mcpServers": {
    "node-pty-terminal": {
      "command": "npx",
      "args": ["--yes", "--quiet", "@hazzel-cn/[email protected]"],
      "timeout": 180000
    }
  }
}

Google ADK Configuration

For Google ADK, use the npx configuration above. The server is optimized for ADK with:

  • No stdout noise (only MCP protocol frames)
  • All logs go to stderr
  • Immediate MCP handshake
  • Process stays alive for long-running sessions
  • Proper timeout handling (>= 120000ms recommended)

Manual Installation

npm install -g @hazzel-cn/node-pty-mcp

Then configure:

{
  "mcpServers": {
    "node-pty-terminal": {
      "command": "node-pty-mcp",
      "timeout": 10000
    }
  }
}

Usage Notes

  • stdout is reserved for MCP frames - all logs go to stderr
  • First-time npx may take longer - use timeout >= 120000ms
  • TUI applications work properly - vim, nano, htop render correctly
  • Terminal emulation - proper ANSI/CSI escape sequence handling
  • Session persistence - terminals stay alive until explicitly killed

Development

npm run dev          # Development mode with hot reload
npm run build        # Build for production
npm run prepublishOnly # Build and set executable permissions

License

MIT License - see LICENSE file for details.