Use Noodles with your AI agent
There are four ways to work on Noodles.gl with an AI agent. Pick by where the agent runs and what you want it to change.
| Way | What the agent can do | What you need |
|---|---|---|
| In-app assistant | Answer questions and propose graph edits for you to accept | A browser. Nothing to install |
| Drive a running editor | Change the map on screen, check it with a screenshot, set keyframes, export an MP4 | A coding agent, a local checkout, Chrome or Edge |
| Write project files | Create or edit noodles.json files and check them, with no browser | A coding agent and a local checkout |
| Read the docs | Look things up while it works on your own code | Any agent that can fetch a URL |
The fastest way to try the second one is the quick start prompt on the home page: paste it into your agent and it installs Noodles.gl, opens an example map, changes it, and shows you a screenshot.
The in-app assistant
The chat panel inside the editor (the Assistant button in the top bar) is its own agent. It reads your graph, runs code against it, searches the docs, and changes the graph. When it finishes, a card lists every change it made: Accept keeps them as one undo step, and Reject undoes them.
It runs on a free OpenRouter connection, a model on your own GPU, your own API key, or an ACP agent such as Claude Code on your machine. See AI Assistant for setup.
Use it when you are already in the editor and want help with the project in front of you. Use a coding agent when you want to work from your terminal or IDE, change files in a repo, or export video without clicking.
Drive a running editor
When you open the editor with ?externalControl=true, it offers its tools over WebMCP. A small relay, @mcp-b/webmcp-local-relay, passes them to your agent as an MCP server. The agent then works on the open project the same way the in-app assistant does, and the changes appear in the browser as it makes them.
Set it up
-
Clone the repo and install:
git clone --depth 1 https://github.com/joby-aviation/noodles.gl.gitcd noodles.gl && npm install -
Register the relay with your agent, once:
- Claude Code
- Codex
- Gemini CLI
- Cursor
- VS Code
- Other
claude mcp add webmcp -- npx -y @mcp-b/webmcp-local-relay@4codex mcp add webmcp -- npx -y @mcp-b/webmcp-local-relay@4Run in the repo folder. It writes
.gemini/settings.jsonthere; add-s userto register it for every folder.gemini mcp add webmcp npx -y @mcp-b/webmcp-local-relay@4Add to
.cursor/mcp.jsonin the repo folder:{
"mcpServers": {
"webmcp": {
"command": "npx",
"args": ["-y", "@mcp-b/webmcp-local-relay@4"]
}
}
}Add to
.vscode/mcp.jsonin the repo folder:{
"servers": {
"webmcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@mcp-b/webmcp-local-relay@4"]
}
}
}Any MCP client that runs stdio servers works. The command is
npxwith the arguments-y @mcp-b/webmcp-local-relay@4. -
Start your agent in the repo folder. Most agents load MCP servers only when they start, so restart it if it was already running.
-
Start the editor:
cd noodles-editor && npm start -
Open a project with external control on, in Chrome or Edge. An example opens at
http://localhost:5173/examples/<name>?externalControl=true, such asexamples/nyc-taxis. Your own projects live athttp://localhost:5173/projects/<name>?externalControl=true, where<name>is the project folder's name, once you have opened the folder in the editor.
Do these in order. The relay starts with your agent, and the page looks for it for about 10 seconds after it loads. A tab opened before the agent started won't connect until you reload it.
Ask for changes
Ask in plain words: "make the arcs red", "zoom to Manhattan and tilt the camera", "fade the points in over the first 2 seconds", "export a 5 second video". The agent can:
- read the graph and each node's parameters, output and errors
- add, change and remove nodes and connections
- run JavaScript against the project to inspect data
- read the project's data files and write new ones under
@/.agent/ - capture a screenshot of the map to check its work
- read and set timeline keyframes
- render the timeline to an MP4 with
export_video
The repo includes a skill, noodles-live, that walks an agent through this loop: read before editing, make one change, check the screenshot, export. Claude Code loads it on its own in the repo. For other agents, ask them to read .claude/skills/noodles-live/SKILL.md first.
Export video
export_video renders the timeline the same way the Export button does. Every setting is optional (start and end time, frame rate, size, codec); the rest come from the project's render settings. The file goes to @/.agent/renders/ in the project, and to your downloads folder if you ask for it. Long renders keep going after the agent's call returns, and the agent checks on them with get_export_status.
Exporting needs WebCodecs, so use Chrome or Edge. Example projects live in memory, so ask for a download there if you want to keep the file after a reload.
Things to know
- Changes go straight to the open project. There is no Accept or Reject card as in the in-app assistant. Each
apply_modificationscall is one undo step, soCmd+Z/Ctrl+Ztakes it back. Save before you ask for a large change. - Live edits don't write files. Save from the editor to keep them, or have the agent edit
noodles.jsonas described below. - Keep the tab visible. A hidden tab stops drawing, so screenshots fail until you bring the browser back to the front.
- Use one tab. With several Noodles tabs open, the relay adds a tab id to each tool name.
- Local only. The relay connects to editors on
localhost.?safeMode=trueremoves the tool that runs code. - Read-only elsewhere. On any host but
localhost,?externalControl=trueoffers only the tools that read the project, take screenshots and check exports. Add&agentAccess=read-writeto let an agent change the project there too.
Render without an editor
To get a video from a project with no editor open, such as a title card, a batch of renders, or a check that an animation looks right, render it from the command line. From the repo root:
npm run render -- path/to/project --out renders/title.mp4
npm run render -- path/to/project --out a.mp4 --start 0 --end 7.5 --fps 30 --width 1920 --height 1080
It starts the editor's dev server, opens the project in a headless Chromium (from the repo's Playwright), runs the same export as the Export button, and writes the file. Settings you leave out come from the project's render settings on its Deck node. Progress prints as running frame N/M lines; --json prints one JSON status per line instead. Pass --url http://localhost:5173 to use an editor you already have running. The command exits 1 with the reason when the export fails.
The noodles MCP server offers the same as render_project, with progress notifications as it goes, so an agent that writes a project with that server can render it without a browser.
The project is a folder with a noodles.json, its data files in data/ (or beside it, as in the examples). It opens in memory, so nothing in the folder changes.
Rendering runs WebGL in the headless browser. On a Mac it asks for the GPU (Metal); where there is none, Chromium draws with SwiftShader in software, which works but is much slower.
Which route
- No editor open:
npm run render, orrender_projectfrom thenoodlesserver. - An editor open with
?externalControl=true:export_videoover WebMCP. The tab has to stay visible, since a hidden tab stops drawing. - Your own script driving the editor (Playwright, Puppeteer): read
window.__noodles.exportStatus(), or listen for thenoodles:exportevent onwindow. Both carry{ state, frame, totalFrames, error }for every video export, the Export button's too, so a script doesn't have to read the page's text. A page opened with?headless=truealso haswindow.__noodles.openProject()andrenderVideo(), which the render command uses.
An export that stops making progress ends with an error naming the step: a frame that doesn't finish drawing within 2 minutes (waiting for its layers' data counts), or a drawn frame that can't be read from the canvas.
Write project files
A project is a noodles.json file: a list of nodes, the edges between them, and the timeline. A coding agent can write one directly. Two tools in the repo keep it from guessing.
The noodles MCP server answers from your checkout, with no editor running:
list_operatorsandget_operator_schema: every operator, and one operator's inputs, outputs and the exact names to wire them withget_documentation: search these docs, or read a page by idlist_examplesandget_example: the example projects, with their READMEs and data filesvalidate_project: the check below, as a tool
The validator checks a file against the operator registry: operators, parameters, ports, wire types and references. Each error names the fix. From the repo root:
npm run validate:projects -- path/to/noodles.json
The file is done when it prints OK.
A project outside the bundled examples, such as projects/<name>/noodles.json in your own repo, is checked a little differently: a project saved before documents is a warning that says to open and save it in the editor, and every @/ file must exist in the project's data/ folder. Pass a folder to check every project in it; see noodles-validate for running it in CI.
For editor autocompletion, the file shape is also published as a JSON Schema at noodles.gl/schema/noodles-project.schema.json. Map noodles.json files to it in your code editor (in VS Code, the json.schemas setting), or to noodles-document.v<N>.schema.json to pin a version. Projects saved before documents match noodles-project.v23.schema.json. The schema checks shape only, so still run the validator.
Register the noodles server
Claude Code sessions in the repo pick it up from .mcp.json after npm install; approve it when asked. For other agents, or a session outside the repo, register it with the full path to your checkout:
- Claude Code
- Codex
- Gemini CLI
- Cursor
- VS Code
- Other
claude mcp add noodles -- node /path/to/noodles.gl/noodles-mcp/bin/noodles-mcp.ts
codex mcp add noodles -- node /path/to/noodles.gl/noodles-mcp/bin/noodles-mcp.ts
gemini mcp add noodles node /path/to/noodles.gl/noodles-mcp/bin/noodles-mcp.ts
In .cursor/mcp.json, next to webmcp:
{
"mcpServers": {
"noodles": {
"command": "node",
"args": ["/path/to/noodles.gl/noodles-mcp/bin/noodles-mcp.ts"]
}
}
}
In .vscode/mcp.json, next to webmcp:
{
"servers": {
"noodles": {
"type": "stdio",
"command": "node",
"args": ["/path/to/noodles.gl/noodles-mcp/bin/noodles-mcp.ts"]
}
}
}
A stdio server: the command is node, with the path to noodles-mcp/bin/noodles-mcp.ts in your checkout as its argument. It needs Node 22.18 or later.
Don't run either tool through a bare npx noodles-mcp or npx validate-projects. Neither name is published on npm, so npx would download whatever someone else publishes under it.
How an agent should write a file
- Find a similar example with
list_examplesand read it withget_example. - Read each operator it will use with
get_operator_schemabefore connecting it. - Write the file, validate it, and fix every error.
- Stop when it validates.
To look at the result, open the project folder (the one holding noodles.json and its data files) with Open (Cmd+O / Ctrl+O) in the editor menu, in Chrome or Edge. This works in a local editor or at noodles.gl/app. The editor then shows the project at /projects/<name>, where <name> is the folder's name (for example noodles.gl/app/projects/<name>), and that URL opens it again later.
/examples/<name> is only for the bundled examples. In a local checkout, a project written to noodles-editor/src/examples/<name>/noodles.json shows up there too.
Small graphs work best: five to eight nodes that a person can read, such as a source (file, geojson), a filter or attribute node, a layer (scatter, path, heatmap) and the deck node. Per-row values such as positions and colors are columns made by attribute nodes or a layer's expressions ([lng, lat]), not JavaScript functions. One sql node is easier to check than a long chain of reshaping nodes. The validator only checks that timeline tracks point at real parameters, so set keyframes in the editor or through a running editor (above) rather than by hand.
The repo's AGENTS.md describes the file format and code layout for agents. Codex, Cursor, Claude Code (through CLAUDE.md) and other agents that read AGENTS.md load it on their own.
Point an agent at the docs
For an agent working on your own code, such as an app that embeds a Noodles visualization, point it at noodles.gl/llms.txt. It lists these docs, the quick start prompts, and the agent setup pages in a form agents read well.
Which way to use
- Trying Noodles for the first time: the in-app assistant, or the quick start prompt if you already use a coding agent.
- Changing a map and exporting video: drive a running editor.
- A video from a project file, no editor open: render it from the command line.
- Generating many projects, or keeping them in git: write project files and validate them.
- Both: connect both servers. The agent writes the file with the
noodlesserver, you open it, and the agent fine-tunes it live. With both connected, tools with the same name are told apart by server, such asnoodlesandwebmcpversions ofget_operator_schema.