- Home
- MCP servers
- Ruby
Ruby
- other
4
GitHub Stars
other
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"bash0c7-mcp-ruby-skeleton": {
"command": "ruby",
"args": [
"/Users/bash/src/mcp-ruby-skeleton/bin/run_server.rb"
]
}
}
}You run a small MCP server written in Ruby that exposes a single tool to generate random numbers. This server speaks the Model Context Protocol (MCP) so a client like Claude can list available tools and call them to get results. It is designed to be easy to run locally for experimentation and integration with MCP-enabled clients.
How to use
To use this MCP server, start the local Ruby tool and connect your MCP client to it. Your client can discover the available tool named get-random-number and request a random integer between 1 and a maximum value you specify. If you don’t provide a maximum, the default is 100.
How to install
Prerequisites you need installed on your machine:
-
- Ruby 3.0+
-
- A terminal or command prompt
-
- Access to the project files you will run from
Clone the MCP Ruby server skeleton repository and navigate into the project directory. Use the placeholder repository URL provided by your setup instructions.
git clone <repository-url>
cd mcp-ruby-skeleton
Make sure the server script is executable and then start the server directly from the project. The server runs a standard Ruby script that speaks MCP over standard I/O.
chmod +x bin/run_server.rb
./bin/run_server.rb
If you want to integrate this server with Claude Desktop, register it as an MCP server using the following configuration. This example uses the absolute path shown for demonstration; replace it with your actual path.
{
"mcpServers": {
"random_number": {
"command": "ruby",
"args": [
"/Users/bash/src/mcp-ruby-skeleton/bin/run_server.rb"
]
}
}
}
Additional sections
Configuration and troubleshooting notes help you keep the server running smoothly and securely. The server is designed to log detailed information for debugging and to handle MCP protocol messages robustly. If you plan to run with Claude or another MCP client, ensure the client and server agree on the MCP protocol version used (the server supports 2024-11-05 compatibility).
Available tools
get-random-number
Generates a random integer between 1 and a maximum value specified by the client; defaults to 100 if not provided.