MCP ExplorerExplorer

Scratch Mcp Rb

@YuheiNakasakaon a year ago
6 MIT
FreeCommunity
AI Systems
Scratch MCP is a Ruby implementation of the MCP Host/Client/Server.

Overview

What is Scratch Mcp Rb

scratch-mcp-rb is a Ruby implementation of the Model Context Protocol (MCP), serving as a host, client, and server. It provides a framework for communication between different tools and services using the MCP specification.

Use cases

Use cases for scratch-mcp-rb include building interactive applications that require tool integration, developing testing frameworks that utilize MCP for communication, and creating services that need to manage multiple MCP servers.

How to use

To use scratch-mcp-rb, set up your environment by copying the example environment file, install the necessary dependencies using ‘bundle install’, and run the server with ‘ruby main.rb’.

Key features

Key features include support for MCP protocol operations such as initialization, ping, and tool operations. The current implementation supports standard input/output transport and has a fixed dice server as the MCP server.

Where to use

scratch-mcp-rb can be used in software development environments where communication between various tools and services is required, particularly in applications that follow the MCP specification.

Content

Scratch MCP

Almost scratch MCP Host/Client/Server in Ruby

Usage

  1. Set up environment:
cp .env.example .env
  1. Install dependencies:
bundle install
  1. Run:
ruby main.rb

Current implementation

  • Transports
    • stdio only
  • MCP Server
    • Currently, the dice server(mcp/dice/server.rb) is fixed as the MCP server.

Supported MCP Protocol

  • Initialization
    • initialize request
    • initialize response
    • initialized notification
  • Ping
  • Operation
    • Tools
      • Protocol Messages
        • listing tools
        • calling tools
      • Tool Result
        • text content only
  • Shutdown

TODO

  • To register multiple MCP servers
  • Transports
    • Streamable HTTP
  • Error Handling
  • Timeouts

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers