ruby-mcp-server-generator
Generate a complete Model Context Protocol server project in Ruby using the official MCP Ruby SDK gem.
What this skill does
# 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: true
module MyMcpServer
module Tools
class CalculateTool < MCP::Tool
tool_name 'calculate'
description 'Perform mathematical calculations'
input_schema(
properties: {
operation: {
type: 'string',
description: 'Operation to perform',
enum: ['add', 'subtract', 'multiply', 'divide']
},
a: {
type: 'number',
description: 'First operand'
},
b: {
type: 'number',
description: 'Second operand'
}
},
required: ['operation', 'a', 'b']
)
output_schema(
properties: {
result: { type: 'number' },
operation: { type: 'string' }
},
required: ['result', 'operation']
)
annotations(
read_only_hint: true,
idempotent_hint: true
)
def self.call(operation:, a:, b:, server_context:)
result = case operation
when 'add' then a + b
when 'subtract' then a - b
when 'multiply' then a * b
when 'divide'
return error_response('Division by zero') if b.zero?
a / b.to_f
else
return error_response("Unknown operation: #{operation}")
end
structured_data = {
result: result,
operation: operation
}
MCP::Tool::Response.new(
[{ type: 'text', text: "Result: #{result}" }],
structured_content: structured_data
)
end
def self.error_response(message)
MCP::Tool::Response.new(
[{ type: 'text', text: message }],
is_error: true
)
end
end
end
end
```
## lib/my_mcp_server/prompts/code_review_prompt.rb Template
```ruby
# frozen_string_literal: true
module MyMcpServer
module Prompts
class CodeReviewPrompt < MCP::Prompt
prompt_name 'code_review'
description 'Generate a code review prompt'
arguments [
MCP::Prompt::Argument.new(
name: 'language',
description: 'Programming language',
required: true
),
MCP::Prompt::Argument.new(
name: 'focus',
description: 'Review focus area (e.g., performance, security)',
required: false
)
]
meta(
version: '1.0',
category: 'development'
)
def self.template(args, server_context:)
language = args['language'] || 'Ruby'
focus = args['focus'] || 'general quality'
MCP::Prompt::Result.new(
description: "Code review for #{language} with focus on #{focus}",
messages: [
MCP::Prompt::Message.new(
role: 'user',
content: MCP::Content::Text.new(
"Please review this #{language} code with focus on #{focus}."
)
),
MCP::Prompt::Message.new(
role: 'assistant',
content: MCP::Content::Text.new(
"I'll review the code focusing on #{focus}. Please share the code."
)
),
MCP::Prompt::Message.new(
role: 'user',
content: MCP::Content::Text.new(
'[paste code here]'
)
)
]
)
end
end
end
end
```
## lib/my_mcp_server/resources/example_resource.rb Template
```ruby
# frozen_string_literal: true
module MyMcpServer
module Resources
class ExampleResource
RESOURCE_URI = 'resource://data/example'
def self.resource
MCP::Resource.new(
uri: RESOURCE_URI,
name: 'example-data',
description: 'Example resource data',
mime_type: 'application/json'
)
end
def self.read(uri)
return [] unless uri == RESOURCE_URI
data = {
message: 'Example resource data',
timestamp: Time.now.iso8601,
vRelated in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.