muthuishere/mcp-server-bash-sdk

MCP server SDK/example implemented entirely in bash — build a Model Context Protocol server with no runtime dependency beyond a POSIX shell.

What it solves

This project provides a lightweight, zero-overhead way to build Model Context Protocol (MCP) servers using pure Bash. It eliminates the need for heavy runtimes like Node.js or Python for simple MCP servers, which are often just API wrappers with schema conversion.

How it works

It implements the MCP 2026-07-28 revision, which is stateless, making it a natural fit for a shell read loop. The SDK consists of a core processing script (mcpserver_core.sh) that handles JSON-RPC framing, version negotiation, and dispatching. Developers create their own servers by sourcing this core and defining business logic in functions prefixed with tool_.

It supports two standard transports:

  • stdio: The default mode where the AI system launches the server as a subprocess.
  • Streamable HTTP: A local endpoint mode (using socat or netcat) that allows POST requests to be processed as MCP messages.

Who it’s for

Developers who want to build minimal, fast-loading MCP servers without the overhead of a full programming language runtime, particularly for local tool execution or wrapping existing shell commands and APIs.

Highlights

  • Zero Runtime Overhead: Built in pure Bash (3.2+), requiring only jq for JSON processing.
  • Stateless Protocol: Specifically targets the 2026-07-28 MCP revision for maximum efficiency.
  • Dual Transport Support: Same server logic works for both stdio and HTTP transports.
  • Dynamic Tool Discovery: Tools are automatically dispatched based on function naming conventions.
  • Schema Validated: Output is validated against official published JSON schemas.

Related

  • Project
  • Project
  • Project
  • Project
  • Project