FM

funwarioisii/mcp-rb

Deployment & DevOps

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

203 stars 15 forks 품질 43 트렌드 37MIT

funwarioisii/mcp-rb는 [[T0]에서 임포트한 MCP 서버 후보입니다.

개요

funwarioisii/mcp-rb는 [[T0]에서 임포트한 MCP 서버 후보입니다.

개요(AI 번역)

Sinatra와 유사한 DSL을 탑재한 MCP(모델 컨텍스트 프로토콜) 서버를 구현하기 위한 경량 Ruby 프레임워크입니다.

설치

이 줄을 신청서의 보석 파일에 추가하세요:

사용

다음은 MCP 서버를 만드는 간단한 예시입니다:

지원 사양

참고: MCP 2024-11-05

  • 기본 프로토콜
  • 핑
  • Stdio 교통
  • 서버 기능
  • 자료
  • 자료/읽기 자료
  • 자료/목록
  • 자료/템플릿/목록
  • 도구
  • 도구/목록
  • 도구/호출

아직 어떤 기능도 지원되지 않습니다.

테스트

MCP 검사관과의 시험

포맷팅

레이크 작업도 사용할 수 있습니다:

개봉

새 버전을 출시하려면:

  1. [[T0]로 버전 업데이트

  2. 업데이트 CHANGELOG.md

  3. git 태그 생성

  4. 빌드 및 루비젬 밀기

변경 기록

참고 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 (mcp gem) 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-rb and mcp are loaded with require "mcp" and define the top-level MCP module, so remove mcp-rb from 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

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

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →