# 3D Polygen > AI generation of game-ready 3D assets. A prompt or a reference image becomes a concept, a mesh, and > a PBR texture set — with art direction that persists across every generation in a project. Polygen is a credit-based SaaS. The pipeline is three stages: **Concept → 3D Models → Textures**. ## For agents Polygen has a remote MCP server. It is the recommended way for an agent to drive the pipeline, and it exposes capability the web app does not — notably **intent contracts**, which let a caller declare how an elevation should frame the deliverable. - **Endpoint:** `https://www.3dpolygen.com/api/agent/mcp` (Streamable HTTP, dual-era: MCP `2026-07-28` and `2025-11-25`) - **Local/stdio:** `npx --yes @3dpolygen/mcp` (Node.js 20+) - **Auth:** Remote hosts may use OAuth; API-key access uses `Authorization: Bearer plg_live_…`. Keys are scoped, revocable, minted in Account → API keys, and require an Indie or higher subscription. - **Resource metadata:** `/.well-known/oauth-protected-resource` The server is **dual-era**, so hosts on the `2026-07-28` revision and hosts still opening with `initialize` are both served from the same endpoint. You do not need to know which one your client is. ### Connecting a host **Claude Code / Claude Desktop / Cursor** — prefer the remote endpoint. Hosts with OAuth support can authorize the connection in the host: ```json { "mcpServers": { "polygen": { "type": "http", "url": "https://www.3dpolygen.com/api/agent/mcp" } } } ``` For hosts without OAuth, add an `Authorization: Bearer ` header, or use local stdio. The account settings page generates a host-specific config after you mint a key: ```json { "mcpServers": { "polygen": { "command": "npx", "args": ["--yes", "@3dpolygen/mcp"], "env": { "POLYGEN_API_KEY": "plg_live_" } } } } ``` `POLYGEN_API_URL` is optional and defaults to the production site — set it only for staging or a self-hosted origin. The server prints the origin it is serving to stderr on startup, which is where your host's MCP logs will show it. **Codex** — the desktop app, CLI and IDE extension all share `~/.codex/config.toml`. For remote OAuth, the fastest setup is the CLI: ```bash codex mcp add polygen --url https://www.3dpolygen.com/api/agent/mcp codex mcp login polygen ``` The first command writes the global config; the second opens OAuth. Restart Codex after login. The UI path is Settings → MCP servers → Add server → Streamable HTTP → paste the endpoint → Save. For API-key access, the account settings page generates this remote config: ```toml [mcp_servers.polygen] url = "https://www.3dpolygen.com/api/agent/mcp" bearer_token_env_var = "POLYGEN_API_KEY" ``` `bearer_token_env_var` names the environment variable holding your key — Codex reads it and sends the `Authorization: Bearer` header. Set `POLYGEN_API_KEY` in the environment before restarting Codex. Or use local stdio if you would rather keep the credential in the config. On Windows, use `cmd.exe` so Codex can resolve the npm launcher: ```toml [mcp_servers.polygen] command = "cmd.exe" args = ["/d", "/s", "/c", "npx --yes @3dpolygen/mcp"] [mcp_servers.polygen.env] POLYGEN_API_KEY = "plg_live_" ``` On macOS/Linux, use `command = "npx"` with `args = ["--yes", "@3dpolygen/mcp"]`. Configuration changes do not take effect until Codex is restarted. A project-scoped `.codex/config.toml` also works, but only for projects marked trusted — Codex ignores project-local config otherwise, and it fails quietly rather than warning you. Use the global file if the server does not appear. Any other MCP host: point it at the endpoint above with an `Authorization: Bearer` header, or run the stdio binary with `POLYGEN_API_KEY` set. Scopes: `projects:read`, `projects:write`, `jobs:write`, `assets:read`, `billing:read`, `keys:manage`. ### What the server exposes **Tools** — `polygen_onboard`, `polygen_contracts`, `polygen_elevate`, `polygen_generate`, `polygen_run`, `polygen_price`, `polygen_style`, `polygen_projects`, `polygen_assets`. **Prompts** — `polygen-concept`, `polygen-kit-sheet`, `polygen-style-from-image`, `polygen-elevate-check`. **Resources** — `polygen://product-map`, `polygen://craft/concept`, `polygen://craft/kit-sheets`, `polygen://craft/style-aspects`, `polygen://capabilities`, `polygen://contracts`, `polygen://projects`, `polygen://styles`. ### The order that works 1. **Bind a style.** Persistent art direction is the point — an agent declares it once and it holds across every subsequent call. Generating before binding is the most common way to get mediocre output from a capable pipeline. 2. **Read the contracts** (`polygen_contracts`, free). They are returned whole; you cannot choose one you cannot read. 3. **Elevate** (`polygen_elevate`, free — no image credits). Returns the prompt that *would* generate plus a spendable handle. 4. **Read the opening clause.** It decides camera, framing, and whether the result reads as an extractable asset. 5. **Generate with the handle.** The resolved input is re-checked; if anything moved — including inside the bound style — the call fails and names the field rather than spending. ### Costs Reads, `polygen_price`, `polygen_contracts` and `polygen_elevate` cost no image credits. `polygen_generate` spends. Being out of credits is not the same as lacking access: the first is a balance, the second is a subscription tier, and the errors say which. ## Pages - Home: https://www.3dpolygen.com/ - Pricing: https://www.3dpolygen.com/pricing - Documentation: https://www.3dpolygen.com/documentation