Installation

Install the gem and any optional dependencies for the features you use.

Requirements

Ruby 2.7.0 or later.

Installing the Gem

Add this line to your application’s Gemfile:

gem "mcp"

And then execute:

$ bundle install

Or install it yourself as:

$ gem install mcp

You may need to add additional dependencies depending on which features you wish to access. For example, the HTTP client transport requires the faraday gem:

gem "faraday", ">= 2.0"

Reading SSE (text/event-stream) responses needs event_stream_parser as well. Whether a response is JSON or SSE is the server’s choice, made for each response, and this SDK’s own server picks SSE by default, so a client written for arbitrary servers needs both gems:

gem "faraday", ">= 2.0"
gem "event_stream_parser", ">= 1.0"

The Transports page describes the one setup where faraday alone is enough.