Practical overview
When it fits
Use it when an agent needs to work across registered MCP or UTCP tools through generated code, especially for workflows that combine several operations and process their outputs.
Who it is for
- Developers building AI-agent workflows around MCP or UTCP tools.
- Teams that want agents to compose multiple tool calls and process their results in code.
- Developers choosing between a shell-based CLI, an MCP server integration or direct TypeScript use.
Documented uses
- Discover relevant registered tools for a task.
- Chain multiple tool operations in one TypeScript execution.
- Transform tool results into a compact output, such as a pull-request summary.
Requirements & limits
The public GitHub repository identifies the project as open source under the MPL-2.0 license.
- Choose the UTCP CLI route when the agent can run shell commands; the README recommends it for shell-capable agents.
- Use the separate Code Mode MCP server for MCP-only clients.
- Direct TypeScript integration requires registering tool configurations; the documented MCP example also imports the separate @utcp/mcp plugin.
- Tool access is through registered UTCP or MCP servers, rather than direct exposure of every tool as an individual agent tool.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install and initialize Code-Mode with TypeScript
Set up the Code-Mode client, register an MCP tool manual, and execute a TypeScript tool chain.
Before you start
- Node.js/npm environment for the documented npm package installation.
- An MCP server configuration to register as a manual.
Steps
Install the library with the command below.
npm install @utcp/code-modeImport
CodeModeUtcpClientfrom@utcp/code-modeand initialize it withconst client = await CodeModeUtcpClient.create().Register the MCP manual with
await client.registerManual({ name: 'github', /* MCP config */ }), supplying the actual MCP configuration.Pass TypeScript code to
client.callToolChain(...)and read the returnedresult.
Expected outcome
A Code-Mode client is initialized with a registered manual and can execute a TypeScript tool chain, returning its result.
Guide limitations
- The example leaves the MCP configuration as a placeholder; a working server configuration must be supplied.
- For MCP transport integration, the README separately documents installing and importing
@utcp/mcpso themcpcall template registers.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 October 2026
- Original website title
- universal-tool-calling-protocol/code-mode · Official homepage title · retained in its source language

