Skip to main content
Code mode exposes execute_code and search_tools so agents run JavaScript with access to connected MCP tools instead of making individual tool calls. Node.js only.

Enable

Executors

Agent integration

Use with @mcp-use/agent and PROMPTS.CODE_MODE:

Reference

Client API reference — config types, searchTools, and ExecutionResult. Anthropic: Code execution with MCP