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
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
- 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-Tool | Purpose |
|---|---|
codecall:search | Find relevant tools by natural language query |
codecall:describe | Get detailed schemas for selected tools |
codecall:execute | Run JavaScript that orchestrates multiple tools |
codecall:invoke | Direct 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
src/app.ts
Why CodeCall Over Direct Tool Calls?
Token Efficiency
Token Efficiency
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
In-Tool Filtering
In-Tool Filtering
The killer feature: Filter, join, and transform data inside the MCP server instead of in the LLM context.Without CodeCall, you’d either:
- Build complex REST endpoints for every filter combination
- Fetch all 1000 users into LLM context (~50K tokens) and filter there
- Make multiple paginated calls with model round-trips
Any LLM Support
Any LLM Support
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
Self-Hosted Security
Self-Hosted Security
- 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:AST Guard
Static analysis validates JavaScript AST before execution. Blocks eval, dangerous globals, prototype pollution, and unbounded loops.
Enclave
Runtime sandbox executes validated code in isolated Node.js vm context with timeouts, iteration limits, and sanitized outputs.
VectoriaDB
Semantic search indexes tools with local embeddings. No external API calls, works offline, sub-millisecond queries.
Next Steps
Security Model
Deep dive into defense-in-depth security, AST validation rules, and sandbox configuration
API Reference
Complete reference for all 4 meta-tools with examples and response schemas
Configuration
Tool visibility modes, VM presets, embedding strategies, and per-tool metadata
Production Scaling
Performance tuning, monitoring, and deployment best practices
Resources
Source Code
View the CodeCall plugin implementation
Code Execution with MCP
Anthropic’s original article on the code execution pattern
Advanced Tool Use
Anthropic’s beta features: Tool Search, Programmatic Calling, and Tool Examples
Blog: Why 100 Tools Breaks Your Agent
Deep dive into the tool explosion problem and how CodeCall solves it

