
ruby-mcp-server-generator
✓ Official★ 36,200by github · part of github/awesome-copilot
Generate production-ready MCP servers in Ruby using the official SDK with complete project scaffolding. Generates a full project structure with tools, prompts, resources, tests, and configuration files following Ruby conventions Includes input/output schemas, tool annotations, and structured content support for type-safe MCP implementations Provides example tools (greet, calculate), prompts (code review), and resources with comprehensive test coverage using Minitest Supports stdio transport...
Generate production-ready MCP servers in Ruby using the official SDK with complete project scaffolding. Generates a full project structure with tools, prompts, resources, tests, and configuration files following Ruby conventions Includes input/output schemas, tool annotations, and structured content support for type-safe MCP implementations Provides example tools (greet, calculate), prompts (code review), and resources with comprehensive test coverage using Minitest Supports stdio transport...
Inspect the full instructions your agent will receiveExpandCollapse
This is the exact playbook injected into your agent when the skill activates — shown here so you can audit it before installing. You don't need to read it to use the skill.
by github
Generate production-ready MCP servers in Ruby using the official SDK with complete project scaffolding. Generates a full project structure with tools, prompts, resources, tests, and configuration files following Ruby conventions Includes input/output schemas, tool annotations, and structured content support for type-safe MCP implementations Provides example tools (greet, calculate), prompts (code review), and resources with comprehensive test coverage using Minitest Supports stdio transport...
npx skills add https://github.com/github/awesome-copilot --skill ruby-mcp-server-generator
Download ZIPGitHub36.2k
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
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
require 'rake/testtask'
require 'rubocop/rake_task'
Rake::TestTask.new(:test) do |t|
t.libs e
warn "Error: #{e.message}"
warn e.backtrace.join("\n")
exit 1
end
Make the file executable:
chmod +x bin/mcp-server
test/test_helper.rb Template
# frozen_string_literal: true
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
require 'my_mcp_server'
require 'minitest/autorun'
test/tools/greet_tool_test.rb Template
# frozen_string_literal: true
require 'test_helper'
module MyMcpServer
module Tools
class GreetToolTest Run the server:
bundle exec bin/mcp-server
Then send JSON-RPC requests:
{"jsonrpc":"2.0","id":"1","method":"ping"} {"jsonrpc":"2.0","id":"2","method":"tools/list"} {"jsonrpc":"2.0","id":"3","method":"tools/call","params":{"name":"greet","arguments":{"name":"Ruby"}}}
### Rails Integration
Add to your Rails controller:
class McpController Run tests:
bundle exec rake test
Run linter:
bundle exec rake rubocop
Run all checks:
bundle exec rake
Integration with Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"my-mcp-server": {
"command": "bundle",
"args": ["exec", "bin/mcp-server"],
"cwd": "/path/to/my-mcp-server"
}
}
}
Project Structure
my-mcp-server/
├── Gemfile # Dependencies
├── Rakefile # Build tasks
├── lib/ # Source code
│ ├── my_mcp_server.rb # Main entry point
│ └── my_mcp_server/ # Module namespace
│ ├── server.rb # Server setup
│ ├── tools/ # Tool implementations
│ ├── prompts/ # Prompt templates
│ └── resources/ # Resource handlers
├── bin/ # Executables
│ └── mcp-server # Stdio server
├── test/ # Test suite
│ ├── test_helper.rb # Test configuration
│ └── tools/ # Tool tests
└── README.md # This file
License
MIT
## Generation Instructions
1. **Ask for project name and description**
2. **Generate all files** with proper naming and module structure
3. **Use classes for tools and prompts** for better organization
4. **Include input/output schemas** for type safety
5. **Add tool annotations** for behavior hints
6. **Include structured content** in responses
7. **Implement comprehensive tests** for all tools
8. **Follow Ruby conventions** (snake_case, modules, frozen_string_literal)
9. **Add proper error handling** with is_error flag
10. **Provide both stdio and HTTP** usage examples
npx skills add https://github.com/github/awesome-copilot --skill ruby-mcp-server-generatorRun this in your project — your agent picks the skill up automatically.
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.