
Ruby Mcp Server Generator
Bootstrap a Ruby MCP server with tools, prompts, resources, bin entrypoint, and Minitest layout using the official mcp gem.
Overview
ruby-mcp-server-generator is an agent skill for the Build phase that generates a complete Ruby MCP server project with tools, prompts, resources, and tests via the official MCP Ruby SDK.
Install
npx skills add https://github.com/github/awesome-copilot --skill ruby-mcp-server-generatorWhat is this skill?
- Full directory scaffold: lib server, tools, prompts, resources, bin/mcp-server, and test tree
- Gemfile pins mcp ~> 0.4.0 with Minitest, Rake, and RuboCop dev tooling
- Rake default runs tests and RuboCop for a minimal quality gate
- Separate tool, prompt, and resource example files following SDK conventions
- Production-ready naming and require structure for incremental tool additions
- Example scaffold includes greet and calculate tools plus code review prompt and example resource
Adoption & trust: 8.4k installs on skills.sh; 34.6k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need agent-facing MCP tools in Ruby but do not have a standard project tree, gem wiring, or test harness for the mcp SDK.
Who is it for?
Solo Ruby developers adding MCP servers for Cursor, Claude Code, or other agents alongside existing Rails or script workflows.
Skip if: Python or .NET-only teams, or projects that only need a plain HTTP API without MCP protocol exposure.
When should I use this skill?
Asked to create or generate a complete Model Context Protocol server project in Ruby using the official MCP Ruby SDK gem.
What do I get? / Deliverables
You get a runnable Ruby MCP server repo with example tools, prompts, resources, Rake test/rubocop tasks, and a bin entrypoint ready to customize.
- Ruby MCP server gem-style repo with bin/mcp-server
- Example tools, prompts, and resources under lib/
- Test and RuboCop Rake tasks wired in Rakefile
Recommended Skills
Journey fit
Ruby MCP servers are created when you extend agent capabilities during product build—not during marketing or ops monitoring. agent-tooling catalogs skills that produce MCP servers and callable tool surfaces for coding agents.
How it compares
Ruby-flavored MCP scaffold generator—not the C# MCP generator nor a hosted integration marketplace.
Common Questions / FAQ
Who is ruby-mcp-server-generator for?
Indie builders comfortable with Ruby gems who want a structured MCP server with tools, prompts, resources, and tests out of the box.
When should I use ruby-mcp-server-generator?
Use it in Build agent-tooling when you are creating a new Ruby MCP server or standardizing how your repo exposes tools to coding agents.
Is ruby-mcp-server-generator safe to install?
Check the Security Audits panel on this Prism page and review generated gems, bin scripts, and third-party dependencies before connecting to production data.
SKILL.md
READMESKILL.md - Ruby Mcp Server Generator
# Ruby MCP Server Generator Generate a complete, production-ready MCP server in Ruby using the official Ruby SDK. ## Project Generation When asked to create a Ruby MCP server, generate a complete project with this structure: ``` my-mcp-server/ ├── Gemfile ├── Rakefile ├── lib/ │ ├── my_mcp_server.rb │ ├── my_mcp_server/ │ │ ├── server.rb │ │ ├── tools/ │ │ │ ├── greet_tool.rb │ │ │ └── calculate_tool.rb │ │ ├── prompts/ │ │ │ └── code_review_prompt.rb │ │ └── resources/ │ │ └── example_resource.rb ├── bin/ │ └── mcp-server ├── test/ │ ├── test_helper.rb │ └── tools/ │ ├── greet_tool_test.rb │ └── calculate_tool_test.rb └── README.md ``` ## Gemfile Template ```ruby source 'https://rubygems.org' gem 'mcp', '~> 0.4.0' group :development, :test do gem 'minitest', '~> 5.0' gem 'rake', '~> 13.0' gem 'rubocop', '~> 1.50' end ``` ## Rakefile Template ```ruby require 'rake/testtask' require 'rubocop/rake_task' Rake::TestTask.new(:test) do |t| t.libs << 'test' t.libs << 'lib' t.test_files = FileList['test/**/*_test.rb'] end RuboCop::RakeTask.new task default: %i[test rubocop] ``` ## lib/my_mcp_server.rb Template ```ruby # frozen_string_literal: true require 'mcp' require_relative 'my_mcp_server/server' require_relative 'my_mcp_server/tools/greet_tool' require_relative 'my_mcp_server/tools/calculate_tool' require_relative 'my_mcp_server/prompts/code_review_prompt' require_relative 'my_mcp_server/resources/example_resource' module MyMcpServer VERSION = '1.0.0' end ``` ## lib/my_mcp_server/server.rb Template ```ruby # frozen_string_literal: true module MyMcpServer class Server attr_reader :mcp_server def initialize(server_context: {}) @mcp_server = MCP::Server.new( name: 'my_mcp_server', version: MyMcpServer::VERSION, tools: [ Tools::GreetTool, Tools::CalculateTool ], prompts: [ Prompts::CodeReviewPrompt ], resources: [ Resources::ExampleResource.resource ], server_context: server_context ) setup_resource_handler end def handle_json(json_string) mcp_server.handle_json(json_string) end def start_stdio transport = MCP::Server::Transports::StdioTransport.new(mcp_server) transport.open end private def setup_resource_handler mcp_server.resources_read_handler do |params| Resources::ExampleResource.read(params[:uri]) end end end end ``` ## lib/my_mcp_server/tools/greet_tool.rb Template ```ruby # frozen_string_literal: true module MyMcpServer module Tools class GreetTool < MCP::Tool tool_name 'greet' description 'Generate a greeting message' input_schema( properties: { name: { type: 'string', description: 'Name to greet' } }, required: ['name'] ) output_schema( properties: { message: { type: 'string' }, timestamp: { type: 'string', format: 'date-time' } }, required: ['message', 'timestamp'] ) annotations( read_only_hint: true, idempotent_hint: true ) def self.call(name:, server_context:) timestamp = Time.now.iso8601 message = "Hello, #{name}! Welcome to MCP." structured_data = { message: message, timestamp: timestamp } MCP::Tool::Response.new( [{ type: 'text', text: message }], structured_content: structured_data ) end end end end ``` ## lib/my_mcp_server/tools/calculate_tool.rb Template ```ruby # frozen_string_literal: tru