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

interm-mcp

v0.4.24208

Published

MCP server for terminal applications and TUI automation with 127 tools

Readme

InTerm

A Model Context Protocol (MCP) server for terminal applications and TUI development. InTerm provides programmatic access to terminal sessions, command execution, and terminal state capture - similar to how InSite works with browsers but for terminal applications.

Features

  • Terminal Session Management: Create, manage, and control multiple terminal sessions
  • Command Execution: Execute commands with timeout controls and output capture
  • Interactive Input: Send input, special keys, and control sequences to running applications
  • State Capture: Take screenshots and capture terminal content/state
  • Cross-Platform: Works on macOS, Linux, and Windows
  • TUI Development: Perfect for developing and testing terminal user interfaces

Installation

npm install
npm run build

Usage

As MCP Server

Add to your MCP client configuration:

{
  "mcpServers": {
    "interm": {
      "command": "node",
      "args": ["/path/to/interm/bin/interm.js"]
    }
  }
}

Available Tools

Session Management

  • create_terminal_session - Create new terminal session
  • list_terminal_sessions - List active sessions
  • get_terminal_session - Get session details
  • close_terminal_session - Close a session
  • resize_terminal - Resize terminal dimensions

Command Execution

  • execute_command - Execute commands with output capture
  • send_input - Send text input to terminal
  • send_keys - Send special keys (Ctrl+C, arrows, etc.)
  • interrupt_command - Send interrupt signal

State Capture

  • get_terminal_content - Get current terminal content
  • screenshot_terminal - Take visual screenshot
  • get_terminal_buffer - Get raw terminal buffer
  • watch_terminal_output - Watch for output patterns

Examples

Basic Terminal Session

// Create a session
const session = await tools.create_terminal_session({
  cols: 80,
  rows: 24,
  shell: "bash"
});

// Execute a command
const result = await tools.execute_command({
  sessionId: session.id,
  command: "ls -la",
  timeout: 5000
});

// Get terminal content
const content = await tools.get_terminal_content({
  sessionId: session.id
});

Interactive TUI Development

// Start a TUI application
await tools.execute_command({
  sessionId: session.id,
  command: "htop",
  expectOutput: false
});

// Send navigation keys
await tools.send_keys({
  sessionId: session.id,
  keys: "arrow_down"
});

// Take screenshot
const screenshot = await tools.screenshot_terminal({
  sessionId: session.id,
  format: "png",
  theme: "dark"
});

Testing CLI Applications

// Run your CLI app
await tools.execute_command({
  sessionId: session.id,
  command: "./my-cli-app --interactive"
});

// Interact with prompts
await tools.send_input({
  sessionId: session.id,
  input: "yes\\n"
});

// Watch for specific output
const result = await tools.watch_terminal_output({
  sessionId: session.id,
  pattern: "Installation complete",
  timeout: 30000
});

Development

# Install dependencies
npm install

# Build
npm run build

# Run in development mode
npm run dev

# Run tests
npm test

# Lint code
npm run lint

Architecture

InTerm is built with:

  • Node PTY: For terminal session management
  • Sharp: For screenshot generation
  • MCP SDK: For Model Context Protocol integration
  • TypeScript: For type safety and development experience

Use Cases

  • TUI Development: Build and test terminal user interfaces
  • CLI Testing: Automate testing of command-line applications
  • DevOps Automation: Script complex terminal interactions
  • Documentation: Generate terminal screenshots for docs
  • Education: Create interactive terminal tutorials
  • Debugging: Capture terminal state for troubleshooting

License

MIT