
funwarioisii/mcp-rb
Deployment & DevOpsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
funwarioisii/MCP-RBは、https://github.com/funwarioisii/mcp-rb.からインポートされたMCPサーバー候補です。
概要
funwarioisii/MCP-RBは、https://github.com/funwarioisii/mcp-rb.からインポートされたMCPサーバー候補です。
概要(AI 翻訳)
Sinatraに似たDSLを搭載したMCP(Model Context Protocol)サーバーを実装するための軽量Rubyフレームワークです。
設置
この行を申請のGemfileに追加してください:
使用法
こちらはMCPサーバーの作成方法の簡単な例です:
サポート仕様
参考文献:MCP 2024-11-05
- ベースプロトコル
- ピング
- スタディオ交通
- サーバー機能
- リソース
- リソース/リード
- リソース/リスト
- リソース/テンプレート/リスト
- ツール
- ツール/リスト
- ツール/コール
まだ対応していない機能です。
テスト
MCP検査官による試験
フォーマット
レイクタスクも使えます:
リリース
新バージョンのリリース:
-
[[T0]へのバージョン更新]
-
アップデート
CHANGELOG.md -
gitタグを作成する
-
RubyGemsを築き上げてプッシュする
変更ログ
詳細 CHANGELOG.md
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP-RB
[!WARNING] This project is no longer maintained, and this repository will be archived.
Please use the official MCP Ruby SDK (
mcpgem) instead. It is actively developed under the Model Context Protocol organization and supports the latest protocol features, including clients, prompts, and the Streamable HTTP transport.gem "mcp"Both
mcp-rbandmcpare loaded withrequire "mcp"and define the top-levelMCPmodule, so removemcp-rbfrom your Gemfile when you switch. See the official documentation to get started.
A lightweight Ruby framework for implementing MCP (Model Context Protocol) servers with a Sinatra-like DSL.
Installation
Add this line to your application’s Gemfile:
gem 'mcp-rb'
Usage
Here’s a simple example of how to create an MCP server:
require 'mcp'
name "hello-world"
version "1.0.0"
# Define a resource
resource "hello://world" do
name "Hello World"
description "A simple hello world message"
call { "Hello, World!" }
end
# Define a resource template
resource_template "hello://{user_name}" do
name "Hello User"
description "A simple hello user message"
call { |args| "Hello, #{args[:user_name]}!" }
end
# Define a tool
tool "greet" do
description "Greet someone by name"
argument :name, String, required: true, description: "Name to greet"
call do |args|
"Hello, #{args[:name]}!"
end
end
# Define a tool with nested arguments
tool "greet_full_name" do
description "Greet someone by their full name"
argument :person, required: true, description: "Person to greet" do
argument :first_name, String, required: false, description: "First name"
argument :last_name, String, required: false, description: "Last name"
end
call do |args|
"Hello, First: #{args[:person][:first_name]} Last: #{args[:person][:last_name]}!"
end
end
# Define a tool with an Array argument
tool "group_greeting" do
description "Greet multiple people at once"
argument :people, Array, required: true, items: String, description: "People to greet"
call do |args|
args[:people].map { |person| "Hello, #{person}!" }.join(", ")
end
end
Supported specifications
Reference: MCP 2024-11-05
- Base Protocol
- ping
- stdio transport
- Server features
- Resources
- resources/read
- resources/list
- resources/templates/list
- Tools
- tools/list
- tools/call
- Resources
Any capabilities are not supported yet.
Testing
rake test
rake test:unit # run only the unit tests, skipping tests that test a running server
Test with MCP Inspector
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →