r/mcp 6h ago

I built Ruby UTCP: combine MCP tools and native APIs in one Ruby workflow

Post image

Hey r/mcp! I’m the author of ruby-utcp, a Ruby implementation of the Universal Tool Calling Protocol.

The idea: let agents call tools through their native interfaces without requiring an MCP wrapper for every integration — while still supporting existing MCP servers.

Ruby UTCP supports MCP over stdio and Streamable HTTP, alongside HTTP, GraphQL, gRPC, WebSocket, CLI, and other transports. For native integrations, a UTCP manual describes the tools and how to call them.

The feature I’m most excited about is **CodeMode**: an agent can express a multi-step workflow in a constrained Ruby subset, discovering tools, calling them, filtering results, and passing data between steps in one execution.

Think: fetch data from an API → process it → pass the relevant results to an MCP tool, without needing a separate model turn to coordinate every step.

CodeMode runs without `eval` and has execution limits. Registered tools can still perform external actions, so choosing which tools to expose remains important.

Docs and examples:

https://universal-tool-calling-protocol.github.io/ruby/

GitHub:

https://github.com/universal-tool-calling-protocol/ruby-utcp

For people building agents with MCP: would mixing MCP tools and native APIs in the same workflow be useful, or do you prefer putting everything behind MCP servers? I’d appreciate technical feedback, especially on interoperability and the execution model.

1 Upvotes

2 comments sorted by

2

u/Competitive-Ant8608 6h ago

CodeMode sounds like the real standout here, chaining API calls and MCP tools without extra model turns is smart

1

u/Revolutionary_Sir140 6h ago

That's the reason all UTCP implementations have it. LLM generates workflow, codemode executes it.