Home / Companies / Redocly / Blog / Post Details
Content Deep Dive

Code mode for MCP: up to 80% lower LLM costs

Blog post from Redocly

Post Details
Company
Date Published
Author
Vasyl Havronskyi
Word Count
1,206
Company Posts That Month
9
Language
English
Hacker News Points
-
Post removed?
No
Summary

Redocly’s MCP server now supports code mode, which allows AI agents to write and execute JavaScript in a server-side sandbox to retrieve, filter, and analyze API documentation before returning only relevant findings to the model. Unlike direct tool calling, where each intermediate tool result enters the LLM context, code mode can handle multi-step tasks such as identifying API operations without documented 400 responses through loops and conditional logic, reducing unnecessary context use and LLM decisions. In a sample audit of three APIs, Redocly reported 91% fewer client-visible calls, 80% fewer input tokens, and 79% lower cost while maintaining equivalent or better answer quality. Across multiple documentation tasks and five models, the company measured input-token savings of 50–90% and cost reductions of roughly 45–80%, especially for queries requiring broad retrieval, comparison, or filtering. Code mode is available to Redocly MCP server users and is also used by its AI Assistant, with future plans to enable agents to call users’ APIs as well.

Trends Found in this Post
Trend Post Mentions Total Month Mentions Posts Companies MoM
LLM 16 747 162 79 -85%
MCP 15 2,241 148 72 -74%
AI Agents 1 931 231 103 -84%
Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.