Skip to content

MCP server for AI agents ​

The Model Context Protocol (MCP) lets an AI agent call tools that a program offers. PBrokkR's MCP server gives an agent the same things you do in the app and on the command line: make the maps of an image, look at a preview, read the help of a parameter, list presets, save a material to your library.

You ask in plain words, for example:

Make a 2K mossy-rock material from D:\photos\rock.jpg for Unreal, tileable, with deeper relief, and show me a preview before you export.

and the agent calls preview, then generate, with the right parameters.

What the agent can do ​

ToolWhat it does
generateWrites the maps of one image, or of a procedural height, like pbrokkr-cli generate
batchThe same for every image of a folder
previewReturns a small picture (lit, a contact sheet, or one map) without writing files
list_params, describe_paramThe parameters and their help, in English or Portuguese
list_presets, get_presetThe presets and what is in them
list_macrosThe simple-mode controls and what each one moves
list_profilesThe engine export profiles and their files
get_library, list_materials, save_materialYour library: where it is, what is in it, saving a new material

Full descriptions and arguments: Tool reference.

The server runs the same pipeline as everything else: a generate call writes the same bytes as the command line with the same parameters.

The command an agent must start ​

The server talks over stdio: the agent's program starts it and exchanges messages through its input and output. You do not run it by hand; you add it to the agent's configuration.

With the downloaded program (Install), the agent starts pbrokkr-cli with the argument mcp, and nothing else is needed. Replace C:\Tools\PBrokkR with the folder you unzipped:

text
command   C:\Tools\PBrokkR\pbrokkr-cli.exe
args      mcp
text
command   /opt/pbrokkr/pbrokkr-cli
args      mcp

From the source code, the agent starts the Python of the project's virtual environment, with three things. Replace C:\Tools\PBRGenerator with the folder of the checkout. The pages of each agent below show this form; for the downloaded program, use the command above and leave out PYTHONPATH.

text
command   C:\Tools\PBRGenerator\.venv\Scripts\python.exe
args      -m pbrgen mcp
env       PYTHONPATH = C:\Tools\PBRGenerator
text
command   /opt/PBRGenerator/.venv/bin/python
args      -m pbrgen mcp
env       PYTHONPATH = /opt/PBRGenerator

PYTHONPATH tells Python where the pbrgen package is. Add --library <folder> to the arguments to use a library folder other than the one set in the app's Preferences.

Set it up in your agent ​

AgentPage
Claude Code, Claude DesktopClaude
CodexCodex
OpenCodeOpenCode
Cursor, Grok BuildCursor and Grok Build
AntigravityAntigravity
Anything else that speaks MCP over stdioAny stdio client

What it can touch ​

  • It reads the images you name and writes where you say, or into exports/ in your library when you do not say.
  • It does not open network connections, and it has no tool that deletes files.
  • Your agent asks for permission before each tool call unless you told it not to. Read the folder in a generate call before you approve it.

If it does not connect ​

  1. Run the command yourself in a terminal: it should print one line that starts with PBrokkR MCP and then wait. Press Ctrl+C to stop it.
  2. No module named pbrgen (source form only): PYTHONPATH is missing or points to the wrong folder.
  3. The path has spaces: keep it as one string in the configuration, with no extra quotes inside.
  4. Check with the test in Any stdio client.