MaterialCraft MCP Server
<p align="center"><img src="icon.png" width="120" alt="MaterialCraft Bridge icon"></p>
<h1 align="center">MaterialCraft MCP Server</h1>
<p align="center">
<b>English</b> · <a href="README.es.md">Español</a> · <a href="README.pt-BR.md">Português</a> · <a href="README.fr.md">Français</a> · <a href="README.de.md">Deutsch</a> · <a href="README.ru.md">Русский</a> · <a href="README.zh-CN.md">简体中文</a> · <a href="README.ja.md">日本語</a> · <a href="README.ko.md">한국어</a>
</p>
<p align="center">
Let Claude make PBR materials with the <b>MaterialCraft</b> installed on your computer — <b>Windows, macOS and Linux</b>:<br>
materials from a photo or from values, Substance Designer .sbs packages cooked into texture maps, portable .mcmat materials and 3D renders.
</p>
---
## Why
[MaterialCraft](https://github.com/storytold/materialcraft) is an open-source, Substance Designer-class node-based material designer with a headless CLI (`materialcraft-cli`) that opens .sbs packages, and an MCP mode. This [Model Context Protocol](https://modelcontextprotocol.io) server turns it into **file-in / file-out tools** for Claude, so you can ask things like:
> *"Turn this brick photo into a PBR material and export the maps."*
> *"Cook this .sbs into 2K PNG maps with its roughness input at 0.3."*
> *"Make a brushed gold material and render it on a sphere."*
> *"Convert every .sbs in this folder to .mcraft."*
Sibling of [designcraft-mcp-server](https://github.com/jhonsu01/designcraft-mcp-server), [effectcraft-mcp-server](https://github.com/jhonsu01/effectcraft-mcp-server), [lightcraft-mcp-server](https://github.com/jhonsu01/lightcraft-mcp-server), [photocraft-mcp-server](https://github.com/jhonsu01/photocraft-mcp-server), [vectorcraft-mcp-server](https://github.com/jhonsu01/vectorcraft-mcp-server), [filmcraft-mcp-server](https://github.com/jhonsu01/filmcraft-mcp-server), [pdfcraft-mcp-server](https://github.com/jhonsu01/pdfcraft-mcp-server), [wordcraft-mcp-server](https://github.com/jhonsu01/wordcraft-mcp-server), [soundcraft-mcp-server](https://github.com/jhonsu01/soundcraft-mcp-server), [deckcraft-mcp-server](https://github.com/jhonsu01/deckcraft-mcp-server), [gridcraft-mcp-server](https://github.com/jhonsu01/gridcraft-mcp-server), [figcraft-mcp-server](https://github.com/jhonsu01/figcraft-mcp-server), [anicraft-mcp-server](https://github.com/jhonsu01/anicraft-mcp-server), [texturecraft-mcp-server](https://github.com/jhonsu01/texturecraft-mcp-server), [solidcraft-mcp-server](https://github.com/jhonsu01/solidcraft-mcp-server), [mailcraft-mcp-server](https://github.com/jhonsu01/mailcraft-mcp-server) and [audacity-mcp-server](https://github.com/jhonsu01/audacity-mcp-server).
## Platforms
| OS | MaterialCraft package to install | Where the server finds it (no setup needed) | Status |
| --- | --- | --- | --- |
| **Windows** 10/11 (x64, x86, arm64) | MSI or portable zip | `C:\Program Files\MaterialCraft`, `C:\Program Files\ArtCraft\MaterialCraft`, `%LOCALAPPDATA%\Programs\MaterialCraft`, `PATH` | ✅ Verified (Windows 11) |
| **Linux** (x86_64, aarch64, riscv64) | `.deb`, `.rpm` or `.tar.gz` | `/usr/bin`, `/usr/local/bin`, `/opt/materialcraft/bin`, `~/.local/bin`, `PATH` | ✅ Verified (Debian 12, headless) |
| **macOS** 11+ (Apple silicon and Intel) | `.dmg` (the app) **plus** `materialcraft-cli-<version>-macos-universal.zip` | `/Applications/MaterialCraft.app`, `/usr/local/bin`, `/opt/homebrew/bin`, `~/.local/bin`, `~/bin`, `PATH` | 🟡 Supported, not yet tested on a Mac |
All downloads: [MaterialCraft releases](https://github.com/storytold/materialcraft/releases) (there is also a FreeBSD tar.gz; set `MATERIALCRAFT_DIR` to it). Anywhere else: set `MATERIALCRAFT_DIR` (folder, `.tar.gz` root or `MaterialCraft.app`) or `MATERIALCRAFT_CLI`.
- **macOS:** the DMG contains only the app. Unzip the separate `materialcraft-cli` zip and move `materialcraft-cli` to `/usr/local/bin` (or point `MATERIALCRAFT_CLI` at it). The first run checks Apple's notarization online.
- **Linux:** the AppImage and Flatpak contain only the app, not `materialcraft-cli`; use the deb, rpm or tar.gz. For an AppImage app, set `MATERIALCRAFT_APP` so `open_in_materialcraft` can start it. On a server without a GPU, the verified setup used `libxkbcommon0 libvulkan1 libegl1 mesa-vulkan-drivers libasound2 fontconfig`.
## How it works
| Part | What it is |
| --- | --- |
| **MaterialCraft engine** (`materialcraft-cli mcp`) | MaterialCraft's own engine: graphs of atomic nodes, the .sbs reader and writer, the cooker that renders each output, and the 3D preview renderer. Started fresh for each job, confined to a private temporary folder, and never touches the MaterialCraft app. |
| **MCP server** (Node.js) | 9 high-level tools. Builds a PBR graph from a photo (colour, height, normal, roughness, ambient occlusion) or from values, cooks packages into maps, and returns a 3D render. |
## Tools
| Tool | What it does |
| --- | --- |
| `create_material` | A PBR material from a photo or texture (base colour, height from its brightness, a normal map, roughness and ambient occlusion from its tones) or from values (colour, roughness, metallic); saved as maps, .mcmat and .mcraft / .sbs |
| `cook_material` | An .sbs or .mcraft package with its exposed inputs set → texture maps (png, jpg, tga, exr, 8 to 32 bits), .mcmat or a converted package |
| `export_material` | One package, a list or a folder → maps, .mcmat or converted packages |
| `render_material` | Pictures of a material on a ball, rounded cube, sphere, plane or torus |
| `get_material_info` | Graphs, outputs, exposed inputs, node count, cook errors and import warnings |
| `list_materialcraft_catalog` | Engine commands, nodes, 3D scenes and formats |
| `run_materialcraft_commands` | Any engine command plus `graph_new`, `node_add`, `node_connect`, `node_param`... in one session (`$steps[N].field` references), then save |
| `open_in_materialcraft` | Open packages in the MaterialCraft app |
| `get_materialcraft_status` | Platform, installation, version, commands and nodes |
| | |
| --- | --- |
| **Reads** | .sbs, .mcraft; pictures (png, jpg, tga, tif, bmp, webp, exr, hdr) |
| **Writes** | texture maps (png, jpg, tga, bmp, webp, exr, hdr), .mcmat, .mcraft, .sbs |
Unsupported .sbs nodes are kept as placeholders and listed in the warnings.
## Example
```json
{
"name": "Old bricks",
"image_path": "C:\\Textures\\bricks.jpg",
"invert_height": true,
"height_strength": 3,
"roughness": 0.7,
"size": 2048,
"formats": ["maps", "mcmat", "sbs"],
"map_format": "png",
"scene": "rounded_cube",
"output_dir": "C:\\Materials"
}
```
## Requirements
- **MaterialCraft** with `materialcraft-cli` (tested with **0.4.1**); see [Platforms](#platforms)
- Node.js ≥ 20 (bundled with Claude Desktop for `.mcpb` installs)
## Installation
### Claude Desktop (recommended, all platforms)
1. Download `materialcraft-mcp-server.mcpb` from the [latest release](https://github.com/jhonsu01/materialcraft-mcp-server/releases/latest).
2. Double-click it (or drag it into Claude Desktop → *Settings → Extensions*) and click **Install**.
3. Optional: if MaterialCraft is not in a standard location, fill in its folder or the `materialcraft-cli` path in the extension settings.
### Claude Code and Cowork (plugin)
Add the marketplace `jhonsu01/sunsam-plugins` (in Claude Code: `/plugin marketplace add jhonsu01/sunsam-plugins`; in the Claude app: *Plugins → Add → Add marketplace*) and install **materialcraft-bridge**.
### Sunsam Code
Install **MaterialCraft Bridge** from the [Sunsam Code marketplace](https://github.com/jhonsu01/marketplace-SunsamCode), or drop the `.mcpb` into *MCP → Install extension*.
### Codex (OpenAI)
**Recommended — the marketplace (gets updates):** *Plugins → Add → Add marketplace*, source `jhonsu01/craft-marketplace`, reference `main`, then install **MaterialCraft Bridge** from **Craft Bridges** ([craft-marketplace](https://github.com/jhonsu01/craft-marketplace)). New versions arrive by refreshing the marketplace. Or upload the zip (Codex then keeps it in your account and refuses a newer zip with the same name):
1. Download `materialcraft-mcp-server-<version>-codex.zip` from the [latest release](https://github.com/jhonsu01/materialcraft-mcp-server/releases/latest).
2. In Codex: *Plugins → Add → New plugin*, choose the zip and click **Add plugin**.
3. Codex starts the server with `node`, so Node.js ≥ 20 must be on `PATH`. If MaterialCraft is not in a standard location, set `MATERIALCRAFT_DIR` or `MATERIALCRAFT_CLI` as system environment variables (Codex has no settings form for local plugins).
### DeepSeek Harness
1. *Plugins → Add plugin*, enter `github:jhonsu01/craft-marketplace#path:/plugins/materialcraft-mcp-server` and click **Install**, then **Enable now**.
2. Harness runs the server with its own MCP client and `node` (Node.js ≥ 20 on `PATH`); the tools appear as `mcp__materialcraft__<tool>` and the output files as cards that open in Harness.
3. Harness does not update plugins by itself yet: to upgrade, uninstall the plugin and install it again with the same address.
### Claude Code / other MCP clients
```bash
git clone https://github.com/jhonsu01/materialcraft-mcp-server.git
cd materialcraft-mcp-server
npm install
npm run build
```
Windows:
```bash
claude mcp add materialcraft -- node "%CD%\dist\bundle.cjs"
```
macOS / Linux:
```bash
claude mcp add materialcraft -- node "$PWD/dist/bundle.cjs"
```
## Configuration
| Variable | Meaning |
| --- | --- |
| `MATERIALCRAFT_DIR` | MaterialCraft folder, one of its executables, a `.tar.gz` root (with `bin/`) or `MaterialCraft.app`. Default: auto-detect |
| `MATERIALCRAFT_CLI` | Path of `materialcraft-cli` / `materialcraft-cli.exe` (wins over `MATERIALCRAFT_DIR`) |
| `MATERIALCRAFT_APP` | Path of the desktop app when it lives elsewhere (e.g. a Linux AppImage) |
| `MATERIALCRAFT_MCP_TIMEOUT` | Maximum seconds per engine call (default 3600) |
## Safety
- Files are **never overwritten** unless `overwrite: true`: a free name (`_2`) is used in folders and an existing `output_path` is an error. Inputs are only read; an edited file is saved only as a new copy (`_edited`).
- All paths must be absolute. The engine runs headless, confined to a private temporary folder for each job (the inputs are copied in, the outputs moved out), and never touches the MaterialCraft app.
- Everything runs locally with no network access. Each job uses a private engine in a temporary folder that is deleted at the end.
## Development
```bash
npm run build # TypeScript + single-file bundle (dist/bundle.cjs)
npm test # unit tests (Windows, macOS and Linux path logic)
npm run test:e2e # 18 end-to-end checks over real MCP stdio (a synthetic brick photo)
npm run pack:mcpb # materialcraft-mcp-server.mcpb
npm run pack:codex # Codex / DeepSeek Harness plugin zip
```
Linux test in Docker (unpack `materialcraft-<version>-linux-x86_64.tar.gz` first):
```bash
docker run --rm -v "$PWD:/work:ro" -v "/path/to/materialcraft-0.4.1-linux-x86_64:/opt/materialcraft:ro" -e MATERIALCRAFT_DIR=/opt/materialcraft -w /work node:22-bookworm bash -c "apt-get update && apt-get install -y libxkbcommon0 libvulkan1 libegl1 mesa-vulkan-drivers libasound2 fontconfig && node scripts/e2e.mjs"
```
## License
Apache-2.0. MaterialCraft is © its authors (Storytold), MIT or Apache-2.0.
This project is not affiliated with or endorsed by MaterialCraft or Storytold. Substance 3D Designer is a trademark of Adobe.
TDQS
Scored across 9 tools
cook_material and export_material overlap heavily, since both can cook packages into texture maps, .mcmat files, or converted packages; the main distinction is single-package configuration versus batch export. list_materialcraft_catalog and get_materialcraft_status also overlap on engine commands, node library, and formats, though the descriptions make the intended split mostly readable.
All tool names use snake_case and begin with a verb, with core operations following a clear verb_material pattern. Minor deviations like open_in_materialcraft and the embedded product name in several tools are still predictable and readable.
Nine tools is well-scoped for a material creation, cooking, export, rendering, and inspection server. Each tool covers a recognizable part of the workflow without obvious bloat.
The surface covers creation, inspection, cooking/export, rendering, advanced graph/node command execution, and desktop handoff. There is no explicit delete or package-listing operation, but those are minor gaps in a file-based workflow and are partly addressable through the advanced command runner.