Skip to main content
0
C

Code Mode

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

Rating

0.0

Votes

0

score

Downloads

0

total

Price

Free

API key required

Works With

Claude CodeCursorWindsurfVS CodeDeveloper tool

About

-->

πŸ€– Code-Mode Library: First library for tool calls via code execution

[](https://www.npmjs.com/package/@utcp/code-mode)

Transform your AI agents from clunky tool callers into efficient code executors β€” in just 3 lines.

Why This Changes Everything

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.

Apple, Cloudflare, and Anthropic 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.

Benchmarks

Independent Python benchmark study validates the performance claims with $9,536/year cost savings at 1,000 scenarios/day:

Scenario ComplexityTraditionalCode ModeImprovement
Simple (2-3 tools)3 iterations1 execution67% faster
Medium (4-7 tools)8 iterations1 execution75% faster
Complex (8+ tools)16 iterations1 execution88% faster

Why Code Mode Dominates:

Batching Advantage - Single code block replaces multiple API calls Cognitive Efficiency - LLMs excel at code generation vs. tool orchestration Computational Efficiency - No context re-processing between operations

Getting Started

Get Started in 3 Lines

typescript
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

typescript
// 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

Don't lose this

Three weeks from now, you'll want Code Mode again. Will you remember where to find it?

Save it to your library and the next time you need Code Mode, it’s one tap away β€” from any AI app you use. Group it into a bench with the rest of the team for that kind of task and you can pull the whole stack at once.

⚑ Pro tip for geeks: add a-gnt πŸ€΅πŸ»β€β™‚οΈ as a custom connector in Claude or a custom GPT in ChatGPT β€” one click and your library is right there in the chat. Or, if you’re in an editor, install the a-gnt MCP server and say β€œuse my [bench name]” in Claude Code, Cursor, VS Code, or Windsurf.

πŸ€΅πŸ»β€β™‚οΈ

a-gnt's Take

Our honest review

This plugs directly into your AI and gives it new abilities it didn't have before. πŸ”Œ Plug-and-play library to enable agents to call MCP and UTCP tools via code execution. . Once connected, just ask your AI to use it. It's completely free and works across most major AI apps. This one just landed in the catalog β€” worth trying while it's fresh.

Tips for getting started

1

Tap "Get" above, pick your AI app, and follow the steps. Most installs take under 30 seconds.

2

Heads up: this needs an API key to work. You'll get one from the service's website (usually free). The setup guide tells you exactly where.

What's New

Version 1.0.06 days ago

Imported from GitHub

Ratings & Reviews

0.0

out of 5

0 ratings

No reviews yet. Be the first to share your experience.