Overview#
Node.js 24.2.0 and npm 11.4.2 are installed with the app. Code Workbench can run compatible Node scripts and pure JavaScript CLI tools through Bash. In Tool Services, you can launch compatible local stdio MCP servers via npx; both built-in Node and npx MCP workers provide global fetch support so pure JavaScript packages can make network requests directly. Tools that depend on desktop software or OS subprocesses require an appropriate external environment. Note that the JavaScript tool interface used for host-managed API keys runs on QuickJS.
How to use#
- In the chat input bar, go to Tools → Choose Tools and enable Code Workbench. Add your files to Conversation files and reference them with @.
- Tell the AI what to do—for example, "Use Node to read this JSON file, clean it up, and save it to
outputs." You can also ask it to install compatible npm packages and run scripts. - In an MCP service's address field, enter a launch command with a pinned version, such as
npx -y @modelcontextprotocol/server-sequential-thinking@2025.7.1, save, and connect. An internet connection is required for the first package download. - Go to Settings → Connections & advanced → Runtimes to inspect runtimes and packages, switch default pip / npm mirrors (Chinese-locale setups default to Mainland China mirrors, and you can switch to the official registries or a custom URL at any time), and clear the npm cache. After connecting, remember to enable the corresponding MCP tools on the current assistant or chat.
Best practices#
- Prefer version-pinned pure JavaScript packages, such as the verified Sequential Thinking
2025.7.1package. - Project dependencies are saved inside the session workspace, while MCP server installations are managed in a separate directory. Use explicit absolute paths when working with files.
- In-app
npm installskips lifecycle scripts. Tools that require native extensions, WebAssembly, or system subprocesses should be run on a computer or server instead. - Write generated files to
outputsso they can be previewed, saved, or shared directly in chat. Never write API keys into scripts or output files.