PR

patvice/ruby_llm-mcp

Developer tools

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

269 stars 44 forks 품질 62 트렌드 32MIT

patvice/ruby_llm-mcp는 https://github.com/patvice/ruby_llm-mcp.에서 가져온 MCP 서버 후보입니다.

개요

patvice/ruby_llm-mcp는 https://github.com/patvice/ruby_llm-mcp.에서 가져온 MCP 서버 후보입니다.

개요(AI 번역)

Ruby와 RubyLLM용 MCP, 최대한 쉽게 사용할 수 있습니다.

RubyLLM::MCP는 Model Context Protocol(MCP)용 Ruby 클라이언트로, RubyLLM과 깔끔하게 연동되도록 설계되었습니다. 완전한 사양 준수를 목표로 합니다.

MCP 도구, 리소스, 그리고 RubyLLM 채팅에서 stdio, 스트리밍 가능한 HTTP, 또는 SSE를 통해 프롬프트를 활용하세요.

프로토콜 지원: MCP 사양 2025-06-18(안정적)을 완전 지원하며, 초안 사양 2026-01-26 제공.

RubyLLM::MCP Out of the Box

저희의 목표는 MCP를 Ruby/RubyLLM 앱에 최대한 쉽게 연결할 수 있도록 하는 것입니다.

RubyLLM::MCP는 다음과 같은 것을 제공합니다:

  • RubyLLM 채팅 워크플로우에서 MCP 도구, 리소스, 프롬프트를 직접 사용할 수 있는 Ruby 우선 API
  • 기본적으로 안정 프로토콜 트랙(2025-06-18), 선택 선택 가능한 초안 트랙(2026-01-26)
  • 실시간 및 상호작용 워크플로우를 위한 내장 알림 및 응답 핸들러
  • MCP OAuth 2.1 인증 지원(PKCE, 동적 등록, 검색 및 자동 토큰 갱정)
  • Rails 앱(사용자별 연결) 및 브라우저 기반 CLI 플로우용 OAuth 설정 경로
  • RubyLLM을 사용하는 모든 Ruby 앱, 백그라운드 작업 또는 Rails 프로젝트에 대한 직관적인 통합

코드를 보여줘

특징

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

README

원문 README의 일부입니다. 원문 보기.

RubyLLM::MCP is a Ruby client for the Model Context Protocol (MCP), built to work cleanly with RubyLLM. Aiming to be completely spec compliant.

Use MCP tools, resources, and prompts from your RubyLLM chats over stdio, streamable HTTP, or SSE.

Protocol support: Fully supports MCP spec 2025-06-18 (stable), with draft spec 2026-01-26 available.

RubyLLM::MCP Out of the Box

Our goal is to be able to plug MCP into Ruby/RubyLLM apps as easily as possible.

RubyLLM::MCP gives you that:

  • Ruby-first API for using MCP tools, resources, and prompts directly in RubyLLM chat workflows
  • Stable protocol track by default (2025-06-18), with opt-in draft track (2026-01-26)
  • Built-in notification and response handlers for real-time and interactive workflows
  • MCP OAuth 2.1 authentication support (PKCE, dynamic registration, discovery, and automatic token refresh)
  • OAuth setup paths for Rails apps (per-user connections) and browser-based CLI flows
  • Straightforward integration for any Ruby app, background job, or Rails project using RubyLLM

Show me the code

# Basic setup
require "ruby_llm/mcp"

RubyLLM.configure do |config|
  config.openai_api_key = ENV.fetch("OPENAI_API_KEY")
end

client = RubyLLM::MCP.client(
  name: "filesystem",
  transport_type: :stdio,
  config: {
    command: "bunx",
    args: ["@modelcontextprotocol/server-filesystem", Dir.pwd]
  }
)

chat = RubyLLM.chat(model: "gpt-4.1-mini")
chat.with_tools(*client.tools)

puts chat.ask("Find Ruby files modified today and summarize what changed.")
# Resources
resource = client.resource("release_notes")
chat = RubyLLM.chat(model: "gpt-4.1-mini")
chat.with_resource(resource)

puts chat.ask("Summarize release notes for the team in 5 bullet points.")
# Prompts
prompt = client.prompt("code_review")
chat = RubyLLM.chat(model: "gpt-4.1-mini")

response = chat.ask_prompt(
  prompt,
  arguments: {
    language: "ruby",
    focus: "security"
  }
)

puts response
# Handlers (response + notifications)
client.on_progress do |progress|
  puts "Progress: #{progress.progress}% - #{progress.message}"
end

client.on_logging do |logging|
  puts "[#{logging.level}] #{logging.message}"
end

chat = RubyLLM.chat(model: "gpt-4.1-mini")
chat.with_tools(*client.tools)

chat.ask("Run a repository scan and summarize risks.") do |chunk|
GitHub에서 전체 README 보기

설치

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

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