Skip to main content
CodeCall Plugin
This guide assumes you have a FrontMCP project set up. If you’re new to FrontMCP, start with the installation guide first.

From Zero to CodeCall in 5 Steps

1

Install the CodeCall Plugin

Add the CodeCall plugin to your project:
2

Create Tools with CodeCall Metadata

Mark each tool with the codecall metadata object. Setting enabledInCodeCall: true makes the tool available inside CodeCall scripts, while visibleInListTools: false hides it from the standard tools/list response so the LLM only sees the 4 meta-tools.
src/tools/users.ts
The codecall metadata is per-tool. You can mix CodeCall-enabled tools with regular tools that remain visible in tools/list as usual.
3

Wire Up CodeCallPlugin in Your App

Register the plugin in your @App decorator. The three key options are mode, vm preset, and embedding strategy:
src/app.ts
4

Start the Dev Server

Launch your FrontMCP application in development mode:
You should see output confirming CodeCall is active:
Connect with the MCP Inspector to interact with your server visually:
In the Inspector, point to your running server and you will see the 4 CodeCall meta-tools instead of users:list and users:get.
5

Try the Search-Describe-Execute Flow

CodeCall uses a three-step flow: search for relevant tools, describe their schemas, then execute a script that orchestrates them.1. Search for tools
Response
2. Describe the tools you need
Response
3. Execute a script
Response

What Just Happened?

Instead of exposing users:list and users:get directly in tools/list, CodeCall replaced them with 4 meta-tools. When a client calls tools/list, it sees:
The LLM only needs to understand these 4 tools, no matter how many underlying tools your server has. When it needs a specific capability, it searches, reads the schema on demand, and writes a short script to get the job done.

Your First Script

The real power of CodeCall is combining multiple tool calls with server-side logic in a single round-trip. Here is a script that finds all admin users from the active user list:
Here is the same script, expanded for readability:
AgentScript
Key takeaway: one round-trip to the server, data filtered server-side, minimal tokens returned to the LLM. Without CodeCall, this would require fetching all users into context, burning tokens on the full payload, and relying on the model to filter correctly.

Next Steps

AgentScript Guide

Master the scripting language: APIs, patterns, and best practices

Configuration

Tool visibility modes, VM presets, and embedding strategies

Examples & Recipes

Real-world patterns: CRM, ETL, batch processing, and more

CRM Demo

Explore the full multi-tool CRM reference app