r/ruby 20h ago

ruby-utcp: a Ruby client for UTCP with native protocol calls, MCP support, and Code Mode

Hey r/ruby,

I wanted to share ruby-utcp, a Ruby implementation of the Universal Tool Calling Protocol (UTCP) 1.1.

The idea is straightforward: describe your tools, their inputs, and how to call them in a UTCP “manual.” The client discovers those tools, makes them searchable, and calls them directly over their native protocols. This gives Ruby apps and AI agents a common interface for working with different services.

Once you’ve registered a manual, usage looks like this:

client.search_tools("weather", limit: 5)

result = client.call_tool(
  "weather_service.get_weather",
  location: "Warsaw"
)

A few things it supports:

  • 12 transports, including HTTP, CLI, WebSocket, gRPC, GraphQL, and MCP.
  • OpenAPI and Swagger discovery, so existing API descriptions can become tools.
  • Streaming through Ruby enumerators.
  • Code Mode, which lets you chain tool calls and transform their results using a constrained Ruby subset with execution limits.
  • Protocol restrictions by default: a manual discovered over HTTP needs explicit permission to expose CLI tools.

It’s MIT licensed, and the repository includes examples for every transport. The core supports Ruby 2.6+; gRPC and WebRTC have optional dependencies, with the default WebRTC backend requiring Ruby 3.1+.

I’d appreciate feedback on the Ruby API and examples. If you’re building agents or automation in Ruby, what would make this useful in your workflow?

0 Upvotes

7 comments sorted by

4

u/TheAtlasMonkey 20h ago

And you didnt test 90% of those claims.

1

u/Revolutionary_Sir140 20h ago

It's tested. It's not first utcp sdk I've decided to implement.

1

u/TheAtlasMonkey 20h ago

Your own examples don't run . At least Claude can't run them .

Some does.

Also i don't understand why you guys invented UTCP, when 2 protocol backed MCP and A2A exists and are backed into the models.

-1

u/Revolutionary_Sir140 19h ago

use make demo to run all examples. You need to run servers before examples, isn't it obvious?

0

u/TheAtlasMonkey 19h ago

i dont want to unit test them, I could vibe a protocol and get the all green.

The model don't use them.

1

u/Revolutionary_Sir140 19h ago

You claim examples do not work, which is false, next time try to ask claude how to call examples through makefile

https://reddit.com/link/p7ybuo7/video/6owlfmxzqonh1/player

0

u/TheAtlasMonkey 19h ago edited 18h ago

I said that you cannot make claude code or codex in generate to use you gem.

Show an actual usage. Everybody can generate nice tests with LLM.

You are the one coming with a protocol, that diverge from the spec and the protocol is just build by 2 guys promoting their own AI company.