tangentus
MCP Servertangentuspublic

mcp ruby sdk

Ruby SDK for the MCP Protocol

Repository Info

2
Stars
0
Forks
2
Watchers
0
Issues
Ruby
Language
MIT License
License

About This Server

Ruby SDK for the MCP Protocol

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

MCP Ruby SDK

Gem Version MIT licensed

Ruby implementation of the Model Context Protocol (MCP).

Installation

Add this line to your application's Gemfile:

gem 'mcp'

And then execute:

$ bundle install

Or install it yourself as:

$ gem install mcp

Quick Start

Here's a simple example of creating an MCP server with a calculator tool:

require 'mcp'

# Create an MCP server
server = MCP::Server.new(
  name: "Demo",
  version: "1.0.0"
)

# Add an addition tool
server.add_tool("add") do |params|
  result = params["a"] + params["b"]
  {
    content: [{ type: "text", text: result.to_s }]
  }
end

# Add a dynamic greeting resource
server.add_resource("greeting") do |uri, params|
  {
    contents: [{
      uri: uri,
      text: "Hello, #{params['name']}!"
    }]
  }
end

# Start the server using stdio transport
transport = MCP::Transport::Stdio.new
server.connect(transport)

Features

  • Full implementation of the MCP specification
  • Support for Resources, Tools, and Prompts
  • Multiple transport options (stdio, HTTP/SSE)
  • Easy-to-use high-level interfaces
  • Async/await support
  • Comprehensive type system

Documentation

For detailed documentation, please visit:

  • API Documentation
  • MCP Specification
  • Examples

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/modelcontextprotocol/ruby-sdk. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Quick Start

1

Clone the repository

git clone https://github.com/tangentus/mcp-ruby-sdk
2

Install dependencies

cd mcp-ruby-sdk
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownertangentus
Repomcp-ruby-sdk
LanguageRuby
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation