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

terminal-pilot-mcp

v0.0.9

Published

MCP server that exposes terminal pilot automation as tools.

Readme

terminal-pilot-mcp

MCP server that wraps terminal-pilot and exposes terminal automation as MCP tools.

To install the companion CLI skill that teaches agents how to use these tools, see the terminal-pilot CLI skill installer.

Install

npm install -g terminal-pilot-mcp

Run it

Development:

npx tsx packages/terminal-pilot-mcp/src/cli.ts

Built / installed package:

terminal-pilot-mcp

Programmatic:

import { main } from "terminal-pilot-mcp";

await main();

Connect to an MCP client

Claude Code (~/.claude.json or project .mcp.json):

{
  "mcpServers": {
    "terminal-pilot": {
      "command": "terminal-pilot-mcp"
    }
  }
}

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "terminal-pilot": {
      "command": "terminal-pilot-mcp"
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "terminal-pilot": {
      "command": "terminal-pilot-mcp"
    }
  }
}

Without a global install — use npx in any of the configs above:

{
  "mcpServers": {
    "terminal-pilot": {
      "command": "npx",
      "args": ["terminal-pilot-mcp"]
    }
  }
}

Tools

void means the tool returns no payload.

| Tool | Input | Output | | --- | --- | --- | | terminal_create_session | { command: string, args?: string[], cwd?: string, cols?: number, rows?: number, observe?: boolean } | { sessionId: string, pid: number } | | terminal_fill | { sessionId: string, text: string } | void | | terminal_type | { sessionId: string, text: string } | void | | terminal_press_key | { sessionId: string, key: TerminalKey } | void | | terminal_send_signal | { sessionId: string, signal: string } | void | | terminal_wait_for | { sessionId: string, pattern: string, timeout?: number, literal?: boolean } | { matched: true, line: string } | | terminal_wait_for_exit | { sessionId: string, timeout?: number } | { exitCode: number } | | terminal_read_screen | { sessionId: string } | { lines: string[], cursor: { row: number, col: number }, size: { rows: number, cols: number }, exitCode: number \| null } | | terminal_read_history | { sessionId: string, last?: number } | { lines: string[], exitCode: number \| null } | | terminal_resize | { sessionId: string, cols: number, rows: number } | void | | terminal_close_session | { sessionId: string } | { exitCode: number } | | terminal_get_session | { sessionId: string } | { id: string, pid: number, command: string, exitCode: number \| null } | | terminal_list_sessions | {} | { sessions: Array<{ id: string, command: string, pid: number }> } |

Practical notes:

  • terminal_fill sends text all at once (\n\r). Use for bulk text entry.
  • terminal_type sends text character-by-character with a small delay between keystrokes. Use for TUI apps that react to each keystroke (vim insert mode, readline, etc.).
  • terminal_wait_for.pattern is compiled as a JavaScript RegExp by default. Set literal: true to match the string exactly (no regex interpretation — safe for file names, dots, etc.).
  • terminal_wait_for_exit blocks until the process exits and returns its exit code. Throws on timeout.
  • terminal_read_screen and terminal_read_history include exitCode: number | null so you can check whether the session is still running without a separate call.
  • terminal_get_session reads session metadata without any side effects — useful for checking exitCode before deciding whether to wait or close.
  • terminal_close_session kills the process (if still running) and removes the session from the server's session map. After this call, the session ID is invalid.
  • terminal_read_screen returns the current visible screen, not scrollback.
  • terminal_read_history returns ANSI-stripped output since session start.
  • terminal_list_sessions returns running sessions only (sessions whose process has exited are excluded from the list but remain accessible via terminal_get_session until terminal_close_session is called).
  • observe: true mirrors PTY output to stderr, useful when debugging MCP-driven runs.

Minimal MCP flow:

{"tool":"terminal_create_session","arguments":{"command":"poe-code","args":["configure"]}}
{"tool":"terminal_wait_for","arguments":{"sessionId":"<id>","pattern":"Pick an agent to configure:"}}
{"tool":"terminal_press_key","arguments":{"sessionId":"<id>","key":"Enter"}}
{"tool":"terminal_read_screen","arguments":{"sessionId":"<id>"}}
{"tool":"terminal_close_session","arguments":{"sessionId":"<id>"}}

Environment variables

There are no environment variables specific to this package. The MCP server inherits the process environment; spawned terminal sessions inherit from that unless overridden per session.