MCP server for AI agents
The Model Context Protocol (MCP) lets an AI agent call tools that a program offers. askrgarden-cli mcp is AskrGarden's MCP server: an agent such as Claude Code, Claude Desktop, Codex, OpenCode, Cursor or Antigravity can create a tree from a preset, change its node graph, look at a preview picture, read the numbers and export it, through the same core as the editor and the command line. The same project gives the same bytes as askrgarden-cli export.
In validation
The server is written and tested in the repository (roadmap mcp-server, in validation). The client pages below follow each client's official documentation as read in December 2026; they have not all been tried with AskrGarden.
Start the server
askrgarden-cli mcp --root <workspace folder> [--library <folder>] [--allow <folder>]| Option | Meaning |
|---|---|
--root | the workspace folder: relative paths in tool arguments start here (default: the current folder) |
--library | your library folder (default: the editor's saved setting, else Documents/AskrGarden) |
--allow | one more folder the tools may read and write; repeat it for several |
The server talks over stdio: the agent's program starts it and exchanges JSON messages through its input and output. You do not run it by hand; you add it to your agent's configuration. The process ends when the agent closes it.
The command to give your agent
Every client needs a command and its arguments. Use absolute paths.
| How you got AskrGarden | Command |
|---|---|
| Windows installer | C:\Users\you\AppData\Local\Programs\AskrGarden\askrgarden-cli.exe (installed for all users: C:\Program Files\AskrGarden\askrgarden-cli.exe) |
| macOS disk image | /Applications/AskrGarden.app/Contents/MacOS/askrgarden-cli |
| zip (any system) | askrgarden-cli (askrgarden-cli.exe) inside the unzipped folder |
| source checkout | /path/to/TreeGenerator/askrgarden-cli.sh; on Windows C:\path\to\TreeGenerator\.venv\Scripts\python.exe with -m treegen before the arguments and PYTHONPATH=C:\path\to\TreeGenerator |
The arguments are mcp --root <workspace folder>, for example mcp --root C:\Users\you\Trees. When you added askrgarden-cli to the PATH (Desktop programs), the command can be just askrgarden-cli, but a full path works even in clients that do not read your shell's PATH.
askrgarden-cli.exe is a real program, so every client can start it. From a checkout, the .cmd launchers are batch files that some clients cannot run without a shell: that is why the Python form is given there.
What the agent may touch
- The tools read and write only inside the allowed folders: the workspace root, your library folder and each
--allowfolder. Any other path is refused with a message that lists the allowed folders. - The sample trees that ship with AskrGarden are read-only. An agent copies one with
save_projectbefore changing it. - A project whose textures or meshes point outside the allowed folders is refused.
- No network access, no shell. The only other program it may start is PBrokkR (PBRGenerator), for
make_textures, when you configured it. - Exports overwrite files with the same name in the output folder (default
<root>/out/exports/<project name>). - Like
askrgarden-cli serve, the server is local and single-user and has no login. Start it only from a client you trust, and keep--allownarrow.
A typical session
list_presets, thennew_projectfrom the preset closest to what you asked for.describe_nodeto learn a node's parameters, thenset_paramsto change them.validate_projectandbuild_projectto check the result and read the numbers (height, crown, triangles per LOD).render_previewto look at a picture; repeat 2–4.export_projectto write GLB, glTF, FBX, OBJ or USD with textures and, if wanted, the impostor.
Two ready-made prompts help: build_tree_from_description and tune_tree. See the Tool reference.
Set it up in your agent
| Agent | Page |
|---|---|
| Claude Code, Claude Desktop | Claude Code and Claude Desktop |
| Codex | Codex |
| OpenCode | OpenCode |
| Cursor | Cursor |
| Antigravity | Antigravity |
| anything else that speaks MCP over stdio | Any stdio client |