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

just-bash-mcp

v2.5.5

Published

MCP server providing a sandboxed bash environment using just-bash

Readme

just-bash-mcp

npm version License: Apache-2.0

An MCP (Model Context Protocol) server that provides a sandboxed bash environment for AI agents.

Execute bash commands in a secure, isolated environment with an in-memory virtual filesystem.

Built on top of just-bash v2.5.2.

What's New in v2.1.0

  • rg (ripgrep) - Fast regex search with --files, -d, --stats, -t markdown
  • tar - Archive support with compression
  • MountableFS - Mount multiple filesystems at different paths
  • ReadWriteFS - Direct read-write access to real directories
  • Multi-level glob patterns - Improved **/*.ts style matching

Features

  • Sandboxed Execution: Commands run in an isolated virtual filesystem
  • Stateless & Stateful Modes: Choose between isolated executions or persistent filesystem
  • Network Access Control: Optional network access with URL allow-lists
  • Execution Limits: Protection against infinite loops and deep recursion
  • OverlayFS Support: Mount real directories as read-only with copy-on-write
  • MountableFS Support: Mount multiple filesystems at different paths
  • ReadWriteFS Support: Direct read-write access to real directories

Installation

From npm (recommended)

npm install -g just-bash-mcp

# Or with bun
bun add -g just-bash-mcp

From source

git clone https://github.com/dalist1/just-bash-mcp.git
cd just-bash-mcp
bun install
bun run build

Usage

Running the Server

just-bash-mcp

# Or from source
bun run dev

MCP Client Configuration

Using npx (no installation required)

{
  "mcpServers": {
    "just-bash": {
      "command": "npx",
      "args": ["-y", "just-bash-mcp"]
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "just-bash": {
      "command": "npx",
      "args": ["-y", "just-bash-mcp"]
    }
  }
}

Cursor / VS Code (Roo Code / Cline) / Windsurf

Add to your MCP settings:

{
  "mcpServers": {
    "just-bash": {
      "command": "npx",
      "args": ["-y", "just-bash-mcp"]
    }
  }
}

Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | JUST_BASH_CWD | Initial working directory | /home/user | | JUST_BASH_OVERLAY_ROOT | Real directory to mount as overlay (read-only) | - | | JUST_BASH_READ_WRITE_ROOT | Real directory with read-write access | - | | JUST_BASH_MOUNTS | JSON array of mount configurations | - | | JUST_BASH_ALLOW_NETWORK | Enable network access (true/false) | false | | JUST_BASH_ALLOWED_URLS | Comma-separated URL prefixes to allow | - | | JUST_BASH_ALLOWED_METHODS | Comma-separated HTTP methods to allow | GET,HEAD | | JUST_BASH_MAX_REDIRECTS | Maximum HTTP redirects | 20 | | JUST_BASH_NETWORK_TIMEOUT_MS | Network timeout in milliseconds | 30000 | | JUST_BASH_MAX_OUTPUT_LENGTH | Maximum output length | 30000 | | JUST_BASH_MAX_CALL_DEPTH | Maximum function recursion depth | 100 | | JUST_BASH_MAX_COMMAND_COUNT | Maximum total commands per execution | 10000 | | JUST_BASH_MAX_LOOP_ITERATIONS | Maximum iterations per loop | 10000 |

Tools

bash_exec

Execute a bash command in a sandboxed environment. Each execution is isolated.

{
  "name": "bash_exec",
  "arguments": {
    "command": "echo 'Hello World' && ls -la",
    "files": { "/tmp/data.json": "{\"key\": \"value\"}" }
  }
}

bash_exec_persistent

Execute a bash command in a persistent sandboxed environment. The filesystem persists across calls.

bash_reset

Reset the persistent bash environment, clearing all files and state.

bash_write_file / bash_read_file / bash_list_files

File operations in the persistent environment.

bash_info

Get information about the bash environment configuration.

Supported Commands

File Operations

cat, cp, file, ln, ls, mkdir, mv, readlink, rm, split, stat, touch, tree

Text Processing

awk, base64, column, comm, cut, diff, expand, fold, grep (+ egrep, fgrep), head, join, md5sum, nl, od, paste, printf, rev, rg (ripgrep), sed, sha1sum, sha256sum, sort, strings, tac, tail, tr, unexpand, uniq, wc, xargs

Data Processing

jq (JSON), sqlite3 (SQLite), xan (CSV), yq (YAML/XML/TOML)

Compression & Archives

gzip (+ gunzip, zcat), tar

Navigation & Environment

basename, cd, dirname, du, echo, env, export, find, hostname, printenv, pwd, tee

Shell Utilities

alias, bash, chmod, clear, date, expr, false, help, history, seq, sh, sleep, timeout, true, unalias, which

Network Commands (when enabled)

curl, html-to-markdown

Shell Features

  • Pipes: cmd1 | cmd2
  • Redirections: >, >>, 2>, 2>&1, <
  • Command chaining: &&, ||, ;
  • Variables: $VAR, ${VAR}, ${VAR:-default}
  • Glob patterns: *, ?, [...], **/*.ts
  • If/else, functions, loops (for, while, until)
  • Symbolic and hard links

Filesystem Examples

OverlayFS (read from disk, write to memory)

{
  "env": {
    "JUST_BASH_OVERLAY_ROOT": "/path/to/your/project"
  }
}

ReadWriteFS (direct disk access)

{
  "env": {
    "JUST_BASH_READ_WRITE_ROOT": "/path/to/sandbox"
  }
}

MountableFS (multiple mounts)

{
  "env": {
    "JUST_BASH_MOUNTS": "[{\"mountPoint\":\"/data\",\"root\":\"/shared/data\",\"type\":\"overlay\"},{\"mountPoint\":\"/workspace\",\"root\":\"/tmp/work\",\"type\":\"readwrite\"}]"
  }
}

Network Access Examples

{
  "env": {
    "JUST_BASH_ALLOW_NETWORK": "true",
    "JUST_BASH_ALLOWED_URLS": "https://api.github.com,https://api.example.com"
  }
}

Security Model

  • Virtual filesystem isolation (no real filesystem access by default)
  • Execution limits protect against infinite loops and recursion
  • No binary/WASM execution
  • Network disabled by default; when enabled, URL and method allow-lists enforced

License

Apache-2.0