Zsh for Claude Code. PTY mode lets Claude type passwords. NEVERHANG + A.L.A.N.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Zsh Tool.
zshExecute command with yield-based oversight
zsh_pollGet new output (delta) from running task with line numbers
zsh_sendSend input to task's stdin
zsh_killKill a running task
zsh_tasksList all active tasks
zsh_healthOverall health status
Zsh execution tool for Claude Code with full Bash parity, yield-based oversight, PTY mode, NEVERHANG circuit breaker, and A.L.A.N. short-term learning.
Status: Beta (v0.7.2)
Author: Claude + Meldrey
License: MIT
Organization: ArkTechNWA
Built with obsessive attention to reliability.
The #1 reason: If you use zsh, Claude Code's Bash tool causes quotation mismatches and shell confusion. Every debug loop costs tokens. zsh-tool eliminates this instantly and permanently.
The token math: One avoided debug spiral = 30+ seconds saved, hundreds of tokens preserved.
zsh-tool is intelligent shell execution:
| Problem | zsh-tool Solution |
|---|---|
| Bash/zsh quotation confusion | Native zsh β no shell mismatch, no debug loops |
| Commands hang forever | Yield-based execution β always get control back |
| No visibility into running commands | zsh_poll β incremental output collection |
| Can't interact with prompts | PTY mode + zsh_send β full interactive support |
| Can't type passwords | PTY mode β let Claude Code type its own passwords |
| Timeouts cascade | NEVERHANG circuit breaker β fail fast, auto-recover |
| No memory between calls | A.L.A.N. 2.0 β retry detection, streak tracking, proactive insights |
| Polling wastes tokens | Intelligent polling β 2s listen window, adaptive suggestions, duration estimates |
| Blind kills, no learning | Kill-aware A.L.A.N. β classifies impatience vs genuine hangs |
| Retrying with wrong flags | manopt β auto-surfaces command options on repeated failures |
| No task management | zsh_tasks, zsh_kill β full control |
This is the difference between "run commands" and "intelligent shell integration."
Commands return after yield_after seconds with partial output if still running:
zsh_pollzsh_sendzsh_kill and zsh_tasksFull pseudo-terminal emulation for interactive programs:
Prevents hanging commands from blocking sessions:
CLOSED (normal) β OPEN (blocking) β HALF_OPEN (testing)Intelligent short-term learning β "Maybe you're fuckin' up, maybe you're doing it right."
git push origin feature-1 β git push origin *cat foo | grep -badopts | sort fails, A.L.A.N. knows which segment failedzsh_poll returns only new output since the last poll, prefixed with global line numbers. No more dumping 800 lines every poll call.
| Field | What it tells you |
|---|---|
from_line / to_line | Line range in this delta (e.g., 801-803) |
new_bytes | Byte count of new output since last poll |
full_output (param) | Pass true to get entire buffer with line numbers |
First poll returns all output from line 1. Subsequent polls continue where the last left off. Completed tasks return the final delta, then empty on re-poll.
zsh_poll performs a 2-second listen window before returning. If output arrives within 2s, it comes back immediately. If not, poll metadata tells the agent what's happening:
| Field | What it tells you |
|---|---|
polls_since_output | How many empty polls in a row |
elapsed_since_last_output_s | Idle time since last output |
alan_estimate | A.L.A.N.'s duration prediction based on command history |
suggestion | Adaptive advice: space out polls, check soon, or consider killing |
Suggestions are advisory only β the agent always decides. A 2-minute pip install no longer generates 40 empty round-trips.
When the agent kills a command, A.L.A.N. records it as a KILLED outcome and classifies why:
| Category | Meaning | Example |
|---|---|---|
EARLY_KILL | Killed well before median completion | "Killed at 30s. Median is 120s. Needs more time." |
LATE_KILL | Ran way past expected duration | "Killed after 180s. Median is 45s. Something is wrong." |
PATTERN_PROBLEM | Template gets killed >50% of the time | "This pattern may need a different approach entirely." |
Kill classification compares kill_elapsed / median_duration to distinguish impatience from genuine hangs.
When a command fails repeatedly, A.L.A.N. surfaces its available options:
manopt lookup in background (2s timeout)Parsed from local man pages. Cached in SQLite. On by default (ALAN_MANOPT_ENABLED=1).
A.L.A.N. treats SSH commands specially, recording two separate observations:
| Observation | What it tracks | Example insight |
|---|---|---|
| Host connectivity | Can we connect to this host? | "Host 'vps' has 67% connection failure rate" |
| Remote command | Does this command work across hosts? | "Remote command 'git pull' reliable across 3 hosts" |
Exit code classification:
0 β Success (connected AND command succeeded)255 β Connection failed (SSH couldn't connect)1-254 β Command failed (connected but remote command failed)This means when ssh host3 'git pull' fails with exit 255, A.L.A.N. knows the host was unreachableβnot that git pull is broken.
| Tool | Purpose |
|---|---|
zsh | Execute command with yield-based oversight |
zsh_poll | Get new output (delta) from running task with line numbers |
zsh_send | Send input to task's stdin |
zsh_kill | Kill a running task |
zsh_tasks | List all active tasks |
zsh_health | Overall health status |
zsh_alan_stats | A.L.A.N. database statistics |
zsh_alan_query | Query pattern insights for a command |
zsh_neverhang_status | Circuit breaker state |
zsh_neverhang_reset | Reset circuit to CLOSED |
Add the ArkTechNWA marketplace to Claude Code:
Then install: /plugin install arktechnwa/zsh-tool
That's it. The plugin auto-installs dependencies on first run.
Enable in ~/.claude/settings.json:
The bundled scripts/run-mcp.sh builds the Rust binary on first run and launches the MCP server.
For local development/testing, the wrapper script automatically detects when CLAUDE_PLUGIN_ROOT isn't expanded and uses the calculated plugin root directory instead. No configuration changes needed.
Alternatively, create a .mcp.local.json with absolute paths:
The ALAN_DB_PATH will be automatically set to {plugin_root}/data/alan.db if not explicitly provided.
Requirements: Rust toolchain (cargo) and zsh must be installed.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/zsh-tool)<a href="https://allmcps.com/mcp/zsh-tool"><img src="https://allmcps.com/api/badge/zsh-tool?style=directory" alt="Zsh Tool on AllMCPs" /></a>