Track MCP LogoTrack MCP
Track MCP LogoTrack MCP

The world's largest repository of Model Context Protocol servers. Discover, explore, and submit MCP tools.

Product

  • Categories
  • Top MCP
  • New & Updated
  • Submit MCP

Company

  • About

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

© 2026 TrackMCP. All rights reserved.

Built with ❤️ by Krishna Goyal

    Mcp Rb

    A lightweight Ruby framework for building MCP servers with a Sinatra-like DSL

    205 stars
    Ruby
    Updated Oct 29, 2025
    mcp-server
    modelcontextprotocol

    Table of Contents

    • Installation
    • Usage
    • Supported specifications
    • Testing
    • Formatting
    • Release
    • Changelog

    Table of Contents

    • Installation
    • Usage
    • Supported specifications
    • Testing
    • Formatting
    • Release
    • Changelog

    Documentation

    MCP-RB

    A lightweight Ruby framework for implementing MCP (Model Context Protocol) servers with a Sinatra-like DSL.

    Installation

    Add this line to your application's Gemfile:

    ruby
    gem 'mcp-rb'

    Usage

    Here's a simple example of how to create an MCP server:

    ruby
    require 'mcp'
    
    name "hello-world"
    
    version "1.0.0"
    
    # Define a resource
    resource "hello://world" do
      name "Hello World"
      description "A simple hello world message"
      call { "Hello, World!" }
    end
    
    # Define a resource template
    resource_template "hello://{user_name}" do
      name "Hello User"
      description "A simple hello user message"
      call { |args| "Hello, #{args[:user_name]}!" }
    end
    
    # Define a tool
    tool "greet" do
      description "Greet someone by name"
      argument :name, String, required: true, description: "Name to greet"
      call do |args|
        "Hello, #{args[:name]}!"
      end
    end
    
    # Define a tool with nested arguments
    tool "greet_full_name" do
      description "Greet someone by their full name"
      argument :person, required: true, description: "Person to greet" do
        argument :first_name, String, required: false, description: "First name"
        argument :last_name, String, required: false, description: "Last name"
      end
      call do |args|
        "Hello, First: #{args[:person](:first_name)} Last: #{args[:person](:last_name)}!"
      end
    end
    
    # Define a tool with an Array argument
    tool "group_greeting" do
      description "Greet multiple people at once"
      argument :people, Array, required: true, items: String, description: "People to greet"
      call do |args|
        args[:people].map { |person| "Hello, #{person}!" }.join(", ")
      end
    end

    Supported specifications

    Reference: MCP 2024-11-05

    • Base Protocol
    • ping
    • stdio transport
    • Server features
    • Resources
    • resources/read
    • resources/list
    • resources/templates/list
    • Tools
    • tools/list
    • tools/call

    Any capabilities are not supported yet.

    Testing

    bash
    rake test
    rake test:unit # run only the unit tests, skipping tests that test a running server

    Test with MCP Inspector

    bash
    bunx @modelcontextprotocol/inspector $(pwd)/examples/hello_world.rb

    Formatting

    bash
    bundle exec standardrb --fix

    You can also use rake tasks:

    bash
    rake lint      # Run standardrb to check code style
    rake lint:fix  # Auto-fix standardrb issues

    Release

    To release a new version:

    1. Update version in lib/mcp/version.rb

    2. Update CHANGELOG.md

    3. Create a git tag

    bash
    git add .
    git commit -m "Release vx.y.z"
    git tag vx.y.z
    git push --tags

    1. Build and push to RubyGems

    bash
    gem build mcp-rb.gemspec
    gem push mcp-rb-*.gem

    Changelog

    See CHANGELOG.md

    Similar MCP

    Based on tags & features

    • AW

      Aws Mcp Server

      Python·
      165
    • MC

      Mcp Open Library

      TypeScript·
      42
    • FH

      Fhir Mcp Server

      Python·
      55
    • WE

      Web Eval Agent

      Python·
      1.2k

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k
    View All MCP Servers

    Similar MCP

    Based on tags & features

    • AW

      Aws Mcp Server

      Python·
      165
    • MC

      Mcp Open Library

      TypeScript·
      42
    • FH

      Fhir Mcp Server

      Python·
      55
    • WE

      Web Eval Agent

      Python·
      1.2k

    Trending MCP

    Most active this week

    • PL

      Playwright Mcp

      TypeScript·
      22.1k
    • SE

      Serena

      Python·
      14.5k
    • MC

      Mcp Playwright

      TypeScript·
      4.9k
    • MC

      Mcp Server Cloudflare

      TypeScript·
      3.0k