
muthuishere/mcp-server-bash-sdk
Analytics & monitoringこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCPサーバーSDK/例を完全にbashで実装 — POSIXシェル以外のランタイム依存関係のないモデルコンテキストプロトコルサーバーを構築します。
概要
純粋なBashでのモデルコンテキストプロトコル(MCP)サーバーの軽量でオーバーヘッドゼロの実装です。 ほとんどのMCPサーバーはスキーマ変換付きのAPIラッパーです。この実装はNode.js、Python、その他の重いランタイムに対するゼロオーバーヘッドの代替を提供します。 * ✅ 標準上での完全なJSON-RPC 2.0プロトコル * ✅ 完全なMCPプロトコル実装 * ✅ 関数命名規則による動的ツール検出 * ✅ JSONファイルによる外部設定 * ✅ カスタムツールで簡単に拡張できる - Bash shell - JSON処理用のjq(macOSでjqをbrewインストール) - : JSON-RPCおよびMCPプロトコルを扱う- : ビジネスロジック関数を含む - : JSON 設定ファイル MCPサーバー向けのツール機能を実装する際は、以下のガイドラインに従ってください: 1. : すべてのツール関数はtool_で接頭辞を付け、tools_list.jsonで定義された名前を付けること 2.: 各関数はJSON引数を含む単一のパラメータ$1を受け入れるべきです。3.: 成功する操作では、結果をエコーし、0 4を返します。
概要(AI 翻訳)
純粋なBashでのモデルコンテキストプロトコル(MCP)サーバーの軽量で無オーバーヘッドの実装で、現在の2026-07-28リビジョンをターゲットにしています。
📖 ドキュメントサイト🧩例🧠アーキテクチャの決定🔬スパイク
なぜ? ほとんどのMCPサーバーはスキーマ変換付きのAPIラッパーに過ぎません。この実装はNode.js、Python、その他の重いランタイムに対するゼロオーバーヘッドの代替手段を提供します。
なぜ今なのか? 2026年7月28日の改訂版でMCPはステートレスとなりました:initializeのハンドシェイクなし、セッションなし、サーバー発起のリクエストなし。入力1行、出力1行――これはまさにシェルリードループの形状です。Bashはぎこちないフィットから自然なフィットへと変わりました。
📋 特徴
- ✅ MCP 2026-07-28 — ステートレス、リクエストごとのバージョン交渉
- ✅ 両方の標準トランスポート:stdioとStreamable HTTP、同じサーバーファイルから
- ✅
server/discover,tools/list,tools/call - ✅ 関数命名規則による動的ツール発見
- ✅ JSONファイルによる外部設定
- ✅ 公式公開のJSONスキーマに対して検証済みの出力
🔧 要件
- Bash 3.2以降(macOSでは3.2が
/bin/bashとして出荷)
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
🐚 MCP Server in Bash
A lightweight, zero-overhead implementation of the Model Context Protocol (MCP) server in pure Bash — targeting the current 2026-07-28 revision.
📖 Documentation site · 🧩 Examples · 🧠 Architecture decisions · 🔬 Spikes
Why? Most MCP servers are just API wrappers with schema conversion. This implementation provides a zero-overhead alternative to Node.js, Python, or other heavy runtimes.
Why now? The 2026-07-28 revision made MCP stateless: no initialize handshake, no sessions, no server-initiated requests. One line in, one line out — which is exactly the shape of a shell read loop. Bash went from an awkward fit to a natural one.
📋 Features
- ✅ MCP 2026-07-28 — stateless, per-request version negotiation
- ✅ Both standard transports: stdio and Streamable HTTP, from the same server file
- ✅
server/discover,tools/list,tools/call - ✅ Dynamic tool discovery via function naming convention
- ✅ External configuration via JSON files
- ✅ Output validated against the official published JSON Schema
🔧 Requirements
- Bash 3.2 or newer (3.2 is what macOS ships as
/bin/bash) jqfor JSON processing (brew install jq/apt install jq/apk add jq)- (HTTP transport only)
socatpreferred, ornetcat— see the note under Transports - (optional) Python with
jsonschema, only to run the schema conformance test
Supported platforms
Verified by running the real test suites on each, not by inspection —
./scripts/test-linux.sh all reproduces the Linux rows on any machine with Docker.
| Platform | Shell | Unit | HTTP |
|---|---|---|---|
| macOS | bash 3.2 (/bin/bash) and 5.x |
31/31 | 19/19 |
| Debian / Ubuntu | bash 5.2 | 31/31 | 19/19 |
| Alpine (musl + busybox) | bash 5.3 | 31/31 | 19/19 |
Docker is needed only to verify other platforms — never to run a server.
🚀 Quick Start
- Clone the repo
git clone https://github.com/muthuishere/mcp-server-bash-sdk
cd mcp-server-bash-sdk
- Make scripts executable
chmod +x mcpserver_core.sh moviemcpserver.sh
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →