Skip to content

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 ​

sh
askrgarden-cli mcp --root <workspace folder> [--library <folder>] [--allow <folder>]
OptionMeaning
--rootthe workspace folder: relative paths in tool arguments start here (default: the current folder)
--libraryyour library folder (default: the editor's saved setting, else Documents/AskrGarden)
--allowone 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 AskrGardenCommand
Windows installerC:\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 --allow folder. 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_project before 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 --allow narrow.

A typical session ​

  1. list_presets, then new_project from the preset closest to what you asked for.
  2. describe_node to learn a node's parameters, then set_params to change them.
  3. validate_project and build_project to check the result and read the numbers (height, crown, triangles per LOD).
  4. render_preview to look at a picture; repeat 2–4.
  5. export_project to 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 ​

AgentPage
Claude Code, Claude DesktopClaude Code and Claude Desktop
CodexCodex
OpenCodeOpenCode
CursorCursor
AntigravityAntigravity
anything else that speaks MCP over stdioAny stdio client