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 分