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
Install the Plugins Package
CodeCall ships as part of This includes
@frontmcp/plugins. Add it to your project:CodeCallPlugin along with all official FrontMCP plugins.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
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
| Option | Value | What it does |
|---|---|---|
mode | 'codecall_only' | Only the 4 meta-tools appear in tools/list. Recommended for large toolsets. |
vm.preset | 'secure' | Bank-grade sandbox defaults: strict AST validation, short timeouts, no network access. |
embedding.strategy | 'tfidf' | Fast local embeddings with no external API. Great for getting started. |
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.What Just Happened?
Instead of exposingusers:list and users:get directly in tools/list, CodeCall replaced them
with 4 meta-tools. When a client calls tools/list, it sees:
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:AgentScript
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