Skip to content
Back to search

code-mode

πŸ”Œ Plug-and-play library to enable agents to call MCP and UTCP tools via code execution.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/universal-tool-calling-protocol--code-mode/badge.svg)](/listings/universal-tool-calling-protocol--code-mode)

HTML

<a href="/listings/universal-tool-calling-protocol--code-mode"><img src="/api/listings/universal-tool-calling-protocol--code-mode/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

[<img width="2606" height="1445" alt="Frame 4 (4)" src="https://github.com/user-attachments/assets/58ba26ab-6e77-459b-a59a-eeb60d711746" /> ](https://www.youtube.com/watch?v=zsMjkPzmqhA)

Get Started in 3 Lines

import { CodeModeUtcpClient } from '@utcp/code-mode';

const client = await CodeModeUtcpClient.create();                    // 1. Initialize
await client.registerManual({ name: 'github', /* MCP config */ });  // 2. Add tools  
const { result } = await client.callToolChain(`/* TypeScript */`);   // 3. Execute code

That's it. Your AI agent can now execute complex workflows in a single request instead of dozens.

What You Get

**Progressive Tool Discovery**

// Agent discovers tools dynamically, loads only what it needs
const tools = await client.searchTools('github pull request');
// Instead of 500 tool definitions β†’ 3 relevant tools

**Natural Code Execution**

const { result, logs } = await client.callToolChain(`
  // Chain multiple operations in one request
  const pr = await github.get_pull_request({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  const comments = await github.get_pull_request_comments({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  const reviews = await github.get_pull_request_reviews({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });

  // Process data efficiently in-sandbox
  return {
    title: pr.title,
    commentCount: comments.length,
    approvals: reviews.filter(r => r.state === 'APPROVED').length
  };
`);
// Single API call replaces 15+ traditional tool calls

**Auto-Generated TypeScript Interfaces**

namespace github {
  interface get_pull_requestInput {
    /** Repository owner */
    owner: string;
    /** Repository name */ 
    repo: string;
    /** Pull request number */
    pull_number: number;
  }
}

Enterprise-Ready

- **Secure VM Sandboxing** – Node.js isolates prevent unauthorized access - **Timeout Protection** – Configurable execution limits prevent runaway code - **Complete Observability** – Full console output capture and error handling - **Zero External Dependencies** – Tools only accessible through registered UTCP/MCP servers - **Runtime Introspection** – Dynamic interface discovery for adaptive workflows

If you're working at an enterprise, and need support, book a consultation [here](https://bevel.neetocal.com/meeting-with-ali).

Universal Protocol Support

Works with **any tool ecosystem:**

| Protocol | Description | Usage | |----------|-------------|-------| | **MCP** | Model Context Protocol servers | `call_template_type: 'mcp'` | | **HTTP** | REST APIs with auto-discovery | `call_template_type: 'http'` | | **File** | Local JSON/YAML configurations | `call_template_type: 'file'` | | **CLI** | Command-line tool execution | `call_template_type: 'cli'` |

Installation

npm install @utcp/code-mode

Recommended for shell agents: the `utcp` CLI

**If your agent can run shell commands** (Claude Code, Cursor, Codex, Claude Cowork, etc.), the [`utcp` CLI](./code-mode-cli) is the **preferred** way to use Code Mode β€” no MCP server, no client config, no env vars. The agent self-configures by writing a `.utcp_config.json` and drives everything from the shell.

Just point the agent at the built-in guide:

npx -y @utcp/code-mode-cli prompt

Hand it a description of the API to use β€” a UTCP call template, an **OpenAPI spec**, or a **plain-English description** β€” and it writes the config, discovers tools, runs tool-chains, and even completes **interactive OAuth logins** (e.g. Notion), all from the shell:

npx -y @utcp/code-mode-cli search "<task>"           # discover tools + TS interfaces
npx -y @utcp/code-mode-cli run <<'EOF'               # run a tool-chain
const r = await openlibrary.read_search_json_search_json_get({ q: "tolkien", limit: 3 });
return r.docs.map(b => b.title);
EOF

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md Β· README Β· 503 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <div align="center">
  2. <!-- <img alt="utcp code mode banner" src="https://github.com/user-attachments/assets/77723130-ecbc-4d1d-9e9b-20f978882699" width="80%" style="margin: 20px auto;"> -->
  3. <h1 align="center">πŸ€– Code-Mode Library: First library for tool calls via code execution</h1>
  4. <p align="center">
  5. <a href="https://github.com/universal-tool-calling-protocol">
  6. <img src="https://img.shields.io/github/followers/universal-tool-calling-protocol?label=Follow%20Org&logo=github" /></a>
  7. <a href="https://img.shields.io/npm/dt/@utcp/code-mode" title="PyPI Version">
  8. <img src="https://img.shields.io/npm/dt/@utcp/code-mode"/></a>
  9. <a href="https://github.com/universal-tool-calling-protocol/code-mode/blob/main/LICENSE" alt="License">
  10. <img src="https://img.shields.io/github/license/universal-tool-calling-protocol/code-mode" /></a>
  11. [![npm](https://img.shields.io/npm/v/@utcp/code-mode)](https://www.npmjs.com/package/@utcp/code-mode)
  12. </p>
  13. </div>
  14. > Transform your AI agents from clunky tool callers into efficient code executors β€” in just 3 lines.
  15. ## Why This Changes Everything
  16. LLMs excel at writing code but struggle with tool calls. Instead of exposing hundreds of tools directly, give them ONE tool that executes TypeScript code with access to your entire toolkit.
  17. [Apple](https://machinelearning.apple.com/research/codeact), [Cloudflare](https://blog.cloudflare.com/code-mode/), and [Anthropic](https://www.anthropic.com/engineering/code-execution-with-mcp) say that Code-Mode is a more efficient way to approach tool calling compared to the traditional dump function information and then extract a JSON for function calling.
  18. ## Benchmarks
  19. Independent [Python benchmark study](https://github.com/imran31415/codemode_python_benchmark) validates the performance claims with **$9,536/year cost savings** at 1,000 scenarios/day:
  20. | Scenario Complexity | Traditional | Code Mode | **Improvement** |
  21. |---------------------|-------------|-----------|----------------|
  22. | **Simple (2-3 tools)** | 3 iterations | 1 execution | **67% faster** |
  23. | **Medium (4-7 tools)** | 8 iterations | 1 execution | **75% faster** |
  24. | **Complex (8+ tools)** | 16 iterations | 1 execution | **88% faster** |
  25. ### **Why Code Mode Dominates:**
  26. **Batching Advantage** - Single code block replaces multiple API calls
  27. **Cognitive Efficiency** - LLMs excel at code generation vs. tool orchestration
  28. **Computational Efficiency** - No context re-processing between operations
  29. # Getting Started
  30. [<img width="2606" height="1445" alt="Frame 4 (4)" src="https://github.com/user-attachments/assets/58ba26ab-6e77-459b-a59a-eeb60d711746" />
  31. ](https://www.youtube.com/watch?v=zsMjkPzmqhA)
  32. ## Get Started in 3 Lines
  33. ```typescript
  34. import { CodeModeUtcpClient } from '@utcp/code-mode';
  35. const client = await CodeModeUtcpClient.create(); // 1. Initialize
  36. await client.registerManual({ name: 'github', /* MCP config */ }); // 2. Add tools
  37. const { result } = await client.callToolChain(`/* TypeScript */`); // 3. Execute code
  38. ```
  39. That's it. Your AI agent can now execute complex workflows in a single request instead of dozens.
  40. ## What You Get
  41. ### **Progressive Tool Discovery**
  42. ```typescript
  43. // Agent discovers tools dynamically, loads only what it needs
  44. const tools = await client.searchTools('github pull request');
  45. // Instead of 500 tool definitions β†’ 3 relevant tools
  46. ```
  47. ### **Natural Code Execution**
  48. ```typescript
  49. const { result, logs } = await client.callToolChain(`
  50. // Chain multiple operations in one request
  51. const pr = await github.get_pull_request({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  52. const comments = await github.get_pull_request_comments({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  53. const reviews = await github.get_pull_request_reviews({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  54. // Process data efficiently in-sandbox
  55. return {
  56. title: pr.title,
  57. commentCount: comments.length,
  58. approvals: reviews.filter(r => r.state === 'APPROVED').length
  59. };
  60. `);
  61. // Single API call replaces 15+ traditional tool calls
  62. ```
  63. ### **Auto-Generated TypeScript Interfaces**
  64. ```typescript
  65. namespace github {
  66. interface get_pull_requestInput {
  67. /** Repository owner */
  68. owner: string;
  69. /** Repository name */
  70. repo: string;
  71. /** Pull request number */
  72. pull_number: number;
  73. }
  74. }
  75. ```
  76. ## Enterprise-Ready
  77. - **Secure VM Sandboxing** – Node.js isolates prevent unauthorized access
  78. - **Timeout Protection** – Configurable execution limits prevent runaway code
  79. - **Complete Observability** – Full console output capture and error handling
  80. - **Zero External Dependencies** – Tools only accessible through registered UTCP/MCP servers
  81. - **Runtime Introspection** – Dynamic interface discovery for adaptive workflows
  82. If you're working at an enterprise, and need support, book a consultation [here](https://bevel.neetocal.com/meeting-with-ali).
  83. ## Universal Protocol Support
  84. Works with **any tool ecosystem:**
  85. | Protocol | Description | Usage |
  86. |----------|-------------|-------|
  87. | **MCP** | Model Context Protocol servers | `call_template_type: 'mcp'` |
  88. | **HTTP** | REST APIs with auto-discovery | `call_template_type: 'http'` |
  89. | **File** | Local JSON/YAML configurations | `call_template_type: 'file'` |
  90. | **CLI** | Command-line tool execution | `call_template_type: 'cli'` |
  91. ## Installation
  92. ```bash
  93. npm install @utcp/code-mode
  94. ```
  95. ## Recommended for shell agents: the `utcp` CLI
  96. **If your agent can run shell commands** (Claude Code, Cursor, Codex, Claude Cowork, etc.), the [`utcp` CLI](./code-mode-cli) is the **preferred** way to use Code Mode β€” no MCP server, no client config, no env vars. The agent self-configures by writing a `.utcp_config.json` and drives everything from the shell.
  97. Just point the agent at the built-in guide:
  98. ```bash
  99. npx -y @utcp/code-mode-cli prompt
  100. ```
  101. Hand it a description of the API to use β€” a UTCP call template, an **OpenAPI spec**, or a **plain-English description** β€” and it writes the config, discovers tools, runs tool-chains, and even completes **interactive OAuth logins** (e.g. Notion), all from the shell:
  102. ```bash
  103. npx -y @utcp/code-mode-cli search "<task>" # discover tools + TS interfaces
  104. npx -y @utcp/code-mode-cli run <<'EOF' # run a tool-chain
  105. const r = await openlibrary.read_search_json_search_json_get({ q: "tolkien", limit: 3 });
  106. return r.docs.map(b => b.title);
  107. EOF
  108. npx -y @utcp/code-mode-cli login <manual> # interactive OAuth, writes token to .env
  109. ```
  110. > **CLI vs MCP:** prefer the **CLI** whenever the agent has shell access (most coding agents) β€” it's simpler and self-configuring. Use the **MCP server** (below) only for MCP-only clients like Claude Desktop. Both wrap the same `@utcp/code-mode` engine.
  111. See [`code-mode-cli/`](./code-mode-cli) for full docs.
  112. ## Ready-to-Use MCP Server
  113. **On an MCP-only client (e.g. Claude Desktop)?** Use our plug-and-play MCP server. (If your agent has a shell, prefer the [`utcp` CLI](#recommended-for-shell-agents-the-utcp-cli) above.)
  114. ```json
  115. {
  116. "mcpServers": {
  117. "code-mode": {
  118. "command": "npx",
  119. "args": ["@utcp/code-mode-mcp"],
  120. "env": {
  121. "UTCP_CONFIG_FILE": "/path/to/your/.utcp_config.json"
  122. }
  123. }
  124. }
  125. }
  126. ```
  127. **That's it!** No installation, no Node.js knowledge required. The [Code Mode MCP Server](https://github.com/universal-tool-calling-protocol/code-mode/tree/main/code-mode-mcp) automatically:
  128. - Downloads and runs the latest version via `npx`
  129. - Loads your tool configurations from JSON
  130. - Provides code execution capabilities to Claude Desktop
  131. - Gives you `call_tool_chain` as an MCP tool for TypeScript execution
  132. **Perfect for non-developers** who want Code Mode power in Claude Desktop!
  133. ## Direct TypeScript Usage
  134. ### 1. **MCP Server Integration**
  135. Connect to any Model Context Protocol server:
  136. > Each `call_template_type` is a separate plugin package. Install and import the
  137. > package once at startup so it can register itself with the client; the plugin
  138. > registers as a side effect of being imported. For `mcp`, that's `@utcp/mcp`.
  139. > The same pattern applies to other transports: `@utcp/http`, `@utcp/text`, etc.
  140. >
  141. > ```bash
  142. > npm install @utcp/mcp
  143. > ```
  144. ```typescript
  145. import '@utcp/mcp'; // registers the 'mcp' call template
  146. import { CodeModeUtcpClient } from '@utcp/code-mode';
  147. const client = await CodeModeUtcpClient.create();
  148. // Connect to GitHub MCP server
  149. await client.registerManual({
  150. name: 'github',
  151. call_template_type: 'mcp',
  152. config: {
  153. mcpServers: {
  154. github: {
  155. transport: 'stdio', // required by @utcp/mcp
  156. command: 'docker',
  157. args: ['run', '-i', '--rm', '-e', 'GITHUB_PERSONAL_ACCESS_TOKEN', 'mcp/github'],
  158. env: { GITHUB_PERSONAL_ACCESS_TOKEN: process.env.GITHUB_TOKEN }
  159. }
  160. }
  161. }
  162. });
  163. ```
  164. ### 2. **Execute Multi-Step Workflows**
  165. Replace 15+ tool calls with a single code execution:
  166. ```typescript
  167. const { result, logs } = await client.callToolChain(`
  168. // Traditional: 4 separate API round trips β†’ Code Mode: 1 execution
  169. const pr = await github.get_pull_request({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  170. const comments = await github.get_pull_request_comments({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  171. const reviews = await github.get_pull_request_reviews({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  172. const files = await github.get_pull_request_files({ owner: 'microsoft', repo: 'vscode', pull_number: 1234 });
  173. // Process data in-sandbox (no token overhead)
  174. const summary = {
  175. title: pr.title,
  176. state: pr.state,
  177. author: pr.user.login,
  178. stats: {
  179. comments: comments.length,
  180. reviews: reviews.length,
  181. filesChanged: files.length,
  182. approvals: reviews.filter(r => r.state === 'APPROVED').length
  183. },
  184. topDiscussion: comments.slice(0, 3).map(c => ({
  185. author: c.user.login,
  186. preview: c.body.substring(0, 100) + '...'
  187. }))
  188. };
  189. console.log(\`PR "\${pr.title}" analysis complete\`);
  190. return summary;
  191. `);
  192. console.log('Analysis Result:', result);
  193. // console output: 'PR "Fix memory leak in hooks" analysis complete'
  194. ```
  195. ---
  196. ## Advanced Features
  197. ### **Multi-Protocol Tool Chains**
  198. Mix and match different tool ecosystems in a single execution:
  199. ```typescript
  200. // Register multiple tool sources
  201. await client.registerManual({ name: 'github', call_template_type: 'mcp', /* config */ });
  202. await client.registerManual({ name: 'slack', call_template_type: 'http', /* config */ });
  203. await client.registerManual({ name: 'db', call_template_type: 'file', file_path: './db-tools.json' }); // This loads a UTCP manual from a json file
  204. const result = await client.callToolChain(`
  205. // Fetch PR data from GitHub (MCP)
  206. const pr = await github.get_pull_request({ owner: 'company', repo: 'api', pull_number: 42 });
  207. // Query deployment status from database (File)
  208. const deployment = await db.get_deployment_status({ pr_id: pr.id });
  209. // Send notification to Slack (HTTP)
  210. await slack.post_message({
  211. channel: '#releases',
  212. text: \`PR #42 "\${pr.title}" deployed to \${deployment.environment}\`
  213. });
  214. return { pr: pr.title, environment: deployment.environment };
  215. `);
  216. ```
  217. ### **Runtime Interface Introspection**
  218. Tools can dynamically discover and adapt to available interfaces:
  219. ```typescript
  220. const result = await client.callToolChain(`
  221. // Discover available tools at runtime
  222. console.log('Available interfaces:', __interfaces);
  223. // Get specific tool interface for validation
  224. const prInterface = __getToolInterface('github.get_pull_request');
  225. console.log('PR tool expects:', prInterface);
  226. // Use interface info for dynamic workflows
  227. const hasSlackTools = __interfaces.includes('namespace slack');
  228. if (hasSlackTools) {
  229. await slack.post_message({ channel: '#dev', text: 'Analysis complete' });
  230. }
  231. return { toolsAvailable: hasSlackTools };
  232. `);
  233. ```
  234. ### **Context-Efficient Data Processing**
  235. Process large datasets without bloating the model's context:
  236. ```typescript
  237. const result = await client.callToolChain(`
  238. // Fetch large dataset
  239. const allIssues = await github.list_repository_issues({ owner: 'facebook', repo: 'react' });
  240. console.log('Fetched', allIssues.length, 'total issues');
  241. // Process efficiently in-sandbox
  242. const criticalBugs = allIssues
  243. .filter(issue => issue.labels.some(l => l.name === 'bug'))
  244. .filter(issue => issue.labels.some(l => l.name === 'high priority'))
  245. .map(issue => ({
  246. number: issue.number,
  247. title: issue.title,
  248. author: issue.user.login,
  249. daysOld: Math.floor((Date.now() - new Date(issue.created_at)) / (1000 * 60 * 60 * 24))
  250. }))
  251. .sort((a, b) => b.daysOld - a.daysOld);
  252. // Only return processed summary (not 10,000 raw issues)
  253. return {
  254. totalIssues: allIssues.length,
  255. criticalBugs: criticalBugs.slice(0, 10), // Top 10 oldest critical bugs
  256. summary: \`Found \${criticalBugs.length} critical bugs, oldest is \${criticalBugs[0]?.daysOld} days old\`
  257. };
  258. `);
  259. ```
  260. ### **Error Handling & Observability**
  261. Built-in error handling with complete execution transparency:
  262. ```typescript
  263. const { result, logs } = await client.callToolChain(`
  264. try {
  265. console.log('Starting multi-step workflow...');
  266. const data = await external_api.fetch_data({ id: 'user-123' });
  267. console.log('Data fetched successfully');
  268. const processed = await data_processor.transform(data);
  269. console.warn('Processing completed with', processed.warnings.length, 'warnings');
  270. return processed;
  271. } catch (error) {
  272. console.error('Workflow failed:', error.message);
  273. throw error; // Propagates to outer error handling
  274. }
  275. `, 30000); // 30-second timeout
  276. // Complete observability
  277. console.log('Result:', result);
  278. console.log('Execution logs:', logs);
  279. // ['Starting multi-step workflow...', 'Data fetched successfully', '[WARN] Processing completed with 2 warnings']
  280. ```
  281. ### **Custom Timeouts**
  282. Configure execution limits for different workload types:
  283. ```typescript
  284. // Quick operations (5 seconds)
  285. const quickResult = await client.callToolChain(`return await ping.check();`, 5000);
  286. // Heavy data processing (2 minutes)
  287. const heavyResult = await client.callToolChain(`
  288. const bigData = await database.export_full_dataset();
  289. return await analytics.process_dataset(bigData);
  290. `, 120000);
  291. ```
  292. ---
  293. ## AI Agent Integration
  294. Plug-and-play with any AI framework. The built-in prompt template handles all the complexity:
  295. ```typescript
  296. import { CodeModeUtcpClient } from '@utcp/code-mode';
  297. const systemPrompt = `
  298. You are an AI assistant with access to tools via UTCP CodeMode.
  299. ${CodeModeUtcpClient.AGENT_PROMPT_TEMPLATE}
  300. Additional instructions...
  301. `;
  302. // Works with any AI library
  303. const response = await openai.chat.completions.create({
  304. model: 'gpt-4',
  305. messages: [
  306. { role: 'system', content: systemPrompt },
  307. { role: 'user', content: 'Analyze the latest PR in microsoft/vscode' }
  308. ]
  309. });
  310. ```
  311. **The template provides comprehensive guidance on:**
  312. - Tool discovery workflow (`searchTools` β†’ `__interfaces` β†’ `callToolChain`)
  313. - Hierarchical access patterns (`manual.tool()` syntax)
  314. - Interface introspection (`__getToolInterface()`)
  315. - Error handling and best practices
  316. ---
  317. ## API Reference
  318. ### **Core Methods**
  319. #### `callToolChain(code: string, timeout?: number)`
  320. Execute TypeScript code with full tool access and observability.
  321. - **Returns**: `{result: any, logs: string[]}` with execution result and captured console output
  322. - **Default timeout**: 30 seconds
  323. #### `getAllToolsTypeScriptInterfaces()`
  324. Generate complete TypeScript interfaces for IDE integration.
  325. - **Returns**: String containing all interface definitions with namespaces
  326. #### `searchTools(query: string)` *(from UtcpClient)*
  327. Discover tools using natural language queries.
  328. - **Returns**: Array of relevant tools with descriptions and interfaces
  329. ### **Static Methods**
  330. #### `CodeModeUtcpClient.create(root_dir?, config?)`
  331. Create a new client instance with optional configuration.
  332. #### `CodeModeUtcpClient.AGENT_PROMPT_TEMPLATE`
  333. Production-ready prompt template for AI agents.
  334. ---
  335. ## Security & Performance
  336. ### **Secure by Design**
  337. - **Node.js VM sandboxing** – Isolated execution context
  338. - **No filesystem access** – Tools only through registered servers
  339. - **Timeout protection** – Configurable execution limits
  340. - **Zero network access** – No external dependencies or API keys exposed
  341. ### **Performance Optimized**
  342. - **Minimal memory footprint** – VM contexts are lightweight
  343. - **Efficient tool caching** – TypeScript interfaces cached automatically
  344. - **Streaming console output** – Real-time log capture without buffering
  345. - **Identifier sanitization** – Handles invalid TypeScript identifiers gracefully
  346. ---
  347. ## Development Experience
  348. ### **IDE Integration**
  349. Generate TypeScript definitions for full IntelliSense support:
  350. ```bash
  351. # Generate tool interfaces
  352. const interfaces = await client.getAllToolsTypeScriptInterfaces();
  353. await fs.writeFile('generated-tools.d.ts', interfaces);
  354. # Add to tsconfig.json
  355. {
  356. "compilerOptions": {
  357. "typeRoots": ["./generated-tools.d.ts"]
  358. }
  359. }
  360. ```
  361. ### **Debug & Monitor**
  362. Built-in observability for production deployments:
  363. ```typescript
  364. const { result, logs } = await client.callToolChain(userCode);
  365. // Ship logs to your monitoring system
  366. logs.forEach(log => {
  367. if (log.startsWith('[ERROR]')) monitoring.error(log);
  368. if (log.startsWith('[WARN]')) monitoring.warn(log);
  369. });
  370. ```
  371. ---
  372. ### **Benchmark Methodology**
  373. The [comprehensive Python study](https://github.com/imran31415/codemode_python_benchmark) tested **16 realistic scenarios** across:
  374. - **Financial workflows** (invoicing, expense tracking)
  375. - **DevOps operations** (deployments, monitoring)
  376. - **Data processing** (analysis, reporting)
  377. - **Business automation** (CRM, notifications)
  378. **Models tested:** Claude Haiku, Gemini Flash
  379. **Pricing basis:** $0.25/1M input, $1.25/1M output tokens
  380. **Scale:** 1,000 scenarios/day = $9,536/year savings with Code Mode
  381. ## Learn More
  382. - **[Cloudflare Research](https://blog.cloudflare.com/code-mode/)** – Original code mode whitepaper
  383. - **[Anthropic Study](https://www.anthropic.com/engineering/code-execution-with-mcp)** – MCP code execution benefits
  384. - **[Python Benchmark Study](https://github.com/imran31415/codemode_python_benchmark)** – Comprehensive performance analysis
  385. - **[UTCP Specification](https://utcp.io)** – Official TypeScript implementation
  386. - **[Report Issues](https://github.com/universal-tool-calling-protocol/code-mode/issues)** – Bug reports and feature requests
  387. ## License
  388. **MPL-2.0** – Open source with commercial-friendly terms.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.