mcp-bash MCP Server

$mcp-bash new my-server && cd my-server
README.md

A framework for building MCP servers using pure Bash scripts.

mcp-bash

Repository: `mcp-bash-framework`  •  CLI/Binary: mcp-bash

Contents

The most complete MCP implementation in pure Bash. Tools, resources, prompts, elicitation, roots, progress, cancellation—the full spec, no runtimes beyond your shell.

  • Runs on Bash 3.2+ (macOS/Linux stock). No Node, no Python, no containers.
  • Handles concurrency, timeouts, and cancellation the way production systems need.
  • You write the tools. The framework stays out of your way.

TL;DR

Turn any Bash script into an MCP tool in minutes. No Node, no Python, no containers.

mcp-bash new my-server && cd my-server
mcp-bash scaffold tool my-tool   # edit tools/my-tool/tool.sh
mcp-bash config --client cursor  # paste into your MCP client
mcp-bash bundle                  # create distributable package

What you’ll build

flowchart TD
  Client["MCP client(Claude Desktop / Cursor / Windsurf)"]
  Transport["stdio (JSON-RPC)"]
  Framework["mcp-bash framework(registry + runtime + policy)"]
  Project["Your projecttools/ resources/ prompts/ server.d/"]

  Client --> Transport --> Framework --> Project

Design Principles

  • Tools shouldn’t need another runtime to talk to AI.
  • Everything must be inspectable. No magic.
  • If it’s not needed in production, it isn’t in the framework.
  • Your project stays yours. The framework upgrades cleanly.

MCP Spec Coverage

mcp-bash targets the 2025-11-25 MCP specification with negotiated downgrades to older versions.

Category Coverage Notes
Core Protocol ✅ Full Lifecycle, ping, capabilities, downgrades
Tools ✅ Full list, call, icons, errors, listChanged, annotations
Resources ✅ Full list, read, subscriptions, templates, binary, annotations
Prompts ✅ Full list, get, arguments, icons
Utilities ✅ Full Progress, cancellation, logging, completion
Elicitation ✅ Full Form, URL, enum, multi-choice modes
Roots ✅ Full Server→client request, listChanged
MCP Apps (UI) ⚠️ Partial ui:// resources, templates; interactivity blocked by host bug

Not yet implemented: Audio content, sampling. Tasks (async job/poll) and server-identity discovery are HTTP-oriented and not applicable to stdio.

Transport is stdio-only by design. See Remote Connectivity for HTTP/SSE proxy options, including the shared-secret guard (MCPBASH_REMOTE_TOKEN) and readiness probe (mcp-bash --health).

Full compliance matrix

For a complete feature-by-feature breakdown across all MCP versions, see the Feature Support Matrix in SPEC-COMPLIANCE.md.

Why Bash?

mcp-bash TypeScript SDK Python SDK
Runtime Bash 3.2+ (pre-installed) Node.js 18+ Python 3.10+
Install curl | bash or git clone npm install pip install
Startup No VM warmup Node.js startup Python startup
Dependencies jq or gojq npm packages pip packages
Best for Shell automation, existing scripts, air-gapped/minimal environments Node.js applications Python applications

If your tools are already shell scripts, wrapping them in Node or Python adds complexity for no benefit. mcp-bash lets you expose them directly.

Quick Start

When you run mcp-bash from inside a project (a directory containing server.d/server.meta.json), it auto-detects the project root. Running mcp-bash outside any project starts a tempo

Environment Variables

MCPBASH_REMOTE_TOKENShared-secret guard for remote connectivity

Configuration

claude_desktop_config.json
{
  "mcpServers": {
    "mcp-bash": {
      "command": "/path/to/mcp-bash",
      "args": ["start"],
      "env": {
        "PATH": "/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

Try it

Create a new MCP server project using the Bash framework.
Scaffold a new tool called 'system-check' in my mcp-bash project.
Generate a distributable bundle for my Bash-based MCP server.
Configure my Cursor client to use this Bash MCP server.

Frequently Asked Questions

What are the key features of mcp-bash?

Pure Bash 3.2+ implementation with no Node.js or Python dependencies.. Full MCP spec coverage including tools, resources, prompts, and progress.. Handles concurrency, timeouts, and cancellation for production use.. Built-in scaffolding for new projects, tools, and resources..

What can I use mcp-bash for?

Exposing existing shell scripts as AI tools without rewriting them in another language.. Building MCP servers for air-gapped or minimal environments where only Bash is available.. Automating system-level tasks and shell workflows through an AI interface.. Creating lightweight, fast-starting MCP servers with zero VM warmup time..

How do I install mcp-bash?

Install mcp-bash by running: mcp-bash new my-server && cd my-server

What MCP clients work with mcp-bash?

mcp-bash works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use mcp-bash with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free