Skip to main content
CodeCall transforms how LLMs interact with large toolsets. Instead of exposing hundreds of tool definitions that overwhelm the context window, CodeCall provides a small meta-API where the model discovers, describes, and orchestrates tools by writing JavaScript. CodeCall meta-API architecture CodeCall meta-API architecture

Scalable Discovery

Search across hundreds of tools using natural language with VectoriaDB embeddings

Code Orchestration

LLMs write JavaScript to combine tools, filter data, and build workflows in a single execution

Bank-Grade Security

Defense-in-depth with AST Guard validation and Enclave sandboxing

Any LLM, Any Cloud

Open source, self-hosted, works with any MCP-compatible client - not just Claude

The Problem: Tool Explosion

As MCP servers grow, list_tools becomes unmanageable:

Early Days

5-10 tools, clean schemas, instant model understanding

Growth Phase

Add OpenAPI adapters, multiple apps, per-tenant tools → 50-200+ tools

Pain Point

Context window fills with schemas, models struggle to find relevant tools, token costs explode
The cost is real:
  • Token waste: Listing 100 tools with schemas can consume 20,000+ tokens before the first query
  • Discovery failure: Models pick wrong tools or miss relevant ones buried in the list
  • No filtering: Standard MCP can’t filter results in-tool - you fetch everything, pay for all tokens, then filter
  • Round-trip latency: Multi-tool workflows require model round-trips between each tool call

The Solution: Code-First Meta-API

CodeCall collapses your entire toolset into 4 meta-tools:
Meta-ToolPurpose
codecall:searchFind relevant tools by natural language query
codecall:describeGet detailed schemas for selected tools
codecall:executeRun JavaScript that orchestrates multiple tools
codecall:invokeDirect single-tool calls (optional, no VM overhead)

How It Works

One round-trip executes a complex workflow that would otherwise require multiple model invocations.

Quick Start

npm install @frontmcp/plugins
src/app.ts
import { App, Tool, ToolContext } from '@frontmcp/sdk';
import { CodeCallPlugin } from '@frontmcp/plugins';

@Tool({
  name: 'users:list',
  description: 'List users with optional filtering',
  codecall: {
    enabledInCodeCall: true,     // Available in CodeCall scripts
    visibleInListTools: false,   // Hidden from standard list_tools
  },
})
class ListUsersTool extends ToolContext {
  async execute(input: { status?: string; limit?: number }) {
    // Your implementation
    return { users: [/* ... */] };
  }
}

@App({
  id: 'my-app',
  name: 'My Application',
  tools: [ListUsersTool],
  plugins: [
    CodeCallPlugin.init({
      mode: 'codecall_only',  // Recommended for large toolsets
      vm: {
        preset: 'secure',     // Bank-grade security defaults
      },
      embedding: {
        strategy: 'tfidf',    // Fast, no external API needed
      },
    }),
  ],
})
export default class MyApp {}
Now your MCP client sees only 4 tools instead of potentially hundreds:
{
  "tools": [
    { "name": "codecall:search", "description": "Search for tools..." },
    { "name": "codecall:describe", "description": "Get tool schemas..." },
    { "name": "codecall:execute", "description": "Execute JavaScript plan..." },
    { "name": "codecall:invoke", "description": "Direct tool invocation..." }
  ]
}

Why CodeCall Over Direct Tool Calls?

Before: List 100 tools → ~20,000 tokens in context After: 4 meta-tools → ~2,000 tokens, load schemas on-demandFor a workflow fetching users and invoices:
  • Direct calls: 3+ model round-trips, each with full tool list
  • CodeCall: 1 round-trip, script handles orchestration
The killer feature: Filter, join, and transform data inside the MCP server instead of in the LLM context.
// This runs in CodeCall, not in the LLM
const users = await callTool('users:list', { limit: 1000 });
const active = users.filter(u =>
  u.status === 'active' &&
  u.firstName.startsWith('me') &&
  new Date(u.lastLogin) > tenDaysAgo
);
return active.slice(0, 10);
Without CodeCall, you’d either:
  1. Build complex REST endpoints for every filter combination
  2. Fetch all 1000 users into LLM context (~50K tokens) and filter there
  3. Make multiple paginated calls with model round-trips
Unlike Anthropic’s code execution which requires Claude, CodeCall runs on any MCP-compatible client:
  • Claude Desktop
  • OpenAI with MCP adapters
  • Open source models via LangChain/LlamaIndex
  • Custom agents
Your infrastructure, your choice.
  • No data leaves your VPC: Embeddings run locally via VectoriaDB
  • Bank-grade sandboxing: AST Guard + Enclave
  • Audit everything: Full logging of script execution and tool calls
  • You control the limits: Timeouts, iteration caps, tool allowlists

When to Use CodeCall

Use CodeCall When

  • You have 20+ tools or anticipate growth
  • Tools come from OpenAPI adapters (often 50-200+ endpoints)
  • Workflows require multi-tool orchestration
  • You need in-tool filtering without building custom endpoints
  • You want any-LLM compatibility (not locked to Claude)
  • Security and compliance require audit trails

Skip CodeCall When

  • You have < 10 simple tools
  • Workflows are single-tool operations
  • You’re building a quick prototype
  • Tools already have comprehensive filtering APIs

Architecture Deep Dive

CodeCall is built on three battle-tested FrontMCP libraries: Every script goes through this 6-layer pipeline:

Next Steps


Resources