Code Mode for the Akamai MCP Server
Code Mode is a connection option for the Akamai Model Context Protocol (MCP) Server. It lets your AI client discover tools and write code that calls several of them in one pass.
The Akamai MCP Server is in beta. Features, behavior, and APIs may change before general availability.
Understand Code Mode
In Code Mode, the model writes code instead of requesting each operation separately. It doesn't call one tool at a time and wait to decide the next step. It discovers the relevant tools, and then writes code that calls and combines several of them in one pass.
After you turn on Code Mode, the AI client no longer sees a separate tool for each Akamai operation. It sees a small set of meta-tools that let it search for tools, inspect their schemas, and run generated code that calls them.
Code Mode fits the Akamai MCP Server for two reasons:
- Large tool catalog. The Akamai MCP Server routes requests to a growing set of product MCP servers for Security, Delivery, and Compute products, and the catalog varies by MCP token and product configuration. Code Mode lets the client find only the tools it needs. For the current product list, see Configure the Akamai MCP Server.
- Cross-product workflows. Workflows that chain across products involve dependent calls and result shaping instead of a single tool call. For example, an agent can pull Reporting data, filter it, and then update a Property Manager configuration based on the result.
Choose between direct tool calls and Code Mode
This table shows when to use each connection pattern:
| Pattern | Best suited for |
|---|---|
| Direct tool calls | Simple tasks that use a small, known tool set. |
| Code Mode | Composed or dependent calls, large tool catalogs, loops, branching, filtering, result shaping, or reusable logic. |
Discover the meta-tools exposed in Code Mode
The default configuration exposes five meta-tools instead of the individual product tools behind the Akamai MCP Server:
| Meta-tool | Description |
|---|---|
execute | Runs generated Python code in a sandbox. In that code, a single call_tool(name, params) function calls the underlying Akamai tools and chains their results. |
get_schema | Returns the parameters, types, and description for a named tool. |
list_tools | Lists the available tool catalog. |
search | Searches the token's available tools by keyword and returns a ranked list of matches. |
tags | Lists available tags and tool counts, with an option to list tools grouped by tag. |
A typical plan has three steps. The client calls search to find a candidate tool, calls get_schema to confirm its parameters, and then calls execute with code that calls the tool through call_tool(). The full Akamai tool catalog doesn't need to load into context. Calls made through call_tool() go through the same tool invocation and authorization checks as direct tool calls.
Review sandbox limits
Code submitted to execute runs in a sandbox with resource limits. For the current limits, see the tool descriptions the Akamai MCP Server provides, especially the description for execute.
If generated code exceeds a limit, the sandbox stops execution and returns an error to the client. If the client hits the tool call limit, break the task into smaller execute calls instead of retrying the same plan. Changes from earlier successful tool calls aren't rolled back when execution fails, so check which operations completed before you retry.
Enable Code Mode for the Akamai MCP Server
Code Mode is a connection option for an MCP token, not a separate integration you build. Turn it on in the MCP Token Manager when you connect to your AI agent.
- On the Connect your AI assistant page, select Code mode.
- Under MCP Gateway URL, click Copy URL. The copied URL includes a
codemode=trueparameter, which tells the Akamai MCP Server to expose the token's tools through Code Mode instead of one tool per operation. - Connect your AI client as usual.
An MCP client connects to a Code Mode URL the same way it connects to any other MCP Gateway URL. You don't need any additional client-side setup to use Code Mode.
Updated 7 days ago
