Bash MCP Server

Simple bash command execution MCP server for Claude

Local serverstdio

What is the Bash MCP MCP server?

If you want an AI assistant working directly with Bash MCP, the bash mcp mcp server is the bridge. Simple bash command execution MCP server for Claude.

What Bash MCP does

A simple MCP (Model Context Protocol) server that enables Claude to execute shell commands without permission prompts.

Key capabilities

  • Execute any shell command without permission prompts
  • Run long-running processes in the background
  • Manage background processes (list, kill)
  • Capture stdout and stderr
  • Set working directory for commands
  • Configure timeout for commands
  • Automatic cleanup on server shutdown
  • NEW — Automatic output truncation with full output saved to temp files

Installing the bash mcp mcp server

The server is distributed via npm as npx, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

The server reads 2 environment variables: BASH_MCP_MAX_OUTPUT_SIZE, BASH_MCP_TEMP_DIR. Keep credentials in your client's env block or a secrets manager rather than committing them.

Requirements

  • Node.js >= 16.0.0 - npm or npx

Where it fits

File and storage servers are what separate an assistant that talks about your documents from one that actually works with them. Bash MCP sits in that group. Worth comparing against the other file systems servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • Maintained by tinywind.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the bash mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

How to install the Bash MCP MCP server

{
  "mcpServers": {
    "bash": {
      "command": "npx",
      "args": ["bash-mcp"],
      "env": {
        "BASH_MCP_MAX_OUTPUT_SIZE": "102400",
        "BASH_MCP_TEMP_DIR": "/tmp/bash-mcp-outputs"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

  • Node.js >= 16.0.0 - npm or npx
VariableDescriptionRequired
BASH_MCP_MAX_OUTPUT_SIZEConfiguration value read at startup.Optional
BASH_MCP_TEMP_DIRFilesystem location the server is allowed to use.Optional

Frequently asked questions

It connects Bash MCP to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Bash MCP directly.