universal-tool-calling-protocol/code-mode
A plug-and-play library that lets AI agents call MCP and UTCP tools through code execution instead of traditional function calling.

The Code-Mode library transforms how AI agents interact with tools by giving them a single code execution interface that can access an entire toolchain. Rather than exposing hundreds of individual tools, agents write code that calls tools programmatically. It supports Model Context Protocol (MCP) servers and UTCP endpoints, running TypeScript/JavaScript code with tool access at runtime. Benchmarks claim significant cost savings compared to traditional JSON-based tool calling approaches.