---
area: "code"
title: "Code"
tools: 1
mcp_server: "https://api.conecto.chat/mcp/code"
auth: "Authorization: Bearer <conecto_sk_ key>"
docs_url: "https://conecto.chat/tools/code"
---

# Code

Short Python or Node.js programs run in a fresh sandbox with no network. Files from the store go in, and whatever the program writes comes back as new files: for the sums, charts and conversions no other tool does.

Replaces: Google Colab, Replit.

## MCP server

`https://api.conecto.chat/mcp/code` connects the Code tools only, plus the account tools that come with every MCP server. It speaks MCP over Streamable HTTP; send the key as `Authorization: Bearer <conecto_sk_ key>`. Every tool here is also a REST call: `POST https://api.conecto.chat/v1/tools/<name>` with the arguments as a JSON object.

## ChatGPT and Claude

Add `https://api.conecto.chat/v1/mcp` as a connector in ChatGPT or Claude, one for every area, and tick Code when you sign in. It signs in with OAuth: someone on the account signs in on conecto.chat, ticks the areas it may use and allows it, and it runs on a key of its own that the owner can revoke.

## OpenAPI

For a custom GPT's Actions: `https://api.conecto.chat/v1/openapi/code.json` (OpenAPI 3.0, the key as a Bearer token). For Power Automate, Logic Apps and Copilot Studio connectors: `https://api.conecto.chat/v1/openapi/code.swagger.json` (OpenAPI 2.0, the key in the X-Api-Key header). Both list this area's tools and the account tools.

Prices: Running code $0.0001 a second, at least $0.005 a run · the longest run, 300 seconds, $0.031. A call that fails costs nothing.

## Tools

| Tool | What it does | Price |
|---|---|---|
| [code_run](https://conecto.chat/tools/code/code_run.md) | Runs a short Python 3.12 or Node.js 22 program in a fresh sandbox, with store files in /input; files it writes come back to the store. | $0.0001 per started second of run time, at least $0.005 a run ($0.005 for a run under 50 seconds), up to $0.031. |

## Example jobs

- Work out last quarter's best-selling fabrics from the orders export, with a chart.
- Turn a supplier's Excel price list into the CSV the shop imports.
- Find the delivery addresses in a list of 400 that have no postcode.
