Experimental Ruby implementation of Model Context Protocol (MCP) - A starter server framework for trying out LLM integrations
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"random-number": {
"args": [
"/Users/bash/src/mcp-ruby-skeleton/bin/run_server.rb"
],
"command": "ruby"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Acknowledgment: This implementation was inspired by the article Building a Model Context Protocol Server with TypeScript by Azuki Azusa.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in developer-tools
Manage Supabase projects — databases, auth, storage, and edge functions
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
MCP Security Weekly
Get CVE alerts and security updates for Mcp Ruby Skeleton and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Acknowledgment: This implementation was inspired by the article Building a Model Context Protocol Server with TypeScript by Azuki Azusa.
This project is a Ruby implementation of a Model Context Protocol (MCP) server skeleton. It provides an interface that allows Large Language Models (LLMs) like Claude to call tools. The current implementation provides a tool that generates random numbers.
get-random-number: Generates a random integer between 1 and a specified maximum value (defaults to 100)This server consists of the following components:
MCP::Server: Main server implementation that handles MCP protocol messages
MCP::Transport::Stdio: Standard I/O transport layer for communication
MCP::Tool: Tool definition and execution handler
RandomNumberServer: Server implementation that registers and manages tools
The server follows the MCP initialization protocol:
initialize request with protocol versioninitialized notificationThe server implements the following MCP APIs:
initialize: Server initialization and protocol version negotiationtools/list: Lists available tools and their schemastools/call: Executes a tool with provided argumentsClone the repository:
git clone <repository-url>
cd mcp-ruby-skeleton
Make sure the server script is executable:
chmod +x bin/run_server.rb
Run the server directly:
./bin/run_server.rb
Add the following to your Claude Desktop configuration at:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"random-number": {
"command": "ruby",
"args": [
"/Users/bash/src/mcp-ruby-skeleton/bin/run_server.rb"
]
}
}
}
Replace the path with the absolute path to your run_server.rb file on your system.
After configuring, restart Claude Desktop and try a prompt like "Generate a random number between 1 and 50."
Claude app logs related to MCP servers are available at:
~/Library/Logs/Claude/mcp*.log%APPDATA%\Claude\logs\mcp*.logTo view the logs in real-time:
# On macOS
tail -f ~/Library/Logs/Claude/mcp*.log
# On Windows
type "%APPDATA%\Claude\logs\mcp*.log"
The server itself logs to standard error output (STDERR), and the log level is set during the initialization of the RandomNumberServer class (currently at DEBUG level).
Server disconnection
If you see a message like "MCP server disconnected", check:
Tool not showing up
If the random number tool doesn't appear in Claude: