async-bash
An MCP to overcome the issues I was having with opencode's bash tool
claude mcp add --transport stdio xhuw-async-bash-mcp uvx,async-bash-mcp
How to use
async-bash-mcp is an MCP server that allows you to spawn and manage bash commands asynchronously. It enables running multiple shell commands in parallel, monitoring their progress in real time, and querying individual processes for their output and status. This is particularly useful for long-running tasks such as builds, tests, or server processes where you want to observe partial output and make decisions without waiting for a fixed timeout. The server exposes tools to start commands, list active processes, and poll for progress, stdout, stderr, elapsed time, and exit codes.
To use it in your workflow, configure your environment or integration to point to the async-bash MCP server. The server is designed to replace the built-in bash tool in opencode-style configurations, enabling richer, incremental feedback for agents. Typical usage includes spawning a long-running command, monitoring its progress, and running additional commands in parallel while the first one continues to execute.
How to install
Prerequisites:
- Python 3.8+ (for the underlying tooling and PyPI package hosting)
- A working Python package manager (pip)
- Optional: pipx for isolated tool installs
Installation steps:
- Ensure Python and pip are available:
- Check Python: python3 --version
- Check pip: pip --version
- Install the uvx runner (used to execute MCP servers via the uvx interface):
- If you have pipx: pipx install uvx
- Or install with pip (may require an additional setup for PATH): pip install uvx
- Install and run the MCP server:
- Install the async-bash-mcp package via the uvx runner: uvx async-bash-mcp
- This will install the package and make the command available as 'async-bash-mcp' for the MCP server setup.
- Verify installation:
- Run a quick help or version check if available, for example: uvx --help async-bash-mcp --help
- Start using the MCP server by configuring your opencode.json or equivalent to point to the server as shown in the example configuration.
Additional notes
Tips and notes:
- The server exposes three main tools: spawn (to start a bash command asynchronously), list_processes (to view running/recent processes), and poll (to fetch real-time progress including stdout, stderr, elapsed time, and exit code).
- Use spawn to launch long-running commands in the background and then poll to monitor progress or tail outputs.
- If a command needs to be terminated, use poll with terminate set to true or implement logic to send a termination signal to the process.
- Ensure environment compatibility with your shell and working directories when spawning commands (cwd can be provided with spawn).
- This MCP server is designed to handle multiple commands in parallel and provide incremental feedback, improving decision-making for agents during task execution.
Related MCP Servers
mcp
Official MCP Servers for AWS
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
pfsense
pfSense MCP Server enables security administrators to manage their pfSense firewalls using natural language through AI assistants like Claude Desktop. Simply ask "Show me blocked IPs" or "Run a PCI compliance check" instead of navigating complex interfaces. Supports REST/XML-RPC/SSH connections, and includes built-in complian
mcp -memos-py
A Python package enabling LLM models to interact with the Memos server via the MCP interface for searching, creating, retrieving, and managing memos.
applescript
MCP server that execute applescript giving you full control of your Mac