ChatGPT, Claude, Cursor and other AI assistants can build a whole Mokxi project, the board, the parts, the wires and the code, and hand you a link that opens it in the editor and runs it. It is free, needs no account, and nothing is stored until you save it yourself.
There are four ways in, from the most automatic to the most manual:
- MCP. Add Mokxi's MCP server to your AI app. The assistant looks up parts and pins, checks the project the way the editor does, fixes what is wrong, and gives you a link.
- Paste. Copy the prompt from Mokxi, paste it into any chat assistant, say what to build, and paste its answer into Mokxi's Import box.
- A link. An assistant can write a link that carries the project:
https://mokxi.com/app/#ai=followed by the project as URL-encoded JSON. - An HTTP call. A script or a custom GPT's action can
POSTthe project tohttps://mokxi.com/api/ai/projectand get the link back.
All four read the same project format, below, and run the same checks.
Connect the MCP server
The server is at https://mokxi.com/mcp. It speaks MCP over Streamable
HTTP and needs no sign-in and no API key.
| App | How |
|---|---|
| Claude (claude.ai and the desktop app) | Settings, Connectors, add a custom connector with the URL above |
| ChatGPT | Add a custom connector (in developer mode) with the URL above |
| Claude Code | claude mcp add --transport http mokxi https://mokxi.com/mcp |
| Cursor | In .cursor/mcp.json: {"mcpServers": {"mokxi": {"url": "https://mokxi.com/mcp"}}} |
| VS Code | In .vscode/mcp.json: {"servers": {"mokxi": {"type": "http", "url": "https://mokxi.com/mcp"}}} |
Then ask for what you want: "Build me a night light on an Arduino Uno that turns an LED on when it gets dark, and give me the Mokxi link."
The server's card is at https://mokxi.com/.well-known/mcp.json.
The tools
| Tool | What it does |
|---|---|
get_project_format |
The rules of the format, the common parts and boards with their pins, and an example |
list_boards |
Every board Mokxi runs, its type, the code it takes and its pins |
search_parts |
Parts by what they are ("oled", "temperature sensor"), with pins and settings from the simulator's catalog |
get_part |
One part in full: pins, settings with ranges and units, and how a Mokxi template wires it |
validate_project |
The editor's own check of a project, every problem named by part and pin |
create_project |
The link that opens the project and runs it, once it has no errors |
Every tool only reads. The link carries the whole project in the part of
the address after #, which a browser never sends to a server, so nothing is
saved anywhere, no account is made and your Free plan's projects are not
touched. Opened, the project is yours to save, change or close.
The server is rate limited per address, like every public Mokxi route: 60 requests at once and then one a second, and 20 project checks at once and then one every five seconds.
Paste from a chat
In the editor, open Import (or go to mokxi.com/import) and open Paste from ChatGPT or Claude. Press Copy prompt for your AI, paste it into the assistant, and add what you want to build. Paste the whole reply back into the Import box: Mokxi finds the project in it, lays it out and wires it.
If something in the project is wrong, it still opens with everything that was right, and the report lists each problem by part and pin. Copy for your AI copies the list with a request to fix it, ready to paste back.
The project format
A project is one JSON object:
{
"format": "mokxi-ai/1",
"name": "Button and LED",
"board": "uno",
"parts": [
{"id": "led1", "type": "led", "props": {"color": "red"}},
{"id": "r1", "type": "resistor", "props": {"value": 220}},
{"id": "btn1", "type": "pushbutton"}
],
"wires": [
["board.13", "r1.1"],
["r1.2", "led1.A"],
["led1.C", "board.GND"],
["board.2", "btn1.1a"],
["btn1.2a", "board.GND"]
],
"code": {
"sketch.ino": "void setup() {\n pinMode(13, OUTPUT);\n pinMode(2, INPUT_PULLUP);\n}\n\nvoid loop() {\n // The button pulls pin 2 to ground when pressed.\n digitalWrite(13, digitalRead(2) == LOW ? HIGH : LOW);\n}\n"
}
}
| Field | What it holds |
|---|---|
format |
Always "mokxi-ai/1". It tells Mokxi what a paste is. |
name |
The project's name, up to 120 characters. |
board |
The board's type, such as "uno", "nano", "esp32" or "pico" (list_boards has them all). null for a circuit with no board. |
parts |
Every part except the board. Each has an id (a letter, then letters, digits, _ or -), a type, and optional props. |
wires |
Pairs of ends, ["partId.pin", "partId.pin"]. The board is board, so board.13 is its pin 13. A third item can name a color: red, black, green, blue, yellow, purple, cyan or pink. |
code |
The board's files, by name: {"sketch.ino": "..."} for an Arduino sketch, or {"main.py": "..."} for MicroPython on a Raspberry Pi Pico. |
There are no coordinates and no breadboard. Mokxi puts the board on the left and the parts in rows beside it, keeping parts that are wired to each other together, and routes every wire the way the canvas does. Wire each pin straight to the pin it goes to.
Pins
A pin is written the way the part names it: A and C on an LED, 1 and
2 on a resistor, 1a, 1b, 2a and 2b on a pushbutton, VCC, TRIG,
ECHO and GND on an HC-SR04. get_part lists every part's pins, and so
does each part's file in the knowledge bundle.
A board's pins can be written the way code names them: on an Uno, board.D13
is board.13; on an ESP32 DevKit, board.GPIO2 is board.D2; on a Pico,
board.15 is board.GP15 and board.A0 is board.GP26. Upper and lower
case do not matter where they do not change the pin.
Settings
props are the part's settings, as the properties panel shows them. Numbers
are plain numbers: a resistor's value is in ohms, a capacitor's in
microfarads, an inductor's in millihenries. Mokxi also reads "4.7k" or
"100nF" and converts it, with a note. get_part gives every setting's
range, unit and choices.
More than one board
Put each board in parts, leave board out (the first one is board in a
wire), and give code one set of files per board id:
{
"format": "mokxi-ai/1",
"name": "Two Unos talking",
"parts": [
{"id": "a", "type": "uno"},
{"id": "b", "type": "uno"}
],
"wires": [["a.1", "b.0"], ["b.1", "a.0"], ["a.GND", "b.GND"]],
"code": {
"a": {"sketch.ino": "void setup() { Serial.begin(9600); }\nvoid loop() { Serial.println(\"hi\"); delay(1000); }\n"},
"b": {"sketch.ino": "void setup() { Serial.begin(9600); }\nvoid loop() { if (Serial.available()) Serial.write(Serial.read()); }\n"}
}
}
What is checked
The check is the editor's own, so validate_project, the Import box and a
link all say the same things.
Errors stop create_project until they are fixed:
- a part type Mokxi does not have, with the nearest one it does ("Did you mean
ws2812?") - a pin a part does not have, with the pins it has
- a wire to a part that is not in the project
- a setting the part does not have, or a value outside its range
- a breadboard (leave it out), or a board Mokxi draws but does not simulate yet
- a wire straight from a board's power pin to its ground
- a file name with a folder in it, or an Arduino sketch with no
.inofile
Warnings are worth a look but do not stop it: a part wired to nothing, a
part with only one leg wired, a board with no code, a sketch with no
setup() or loop(), and an #include for a library Mokxi does not have.
Mokxi takes up to 150 parts, 400 wires and 20 code files a project here, and links up to about a megabyte. Past about 8,000 characters some chat apps cut a link short; the project JSON pasted into Import always works.
Links
create_project and POST /api/ai/project return a link like
https://mokxi.com/app/#ai=1...: the project packed small. An assistant with
no tools can write its own: https://mokxi.com/app/#ai= followed by the JSON
passed through encodeURIComponent. Either way the editor opens it, lays it
out, shows what came across, and runs it once its code builds.
POST /api/ai/project takes the project as its body (or as
{"project": ...}) and answers {"ok": true, "url": "...", "summary": "...", "warnings": [...]},
or 422 with {"error": "invalid_project", "ok": false, "errors": [...]}. It needs no key and accepts
calls from any origin.