by funwarioisii
A lightweight Ruby framework for building MCP servers with a Sinatra-like DSL
# Add to your Claude Code skills
git clone https://github.com/funwarioisii/mcp-rbGuides for using mcp servers skills like mcp-rb.
mcp-rb is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by funwarioisii. A lightweight Ruby framework for building MCP servers with a Sinatra-like DSL. It has 202 GitHub stars.
mcp-rb's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/funwarioisii/mcp-rb" and add it to your Claude Code skills directory (see the Installation section above).
mcp-rb is primarily written in Ruby. It is open-source under funwarioisii on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mcp-rb against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
[!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.
Add this line to your application's Gemfile:
gem 'mcp-rb'
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
Reference: MCP 2024-11-05
Any capabilities are not supported yet.
rake test
rake test:unit # run only the unit tests, skipping tests that test a running server
Test with MCP Inspector
bunx @modelcontextprotocol/inspector $(pwd)/examples/hello_world.rb
bundle exec standardrb --fix
You can also use rake tasks:
rake lint # Run standardrb to check code style
rake lint:fix # Auto-fix standardrb issues
To release a new version:
lib/mcp/version.rbCHANGELOG.mdgit add .
git commit -m "Release vx.y.z"
git tag vx.y.z
git push --tags
gem build mcp-rb.gemspec
gem push mcp-rb-*.gem
See CHANGELOG.md