Skip to main content
MCP server CX Codex

zsh-tool — Claude Code MCP server: what it does, how to install

Runs native Zsh sessions with PTY support and hanging-process prevention. Handles interactive password prompts and terminal deltas.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env ALAN_DB_PATH=<ALAN_DB_PATH> --transport stdio zsh-tool -- uvx zsh-tool-mcp
Open on GitHub

What zsh-tool does

Default Bash executors frequently stumble over Zsh syntax and quoting conventions. That causes unnecessary debug loops that waste tokens. This server executes commands directly inside Zsh. Its PTY mode creates a pseudo-terminal, allowing the assistant to handle interactive prompts and enter credentials.

Long-running commands do not freeze the session. Execution yields after a selected duration, returning partial output. You can then collect incremental lines via zsh_poll instead of dumping whole logs. If a command times out three times in a rolling hour, the NEVERHANG circuit breaker cuts it off for 5 minutes.

Telemetry and command history write to SQLite via the A.L.A.N. engine. Without setting the ALAN_DB_PATH environment variable, session history resets on restart.

What it helps with

  • run native Zsh commands without escaping or quotation mismatches
  • enter passwords and handle interactive prompts via PTY mode
  • break hanging processes with the NEVERHANG circuit breaker
  • stream only new console lines using zsh_poll delta checks

Example prompts for the agent

  • Run pass insert mypass using PTY mode and supply the password when prompted.
  • Start pip install . with yield_after set to 5 seconds and poll new output.
  • List all background tasks using zsh_tasks.

How to install zsh-tool

Platform CLI

claude mcp add --env ALAN_DB_PATH=<ALAN_DB_PATH> --transport stdio zsh-tool -- uvx zsh-tool-mcp

Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from zsh-tool-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about zsh-tool

How to install zsh-tool in Claude Code?

Run claude mcp add zsh-tool -- uvx zsh-tool-mcp. If you want to keep the A.L.A.N. SQLite history file, pass the path variable: claude mcp add --env ALAN_DB_PATH=<ALAN_DB_PATH> --transport stdio zsh-tool -- uvx zsh-tool-mcp.

What does zsh-tool do?

It equips Claude Code with a native Zsh runner supporting pseudo-terminals and task control. It prevents session lockups through yield execution and the NEVERHANG breaker.

How does PTY mode work in zsh-tool?

Setting pty: true creates a pseudo-terminal that merges standard streams and supports programs requiring a real TTY. You can feed answers to prompts using zsh_send.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor