
patvice/ruby_llm-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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とクリーンに動作するよう構築されています。完全に仕様に準拠することを目指しています。
RubyLLMのチャットからstdio、ストリーム可能なHTTP、またはSSE経由でMCPツール、リソース、プロンプトを活用してください。
プロトコルサポート: MCP仕様2025-06-18(安定)を完全にサポートし、ドラフト仕様2026-01-26が利用可能です。
RubyLLM::MCP Out of the Box
私たちの目標は、MCPをできるだけ簡単にRuby/RubyLLMアプリに接続できるようにすることです。
RubyLLM::MCPはそれを提供します:
- Ruby-first API - RubyLLMチャットワークフローでMCPツール、リソース、プロンプトを直接利用
- デフォルトで安定したプロトコルトラック(
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|
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →