mcp-server-bash-sdk

Build MCP servers in pure Bash with JSON-RPC 2.0 over stdio.

7|2|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/mcp-skills --skill mcp-server-bash-sdk-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp-server-bash-sdk
Source: https://github.com/reason-machines/mcp-skills/tree/main/skills/mcp-server-bash-sdk
Command: npx skills add https://github.com/reason-machines/mcp-skills --skill mcp-server-bash-sdk-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq.

What problem does it solve? Building MCP servers typically requires Node.js or Python runtimes, which adds deployment overhead for simple API wrappers and system utilities. This Skill guides you through creating lightweight MCP servers in pure Bash with only jq for JSON processing. ## Core Features & Use Cases - Function-Based Tool Definition: Define tools as Bash functions prefixed with tool_ that accept JSON arguments and return results via echo and exit codes. - External JSON Configuration: Declare tool schemas and server metadata in separate JSON files for automatic tool discovery. - Use Case: Wrap the OpenWeatherMap API as an MCP server with get_weather and get_forecast tools, then register it in Claude Desktop or VS Code so the AI assistant can query live weather data. ## Quick Start Create a Bash MCP server using the mcp-server-bash-sdk that exposes a weather lookup tool backed by the OpenWeatherMap API.

Frequently Asked Questions about mcp-server-bash-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an MCP server in Bash?▼

Source the mcpserver_core.sh protocol layer, define functions prefixed with tool_ that accept JSON arguments as $1, and declare tool schemas in a tools JSON file. Call run_mcp_server at the end to start JSON-RPC communication over stdio.

What are the requirements for a Bash MCP server?▼

You need Bash 4.0 or later and jq for JSON processing. No Node.js, Python, or other runtimes are required since the SDK handles the MCP protocol layer in pure shell script.

Can I use a Bash MCP server with Claude Desktop?▼

Yes, register the server script path in claude_desktop_config.json under mcpServers with the command pointing to your executable Bash script. Environment variables like API keys can be passed through the env object.

Why is my Bash MCP tool function not found?▼

The function name must exactly match the tool name in tools_list.json with the tool_ prefix, and the function must be defined before run_mcp_server is called. Validate the JSON file with jq and test discovery using the tools/list method.

How do I debug JSON parsing errors in a Bash MCP server?▼

Validate input with jq before processing and use jq -n --arg to construct JSON output instead of string interpolation, which avoids shell expansion issues. Enable logging via MCP_LOG_FILE and write debug output to stderr.