Code-Mode
Plug-and-play library to enable agents to call MCP and UTCP tools
Code-Mode is a plug-and-play library that lets AI agents call tools by executing TypeScript (or via a Python wrapper) instead of making many individual function calls. Its core philosophy is that language models are very good at writing code, so rather than exposing hundreds of separate tool endpoints, you give the model a single “code execution” tool that has access to your full toolkit through code. This approach can dramatically reduce the number of tool-call iterations needed in complex workflows, turning multi-step call chains into a single code execution with internal branching and loops. The repository contains both TypeScript and Python libraries, plus a code-mode-mcp component for integrating with MCP and UTCP ecosystems. ...