@ag-bash/mcp-server
MCP server exposing 70 ag-bash tools to Claude Desktop and other MCP hosts

A standalone Model Context Protocol (MCP) server that gives AI agents a persistent, sandboxed Bash environment, exposing 70 tools over stdio.
Installation
Add the server to Claude Code in one line:
claude mcp add ag-bash -- npx -y @ag-bash/mcp-server
Or install it globally:
npm install -g @ag-bash/mcp-server
Claude Code plugin
Install via the self-hosted marketplace:
/plugin marketplace add sairam0424/ag-bash
/plugin install ag-bash@ag-bash
MCP Registry
Listed as io.github.sairam0424/ag-bash (active) at registry.modelcontextprotocol.io.
Also available via: Homebrew (ag-bash-mcp bin) Β· Docker MCP Catalog (in review)
brew tap sairam0424/tap && brew install ag-bash
Usage
Run the server directly:
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"ag-bash": {
"command": "ag-bash-mcp",
"args": []
}
}
}
Cursor / VS Code
Add a new MCP server in your IDE settings:
- Name:
ag-bash
- Type:
command
- Command:
ag-bash-mcp
What's Exposed
run_bash β Execute scripts with full unix toolkit (jq, grep, sed, awk, etc.)
get_state β Inspect CWD, environment variables, and defined functions
- Agentic suite β
ag-edit, ag-diff, ag-hover, ag-explain, ag-find-symbol, ag-todo, ag-analyze, ag-snapshot, ag-plan, ag-notebook, ag-mcp
- 70 tools total via JSON-RPC 2.0 with Zod schema validation on every input
Features
- Rate limiting β 60 requests/minute per session (configurable)
- Read-only root β Project files mounted as overlay; writes stay in memory
- Sanitized errors β JSON-RPC responses strip file paths, capped at 200 chars
- Zero console leakage β All diagnostics flow through structured handlers
- Resource limits β Protection against infinite loops and excessive memory
- Orchestration governance β Agent nesting limits prevent recursive loops
v4.1 Upgrade Notes
| Before (v3.x) | After (v4.1) |
|---|
| 6 tools | 40+ tools |
| Basic bash execution | Full agentic suite with semantic code intelligence |
| Manual state management | Persistent environment across calls |
Links
License
Apache-2.0