Ag Bash

io.github.sairam0424由 GitHub 帳號 sairam0424 發布v6.0.4更新於 Oct 24, 2026

Sandboxed AI-native bash with 70 agentic tools: run_bash, code edit/diff, WASM Python/JS.

已驗證STDIO僅桌面檔案與儲存開發者工具

概覽

AI 產生的概覽

一個本機 MCP 伺服器,為 AI 助理提供持久化、沙箱化的 Bash 環境,以及約 70 個執行腳本與編輯程式碼的工具。

可以做什麼
使用 jq、grep、sed、awk 等完整 Unix 工具集執行 shell 腳本,並在多次呼叫間保持環境狀態(run_bash)。檢視目前工作目錄、環境變數與已定義函式(get_state)。透過智慧套件編輯與比對程式碼、尋找符號、解釋與分析程式碼、產生快照(ag-edit、ag-diff、ag-hover、ag-explain、ag-find-symbol、ag-analyze、ag-snapshot)。擬定計畫、維護筆記本與待辦事項,並透過 WASM 執行 Python 或 JavaScript。
適用情境
適合需要助理在受控沙箱中執行 shell 指令、檢查專案狀態,或進行並審閱程式碼變更的情境,而非直接在主機上操作。適用於 Claude Desktop、Claude Code、Cursor 或 VS Code 中的程式開發與腳本工作流程。
執行需求
以本機 stdio 程序在使用者電腦上執行(僅限桌面端)。需要 Node.js 執行 npm 套件 @ag-bash/mcp-server,例如透過 npx 或全域安裝;README 亦提到 Homebrew。未宣告驗證、環境變數或標頭。
安裝前請注意
此伺服器會執行 shell 指令並修改程式碼,使用前應確認其執行與變更的內容。README 稱專案檔案以唯讀方式掛載、寫入保留在記憶體中,但請在你的環境中核實這一點。速率限制、資源限制與巢狀限制據稱可設定。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Ag Bash,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@ag-bash/mcp-server

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

[npm version] [MCP Registry] [License: Apache-2.0]

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:

bash
claude mcp add ag-bash -- npx -y @ag-bash/mcp-server

Or install it globally:

bash
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)

bash
brew tap sairam0424/tap && brew install ag-bash

Usage

Run the server directly:

bash
npx ag-bash-mcp

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

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 tools40+ tools
Basic bash executionFull agentic suite with semantic code intelligence
Manual state managementPersistent environment across calls

Links

License

Apache-2.0

來源:packages/mcp-server/README.md,提交 efac5c3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v6.0.4最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分