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

@cynosure-mcp/shell-commands

v0.2.1

Published

MCP server for running and interacting with managed Bash and terminal processes

Readme

Shell Commands MCP

MCP server for running Bash commands and interacting with managed long-running or terminal processes.

Security and authorization

This server intentionally provides arbitrary command execution with the permissions of its operating-system process. It does not parse commands, restrict paths, or provide a filesystem or network sandbox. Authorization is expected to be handled by the MCP client's human-in-the-loop gate. Run the server in a container or restricted OS account when requests are not fully trusted.

Linux and macOS are the supported platforms. Pipe mode may work on Windows when a Bash-compatible shell is installed, and PTY mode uses ConPTY where node-pty supports it, but Windows process-tree cleanup is currently best-effort.

Tools

exec_command

Starts one command using bash -c. Short commands return their final output directly. If a command is still running after yield_time_ms, the result has status running and includes a session_id for later calls.

Inputs include:

  • command and optional cwd
  • yield_time_ms from 250 to 30000, defaulting to 10000
  • optional timeout_ms; omitted means no absolute runtime limit
  • initial stdin, environment overrides, and inherited variables to unset
  • close_stdin, defaulting to true for pipes and false for PTYs
  • pty, with optional terminal columns and rows

interact_with_process

Uses a returned session_id to retrieve incremental output, send exact input, close pipe stdin, resize a PTY, or send interrupt, terminate, or kill. Input is written exactly as supplied; callers must include newlines or control characters themselves.

Pipe processes return separate stdout and stderr. PTY processes return merged output. Both tools also return validated structured data describing status, exit code, signal, duration, termination reason, and dropped output.

Long-running process lifecycle

Managed sessions expire after ten minutes without a poll or input by default. Output activity does not reset that deadline. Explicit termination and idle expiry send SIGTERM, then SIGKILL after one second on POSIX. All sessions are also stopped when the MCP transport or server shuts down.

Output is retained incrementally. If unread output exceeds the configured limit, the oldest bytes are discarded so recent logs and final errors remain available; results report the number of discarded bytes.

PTY support is provided by the optional native node-pty dependency. A failed optional installation does not disable pipe execution; requesting pty: true will instead return an actionable error.

Configuration

| Variable | Default | Purpose | | --- | --- | --- | | SHELL_COMMANDS_SHELL | /bin/bash | Bash-compatible shell executable (bash from PATH on Windows) | | SHELL_COMMANDS_MAX_OUTPUT_BYTES | 262144 | Maximum unread bytes retained per output stream, from 1024 to 10485760 | | SHELL_COMMANDS_SESSION_IDLE_TIMEOUT_MS | 600000 | Session idle lifetime, from 5000 to 86400000 ms | | SHELL_COMMANDS_MAX_CONCURRENT_PROCESSES | 8 | Maximum concurrently running processes, from 1 to 64 |

Example:

SHELL_COMMANDS_SESSION_IDLE_TIMEOUT_MS=1800000 \
SHELL_COMMANDS_MAX_CONCURRENT_PROCESSES=4 \
npx -y @cynosure-mcp/shell-commands

Development

npm install
npm test