G-code straight from your AI assistant

"An AI making up my G-code? No thanks." Fair objection — but that is not what happens here. The G-code is computed by the same deterministic generator as in the browser: the same file with the same settings always yields the same program. The language model writes none of it; it operates the tool and helps with the questions around it.

The MCP server turns step2gcode into a tool your AI assistant can use: you describe the part, the assistant uploads the STEP, DXF or SVG file, picks cutter and depth, shows you the tool path as an image and writes the finished G-code to disk. All inside the conversation, without switching to a CAM package. The same tools work unattended in automated AI workflows, where an agent or a script drives them end to end.

Setting it up takes a minute: add a connection to https://www.step2gcode.com/api/mcp/YOUR-TOKEN in your client, and that is it. No installation, no Node, no configuration file. The access token from your credit purchase doubles as the API key — no account, no registration, no subscription.

Credits and the access token are available at www.step2gcode.com — no account, no subscription. After that, the address https://www.step2gcode.com/api/mcp/YOUR-TOKEN in your client is all it takes.

Why this belongs in an assistant

  • The assistant advises, the generator computes: Having an AI write the G-code outright makes no sense, and step2gcode deliberately does not do it. At the machine you expect the same file with the same settings to yield exactly the same program every time; a language model that re-derives the coordinates on each run cannot promise that. A wrong number here is not a clumsy sentence, it is a broken cutter. The computing is therefore done by a fixed generator whose output repeats byte for byte. The assistant takes over what actually stops people without CAM experience: which cutter for aluminium rather than plywood, how deep per pass, how many holding tabs for this cut-out, why the feed should be lower in acrylic. Advice and calculation stay cleanly separated.
  • Iterating costs nothing extra: What counts is the model, not the call. Ten attempts with a different cutter, depth or origin on the same part cost one credit in total — exactly what an assistant does: try, adjust, recompute.
  • No blind trust required: Before the download the assistant shows the tool path as an image: top view and isometric view, cutting moves and rapids in separate colours. The preview is free.
  • Your credit balance is the spending limit: An assistant cannot spend more than what sits on the access token. No subscription surprises, no recurring cost.

What the MCP server offers

  • create_upload_link — create a link for uploading your file in the browser (free)
  • check_upload — tells the assistant once the file has arrived (free)
  • generate_gcode — set cutter, depth and origin, then run the job (free)
  • get_job_status — check progress (free)
  • preview_toolpath — inspect the tool path as an image (free)
  • get_download_link — fetch the finished program (1 credit per new model)
  • get_credit_balance — show credits left and models already paid for (free)

Verification stays your job

The generated G-code is a machine-produced proposal, including when an assistant drove the workflow. Verify tool paths, depths of cut, feed rates and clearances before every run, and do an air pass without a workpiece when in doubt. Uploaded files are deleted after 24 hours at the latest.

Frequently asked questions

How do I set it up?

All you need is the address https://www.step2gcode.com/api/mcp/YOUR-TOKEN, with your access token in place of YOUR-TOKEN. In Claude you add it as a custom connector, in ChatGPT as a custom connector in developer mode, in the Gemini CLI as an entry with that httpUrl. There is nothing to install.

Can I try it before buying credits?

Yes. Use https://www.step2gcode.com/api/mcp/test — that address needs no access token. Uploading a file, generating the G-code and viewing the tool path preview all work; only the download stays closed, because the finished program is the paid part. The assistant knows this and will explain it to you at that point.

Can the assistant set up the connection itself?

Yes. Just tell it to get itself a step2gcode trial connection: one call to https://www.step2gcode.com/api/mcp/trial hands it its own MCP address plus a ready-made setup line for Claude Code, the Gemini CLI, Cursor or VS Code — no account, no registration, no key. The whole flow up to the tool path preview runs on it. If you then want the G-code, you buy credits through the link it shows you; they land on that exact connection, and the download continues in the same conversation.

Can I keep the token out of the address?

Yes, and that is the safer route. If your client allows custom request headers — Claude does, in the connector dialog — use the address without the token, https://www.step2gcode.com/api/mcp, and pass the key as the header X-Api-Token or as Authorization: Bearer. That keeps it out of browser history, bookmarks and server logs. The token in the path stays available for clients such as ChatGPT that only accept an address. Either way: whoever holds the full address can spend the credits — treat it like a password.

Which apps can I connect — and what is the feature called there?

Anything that allows custom MCP connections. The vendors name it differently: in Claude (app and web) they are called Connectors, where you add a custom connector by URL; Claude Code takes one line in the terminal (claude mcp add). ChatGPT also calls them Connectors, with custom MCP servers available in developer mode. In the Gemini CLI it is an entry under mcpServers with httpUrl in settings.json; the Gemini web app currently offers no free MCP binding. Cursor and VS Code simply say MCP servers and take a JSON entry with the address. If you would rather let the assistant work on local files directly instead of uploading them in a browser, run the local server from our package instead.

What does it cost through the MCP server?

There is no free quota over MCP or the API: every new model costs one credit, charged at download. Uploading, generating, status polling and the image preview are free. A model already paid for stays free permanently, including in later months.

Where do I get the access token?

From your credit purchase at www.step2gcode.com. The token is then stored in your browser and printed on your invoice. It is anonymous and replaces account and password, so keep it safe.

Can the assistant read my G-code without credits?

No. Over MCP and the API the program is only available through the paid download. What is free is the image preview: it renders the tool path as a raster image from which no program can be reconstructed — depth per pass, feed rates, spindle speeds and ordering are not in it.

Is the interface available without MCP?

Yes. The flow is upload, generate, poll status, download across four REST calls; the access token travels in the Authorization Bearer header, or as X-Api-Token if that header is already taken. The MCP server is just a thin wrapper around it.

Which parts is this suitable for?

For 2.5D milling and 2D laser work: plates, front panels, brackets and cut-outs, with pockets, holes, chamfers and holding tabs. For true 3D freeform surfaces a full CAM package remains the right choice.

Knowledge: what step2gcode costs and where its limits are