MCP-RB

by funwarioisii

204 stars
267 downloads
Not rated
GitHub Website

About

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

Details

Author
funwarioisii
GitHub stars
204
Downloads
267
Categories
Other

- Sinatra-like DSL for defining server capabilities
- Supports resources, resource templates, and tools
- Tools can accept nested and array arguments
- Implements base protocol (ping), resource endpoints (list, read, templates/list), and tool endpoints (list, call)
- Uses stdio transport only
- Lightweight, Ruby-native implementation

Install the gem by adding gem 'mcp-rb' to your Gemfile. In your server script, use the DSL to set the server name and version, then define resources, resource templates, and tools with their callbacks. Run the script directly via a Ruby interpreter; MCP-RB uses stdio transport out of the box.

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:

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"

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.