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.jpgfor 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
| Tool | What it does |
|---|---|
generate | Writes the maps of one image, or of a procedural height, like pbrokkr-cli generate |
batch | The same for every image of a folder |
preview | Returns a small picture (lit, a contact sheet, or one map) without writing files |
list_params, describe_param | The parameters and their help, in English or Portuguese |
list_presets, get_preset | The presets and what is in them |
list_macros | The simple-mode controls and what each one moves |
list_profiles | The engine export profiles and their files |
get_library, list_materials, save_material | Your 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:
command C:\Tools\PBrokkR\pbrokkr-cli.exe
args mcpcommand /opt/pbrokkr/pbrokkr-cli
args mcpFrom 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.
command C:\Tools\PBRGenerator\.venv\Scripts\python.exe
args -m pbrgen mcp
env PYTHONPATH = C:\Tools\PBRGeneratorcommand /opt/PBRGenerator/.venv/bin/python
args -m pbrgen mcp
env PYTHONPATH = /opt/PBRGeneratorPYTHONPATH 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
| Agent | Page |
|---|---|
| Claude Code, Claude Desktop | Claude |
| Codex | Codex |
| OpenCode | OpenCode |
| Cursor, Grok Build | Cursor and Grok Build |
| Antigravity | Antigravity |
| Anything else that speaks MCP over stdio | Any 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
generatecall before you approve it.
If it does not connect
- Run the command yourself in a terminal: it should print one line that starts with
PBrokkR MCPand then wait. PressCtrl+Cto stop it. No module named pbrgen(source form only):PYTHONPATHis missing or points to the wrong folder.- The path has spaces: keep it as one string in the configuration, with no extra quotes inside.
- Check with the test in Any stdio client.