async-bash-mcp
An MCP server for spawning and managing bash commands asynchronously. Run multiple shell commands in parallel and check their progress independently.
README
async-bash-mcp
An MCP server for spawning and managing bash commands asynchronously. Run multiple shell commands in parallel and check their progress independently.
Usage with opencode
Add to your opencode.json config to replace the bash tool with async-bash-mcp:
{
"$schema": "https://opencode.ai/config.json",
"tools": {
"bash": false
},
"mcp": {
"async-bash": {
"type": "local",
"command": ["uvx", "async-bash-mcp"],
"enabled": true
}
}
}
Then use commands like:
- "Spawn a long-running build in the background"
- "Run tests in parallel and show me the results"
- "Start a server and tell me when it's ready"
Why async bash?
When working with long-running commands like builds, tests, or servers, the agent needs to:
- Monitor progress incrementally without committing to a fixed timeout
- Run multiple commands in parallel and check each independently
- Make decisions about continuing or terminating based on partial output
- Process real-time feedback as commands generate output
This tool provides the agent with better information for decision-making, leading to faster task completion and fewer confused responses.
Key advantages over the built-in bash tool:
- Better decision making: Agents can see partial output and make informed choices about continuing or terminating
- Parallel execution: Run multiple commands simultaneously
- No timeout guessing: Check progress incrementally instead of setting timeouts upfront
- Faster iterations: No waiting for arbitrary timeouts when errors are already visible
This tool is designed to replace opencode's bash tool for any scenario involving potentially long-running commands, giving agents the information they need to make better decisions and save you time.
Tools
spawn - Launch a bash command asynchronously
command(str): The bash command to runcwd(str, optional): Working directory path- Returns a process ID for tracking
list_processes - Show all running/recent processes
- No parameters
- Returns array of
{"ID": int, "command": str, "done": bool}
poll - Check progress of a spawned process
process_id(int): ID from spawn commandwait(int): Wait time in millisecondsterminate(bool, optional): Kill process before returning results- Returns
{"stdout": str, "stderr": str, "elapsedTime": float, "finished": bool, "exitCode": int}
Installation
uvx async-bash-mcp
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.