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

Your agentMCP client with the config block
/api/mcpFive tools, one stateless server
/api/v1 handlersSame quota, rate limits and error codes as REST
ResultPNG maps for the types you request

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
Server config
{
  "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

  1. health_check
  2. usage_stats
  3. generate_texture

Background job

  1. generate_texture_async
  2. get_job
MCP tools, what each does, the REST route it calls, and whether a key is needed
ToolWhat it doesREST routeKey
health_checkAPI health checkReports whether the API and its database are up, with the last hour of request metrics. No key needed.GET /api/v1/health-checkNone
usage_statsQuota and rate limitShows this team's monthly quota and usage, and this key's per-minute limit. Does not use generation quota.GET /api/v1/usage-statsRequired
generate_textureGenerate PBR mapsTurns 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-textureRequired
generate_texture_asyncStart a background generationStarts 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-asyncRequired
get_jobGet job statusReturns 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 body
{
  "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

MCP server facts
FactValue
Endpointhttps://genpbr.com/api/mcp (POST, GET, DELETE, Streamable HTTP)
AuthenticationX-API-Key: <key>, or Authorization: Bearer <key>. Read on every request
SessionsNone. Each request stands alone, so nothing is kept in memory between calls
Same limits as RESTEach tool calls the v1 handler its REST route uses, so quota, rate limits, and errors match
Free tier25 requests a month per team, 5 a minute per key. No card
Request body4 MB per generate_texture request. Base64 adds about a third to the file size
IdempotencyPass idempotencyKey to generate_texture or generate_texture_async. The same key and body within 24 hours return the first result
Job retentionResults 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.

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.