Skip to content
AI News HubLIVE
More
Original source1 min read

Code mode for Replicate's MCP server

Summary

Replicate's local MCP server now has an experimental code mode that lets language models write and execute TypeScript code in a sandbox, offering two tools for documentation search and code execution to streamline complex workflows.

Code mode for Replicate's MCP server
Report an error

The correction channel is not available yet. You can copy the article reference below for later.

Correction instructions
Read article

Code mode for Replicate's MCP server – Replicate changelog

Replicate

Changelog

Code mode for Replicate's MCP server

Your browser does not support the video tag.

Replicate’s local MCP server now supports an experimental “code mode” that allows language models to write and execute TypeScript code directly in a sandboxed environment.

Instead of exposing individual API operations as separate tools, Code mode provides two tools: one for searching SDK documentation, and another for executing TypeScript code using the Replicate SDK within a Deno sandbox. The model uses a built-in docs search tool to learn how to write code against the SDK. This approach is more efficient for complex workflows that involve multiple API calls, as it reduces context window usage and allows the model to write custom logic that calls multiple methods and returns only the final results.

To use code mode, start the local MCP server with the --code-mode flag:

Copy

npx -y replicate-mcp@alpha --tools=code

Here’s how to add the local Replicate MCP server in code mode as a tool in Claude Code:

Copy

claude mcp add "replicate-code-mode" --scope user --transport stdio -- npx -y replicate-mcp@alpha --tools=code

Code mode is currently experimental and subject to change. It requires Node.js and Deno to be installed locally. Remote cloud sandboxing support is planned but not yet available.

To get started with Code mode, see the Code mode documentation or visit the demo GitHub repo.

Back

Home

About

Changelog

Join us

Terms

Privacy

Status

Support

Key points and analysis

Article intelligence

EngineersIntermediate

Key points

  • Code mode provides two tools: SDK documentation search and TypeScript code execution in a Deno sandbox.
  • It reduces context window usage by allowing custom logic that calls multiple API methods.
  • Start with npx -y replicate-mcp@alpha --tools=code; requires Node.js and Deno.
  • Experimental feature; remote cloud sandbox support planned.

Highlights and analysis are generated automatically and may contain errors. Check the original source.