🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@ag-bash/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-bash/mcp-server

Standalone Model Context Protocol server for Ag-Bash

Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
44
-27.87%
Maintainers
1
Weekly downloads
 
Created
Source

@ag-bash/mcp-server

A standalone Model Context Protocol (MCP) server that provides a persistent, sandboxed Bash environment to AI agents.

This server leverages the @ag-bash/bash engine to allow agents to execute shell commands, process data with jq, and run Python/JS scripts within a secure virtual filesystem.

🚀 Installation

Install the MCP server globally using npm:

npm install -g @ag-bash/mcp-server

⚙️ Configuration

To use Ag-Bash with your favorite AI client, add it to your mcpConfig.json or equivalent configuration file.

Claude Desktop

On macOS, edit ~/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 with the following details:

  • Name: ag-bash
  • Type: command
  • Command: ag-bash-mcp

🛠️ Available Tools

The server exports the following tools to the agent:

1. run_bash

Executes a bash script in the sandboxed environment.

  • Parameters:
    • script (string, required): The bash code to execute.
  • Features:
    • Automatically persists environment variables, functions, and CWD across calls.
    • Full access to jq, grep, sed, and other unix utilities.

2. get_state

Retrieves the current state of the shell session.

  • Returns:
    • Current working directory (cwd).
    • Active environment variables.
    • Defined functions.

🛡️ Security Features

  • Read-Only Root: By default, the server mounts your current project root as a Read-Only overlay. Any changes made by the agent stay in the virtual memory and never touch your real files.
  • In-Process Sandbox: No external VM required; execution is isolated using Ag-Bash's internal security logic.
  • Resource Limits: Protects against infinite loops and excessive memory consumption.

📜 License

Apache-2.0

Keywords

mcp

FAQs

Package last updated on 16 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts