Free Intensive Nov 21–22Free 2-day hands-on Vibecoding Intensive on Nov 21–22 at 16:00 MSK (Sat–Sun) · Live Cohort 3 starts Nov 23Join Free →Cohort 3 (Nov 23)
ReleaseAPI / Product · ActionableX: @AnthropicAI→ original

Anthropic adds code execution, MCP servers, files and a 1-hour cache to its API, replacing the 5-minute window

Anthropic has added four ready-made building blocks to its API for agents: Python code execution in a sandbox, connections to services via the MCP protocol, one-time file uploads, and a prompt cache that lasts one hour instead of five minutes. An agent can fetch a customer table once, compute churn from it in code, and avoid resending long instructions. According to the company, the cache cuts the cost of long prompts by up to 90%. Teams should check which of their custom glue code can now be removed.

AI-processed from X: @AnthropicAI; edited by Hamidun News
Anthropic adds code execution, MCP servers, files and a 1-hour cache to its API, replacing the 5-minute window
Source: X: @AnthropicAI. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceX: @AnthropicAI ↗
Editor-in-Chief
Code execution50 free container hours per day, then about 5 cents per hour
MCP connectorthe address of a remote MCP server is specified directly in the request
Key metric #3One-hour cache instead of 5 minutes; according to Anthropic, latency drops by up to 85%

Building an AI agent on a bare language model API takes more than the model itself. You need somewhere safe to run the code the model writes. You need to connect it to external services such as a task tracker or CRM.

You need to stop resending the same documents every time and paying to process them again. On May 22, 2025, Anthropic announced four API capabilities that address exactly these needs. The code execution tool runs the model's Python code in a sandbox on Anthropic's side.

The MCP connector connects external services via the MCP protocol, and you don't have to write a separate client for each one. The Files API lets you upload a document once and reference it afterward. The extended prompt cache keeps the repeated part of a request for up to an hour instead of the previous five minutes, which makes requests cheaper and faster.

The X post itself lists only the feature names and a link to the announcement. The details are in the company's documentation and blog. Below is a breakdown of each item; figures are as given in the documentation at the time of the announcement.

Code execution tool: the model runs code itself

The first tool lets Claude write and execute Python code in an isolated sandbox. It is similar to a built-in Jupyter notebook. The model can calculate, plot charts, process tables and check its own hypotheses instead of guessing the answer "in its head."

For example, you ask which customers in an export are most likely to leave. Previously, a developer had to set up their own sandbox and manage security and timeouts. Now it is enough to enable the tool in the request. According to the documentation, in beta there are 50 free container hours per day per organization, after which the cost is about 5 cents per container hour.

MCP connector and Files API: less glue between services

MCP (Model Context Protocol) is an open protocol from Anthropic through which the model communicates with external tools such as a task tracker, CRM or knowledge base. Previously, a custom client had to be written for each MCP server. The MCP connector lets you simply specify the address of a remote MCP server in the request. The API connects to it itself, retrieves the list of tools and calls the one it needs. For a product manager, this means ready-made integrations from third-party companies can be connected faster.

The Files API addresses the everyday problem of re-uploading. A document, such as a PDF with regulations or a spreadsheet, is uploaded once, you get a file identifier, and you reference it in any subsequent request. There is no need to re-encode and resend the same file at every step of a dialogue. Combined with code execution, this creates a workflow: you upload the data, the model runs code, and it returns the finished results.

Extended prompt cache: one hour instead of five minutes

Prompt caching works like a bookmark in a book. A long, unchanged part of a request (instructions, documents, examples) is not processed again by the model but taken from the cache. This reduces both cost and latency. Previously, the cache lived for about five minutes. If an agent took longer to "think" or a user replied slowly, the entire context had to be computed again. Now an option with a lifetime of up to one hour is available.

Anthropic states that caching can reduce the cost of long prompts by up to 90% and latency by up to 85%. The one-hour retention is especially useful for long agentic tasks, where the context is large and steps are spaced out with pauses. Longer storage is charged separately: writing to the one-hour cache costs more than writing to the five-minute cache, while reading from the cache is noticeably cheaper than regular input.

What this means in practice

All four features launched together with the Claude 4 models. Together they form a toolkit for an agent platform: code execution, integrations, files and context savings. Anthropic is taking on part of the infrastructure work that third-party frameworks and custom code used to handle.

There are also honest limitations. Some capabilities are in beta, so the interface and pricing may change. Code runs on Anthropic's servers, so for sensitive data you need to check the security and storage requirements. And the more logic moves into one vendor's API, the stronger the lock-in becomes.

What developers should do: if you already have an agent with a custom sandbox or a long, repeated context, measure what you get with the one-hour cache and built-in code execution. For prototypes, the combination of the MCP connector and the Files API will likely save several days of integration work.

Story

Key Questions Answered

What are the key details on Code execution tool: the model runs code itself?

The first tool lets Claude write and execute Python code in an isolated sandbox. It is similar to a built-in Jupyter notebook. The model can calculate, plot charts, process tables and check its own hypotheses instead of guessing the answer "in its head." For example, you ask which customers in an export are most likely to leave. Previously, a developer had to set up their own sandbox and manage security and timeouts. Now it is enough to enable the tool in the request.

What are the key details on MCP connector and Files API: less glue between services?

MCP (Model Context Protocol) is an open protocol from Anthropic through which the model communicates with external tools such as a task tracker, CRM or knowledge base. Previously, a custom client had to be written for each MCP server. The MCP connector lets you simply specify the address of a remote MCP server in the request. The API connects to it itself, retrieves the list of tools and calls the one it needs.

What are the key details on Extended prompt cache: one hour instead of five minutes?

Prompt caching works like a bookmark in a book. A long, unchanged part of a request (instructions, documents, examples) is not processed again by the model but taken from the cache. This reduces both cost and latency. Previously, the cache lived for about five minutes. If an agent took longer to "think" or a user replied slowly, the entire context had to be computed again. Now an option with a lifetime of up to one hour is available.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…