MCP server
GenPBR MCP server for PBR texture generation
Add one config block to your MCP client. The agent can then check its quota and make PBR maps without writing REST code.
Request path
GenPBR's MCP server gives an MCP client five tools: check the API, read quota, generate normal, roughness, metallic, AO, and height maps from one image, and run background jobs. It is hosted at https://genpbr.com/api/mcp over Streamable HTTP. The API key goes in the X-API-Key header, never in a tool argument.
Connect in four steps
- 01
Create a key
Make a key at /dashboard/api-keys with a signed-in account. The free tier includes 25 requests a month and needs no card. - 02
Add the server to your client
Point the client at https://genpbr.com/api/mcp and send the key in the X-API-Key header. Keep the key in the GENPBR_API_KEY environment variable, not in a file you commit. - 03
Check quota before a batch
The agent should call usage_stats first. It returns what is left this month and the per-minute limit, so a batch is planned before any map is made. - 04
Generate maps
generate_texture returns the maps in one response. For work that should run in the background, use generate_texture_async, then get_job with the jobId it returns.
{
"mcpServers": {
"genpbr": {
"type": "http",
"url": "https://genpbr.com/api/mcp",
"headers": { "X-API-Key": "${GENPBR_API_KEY}" }
}
}
}This is the common shape for a remote MCP server. File names differ between clients, and not every client expands ${GENPBR_API_KEY}. Check your client's MCP settings for the exact file.
Five tools, two ways to run a task
One image, wait for the maps
- health_check
- usage_stats
- generate_texture
Background job
- generate_texture_async
- get_job
| Tool | What it does | REST route | Key |
|---|---|---|---|
health_checkAPI health check | Reports whether the API and its database are up, with the last hour of request metrics. No key needed. | GET /api/v1/health-check | None |
usage_statsQuota and rate limit | Shows this team's monthly quota and usage, and this key's per-minute limit. Does not use generation quota. | GET /api/v1/usage-stats | Required |
generate_textureGenerate PBR maps | Turns one base image into the maps you list in textureTypes, and returns them in the response. Each map type uses one unit of quota, except a repeat of an earlier image and type. | POST /api/v1/generate-texture | Required |
generate_texture_asyncStart a background generation | Starts the same generation as a background job and returns a jobId straight away. Add webhookUrl to be notified when the job finishes. | POST /api/v1/generate-texture-async | Required |
get_jobGet job status | Returns the status, progress, result, or error of a background job by jobId. Job records are kept for 24 hours. | GET /api/v1/jobs/{id} | Required |
Errors an agent can branch on
Every error has the same shape, whether it comes from MCP or REST.
Branch on error_detail.code, not on the message text. Retry only when retryable is true. A 429 also sends a Retry-After header. The MCP tool result carries the same JSON, with isError set for any status of 400 or more.
{
"error": "Insufficient quota",
"message": "This request requires 5 quota usage, but you only have 2 remaining.",
"error_detail": {
"code": "insufficient_quota",
"message": "This request requires 5 quota usage, but you only have 2 remaining.",
"retryable": false,
"docs_url": "https://genpbr.com/developers/errors#insufficient_quota"
}
}What the server does with your key
The key never enters a tool call
Tool arguments hold the image and the generation settings, never the key. The key is read from the request headers and passed to the handler that runs the call.
The transport keeps no session
Each request is handled on its own, with a fresh server. Background jobs and idempotency records are stored in GenPBR's database, not in the server's memory.
The REST rules still apply
Quota, rate limits, plan checks and error codes come from the same handlers as the REST API. There is no second, looser path.
The numbers that matter
| Fact | Value |
|---|---|
| Endpoint | https://genpbr.com/api/mcp (POST, GET, DELETE, Streamable HTTP) |
| Authentication | X-API-Key: <key>, or Authorization: Bearer <key>. Read on every request |
| Sessions | None. Each request stands alone, so nothing is kept in memory between calls |
| Same limits as REST | Each tool calls the v1 handler its REST route uses, so quota, rate limits, and errors match |
| Free tier | 25 requests a month per team, 5 a minute per key. No card |
| Request body | 4 MB per generate_texture request. Base64 adds about a third to the file size |
| Idempotency | Pass idempotencyKey to generate_texture or generate_texture_async. The same key and body within 24 hours return the first result |
| Job retention | Results of background jobs are kept for 24 hours |
| Server card | /.well-known/mcp/server-card.json, for discovery tools |
Questions about the MCP server
- Is there a local install?
- No. The server is hosted. Your client connects over HTTPS, and the generation runs on GenPBR servers, so the agent needs no Python, Blender, or desktop app.
- Does the MCP server have different limits from the REST API?
- No. Each tool calls the same v1 route handler as its REST route, so quota, rate limits, and error codes match what the REST API returns.
- Which tools use generation quota?
- generate_texture and generate_texture_async. Each texture type costs one unit, unless the same image and type was generated before. health_check and usage_stats do not use generation quota.
- Can I use the same tools without MCP?
- Yes. Every tool is a REST route under /api/v1. The request format and the numbers for each route are on /developers/agents.
- Do I need a credit card?
- No, for the free tier. Create the key with a signed-in account. Paid plans raise the monthly quota and the per-minute limit.
Related pages
- For AI agentsThe same generation as plain REST calls, with the numbers and failure responses.
- API referenceEvery endpoint and its request format.
- API quickstartCreate a key and send the first request.
- OpenAPI schemaThe machine-readable API, including the auth scheme.
- Site summary for agentsWhere each GenPBR tool lives and when to use it.
Connect it now
The free tier covers 25 generations a month. Create a key, add the config, and ask the agent to run health_check.